servers/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Amir Fathi d6402efee6
fix(sequentialthinking): restore nextThoughtNeeded in the advertised inputSchema required array (#4652)
* fix(sequentialthinking): restore nextThoughtNeeded in the advertised inputSchema required array

commit 1cdf806d (#3533) wrapped nextThoughtNeeded in a z.preprocess-based
coercedBoolean to fix a real footgun (string "false" coercing to true).
zod's toJSONSchema(..., { io: "input" }) treats a z.preprocess()-wrapped
field's input type as unknown, so it silently drops that field from the
emitted required array, even though it carries no .optional(). A client
that builds its call arguments from the advertised schema then omits
nextThoughtNeeded and gets a -32602 Invalid params from the runtime
validator, which still requires it.

Rebuild coercedBoolean as a transform on an explicit z.union([z.boolean(),
z.string()]) instead of z.preprocess. The union gives toJSONSchema a
concrete input type to report, so nextThoughtNeeded stays in required,
while parse behavior (including the case-insensitive string coercion
#3533 added) is unchanged.

Fixes #4651

* test(sequentialthinking): pin nextThoughtNeeded in required and string coercion

Runs against the built server so it checks the schema the SDK emits.
Skips when dist/ is absent, matching server-version.test.ts.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018Wo28CHPXyM3DHoLWvKnCK

---------

Co-authored-by: olaservo <olahungerford@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 10:57:34 -07:00
..
everything fix(everything): remove dead code in template URI validation and subscription cleanup (#4104) 2026-08-27 19:17:27 -07:00
fetch docs(python): note the mcp 1.x requirement in fetch, git, and time 2026-08-18 08:57:03 -07:00
filesystem fix(filesystem): preserve UTF-8 across head and tail chunks (#4667) 2026-08-28 10:01:16 -07:00
git docs(python): note the mcp 1.x requirement in fetch, git, and time 2026-08-18 08:57:03 -07:00
memory fix(memory): write the knowledge graph atomically (#4642) 2026-08-28 10:00:33 -07:00
sequentialthinking fix(sequentialthinking): restore nextThoughtNeeded in the advertised inputSchema required array (#4652) 2026-08-28 10:57:34 -07:00
time docs(python): note the mcp 1.x requirement in fetch, git, and time 2026-08-18 08:57:03 -07:00