docs(mcp): the comment of the tool input bound says what comes from where (#202)
The advisory GHSA-46jr-4wx8-v453 is about the SDK setting no limit unless one is given; that zod validates the elements of an array before its length is a fact of zod (REVIEW.md, #147). The comment tied the second to the advisory. Comment only. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
c4e3bdca0f
commit
75c6764a65
1 changed files with 4 additions and 4 deletions
|
|
@ -23,10 +23,10 @@ const SERVER_VERSION = '1.0.0';
|
|||
export const MCP_MAX_BODY_BYTES = 256 * 1024;
|
||||
|
||||
// Largest number of array elements and object keys in the arguments of one
|
||||
// tool call, counted by the SDK before the schema is read: zod validates every
|
||||
// element of an array before its length, so `.max()` alone does not bound a
|
||||
// hostile array (GHSA-46jr-4wx8-v453). The largest legitimate call holds
|
||||
// fewer than 30.
|
||||
// tool call, counted by the SDK before the schema is read. The SDK sets no
|
||||
// limit of its own (GHSA-46jr-4wx8-v453), and zod validates every element of
|
||||
// an array before its length, so `.max()` alone does not bound a hostile
|
||||
// array. The largest legitimate call holds fewer than 30.
|
||||
const MAX_TOOL_INPUT_ELEMENTS = 64;
|
||||
|
||||
// Whom a tool call speaks for. `tokenId` is null for a caller that has no
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue