Reject unknown params in t3_thread_read (#17823)

This commit is contained in:
Miklós Fazekas authored and GitHub committed 2026-10-12 01:18:11 +00:00
1 parent a5331e4c2c
commit ee2763e9b2
2 files changed
+8

No files matched your search

@@ -1426,6 +1426,12 @@ describe("orchestrator MCP toolkit", () => {
expect(threadListTool?.tool.annotations?.idempotentHint).toBe(true);
const threadReadTool = server.tools.find(({ tool }) => tool.name === "t3_thread_read");
expect(threadReadTool?.tool.annotations?.readOnlyHint).toBe(false);
expect(threadReadTool?.tool.inputSchema).toMatchObject({ additionalProperties: false });
const unknownPagingParamError = yield* invoke("t3_thread_read", {
threadId: parentThreadId,
cursor: 90,
}).pipe(Effect.flip);
expect(unknownPagingParamError.message).toContain("Expected no excess property");
const threadUpdateTool = server.tools.find(
({ tool }) => tool.name === "t3_thread_update",
);
@@ -214,6 +214,8 @@ const ThreadReadTool = Tool.make("t3_thread_read", {
dependencies,
})
.annotate(Tool.Title, "Read a T3 thread")
// Strict so a misspelled paging param fails instead of silently reading from position 0.
.annotate(Tool.Strict, true)
.annotate(Tool.Readonly, false)
.annotate(Tool.Destructive, false)
.annotate(Tool.Idempotent, true);