From c09564c45f50829b3465e0be161dab473d2e2bb3 Mon Sep 17 00:00:00 2001 From: le king fu Date: Sun, 15 Nov 2026 08:13:21 -0500 Subject: [PATCH] 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 --- web/src/lib/mcp/server.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/src/lib/mcp/server.ts b/web/src/lib/mcp/server.ts index abbe55f..b0b5a3c 100644 --- a/web/src/lib/mcp/server.ts +++ b/web/src/lib/mcp/server.ts @@ -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