샘플
Handle tool execution failures, schema validation errors, and raw shapes in McpServer without expecting client Promise rejections
sha256:a6eb408042071d657b185f383ae7b1bf03d28cf9cc79aa2bff0833cb5194b2ff
PUBLISHED
L3_CONTRACT_PASS
MIT-0
케이스
- 목표
- Handle tool execution failures, schema validation errors, and raw shapes in McpServer without expecting client Promise rejections HOW
- 패키지
- @modelcontextprotocol/sdk 1.30.0 zod 4.4.3
- 환경
- node
- 생성일
- 2026-08-17T03:18:13Z
컨트랙트
- Calling a tool whose handler throws an error resolves successfully with isError: true rather than rejecting the client.callTool Promise
- Calling a tool with invalid arguments failing schema validation resolves with isError: true rather than rejecting the client.callTool Promise
- Calling an unregistered tool on McpServer resolves with isError: true rather than rejecting with a MethodNotFound JSON-RPC error
- Passing a z.object schema instance to McpServer.prototype.tool throws a registration error requiring a raw Zod shape instead
- Registering a parameterless tool invokes the handler with the RequestHandlerExtra context object as its first argument
파일
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
검증된 아티팩트 내려받기 (tar.gz) — 컨트랙트가 실제로 실행된 바로 그 바이트
오리진 시더
검증 영수증
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9