diff --git a/AGENTS.md b/AGENTS.md index c0c4477..564309c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,7 +53,10 @@ Applies to every change in this repo, by any agent or human. - stdout is the MCP protocol channel — diagnostics go to `console.error` ONLY, never `console.log` - ESM with NodeNext resolution: relative imports need the `.js` extension -- MCP SDK v1 (`@modelcontextprotocol/sdk`): `registerTool` takes a ZodRawShape - (plain object of zod fields), NOT `z.object()`; subpath imports - (`server/mcp.js`, `server/stdio.js`, `client/index.js`, `inMemory.js`, `types.js`) +- MCP SDK v1 (`@modelcontextprotocol/sdk`): `registerTool` accepts a ZodRawShape + (plain object of zod fields) OR a full Zod object (verified on 1.29: AnySchema, + `.strict()` honored at runtime). Use a strict `z.object` where unknown-key + rejection matters (add_connection); raw shapes are fine elsewhere. Subpath + imports (`server/mcp.js`, `server/stdio.js`, `client/index.js`, `inMemory.js`, + `types.js`) - zod 3 (`import * as z from 'zod'`)