prompts.md (Error Handling) says servers SHOULD return -32602 for missing required arguments and -32603 for internal errors, and SHOULD validate prompt arguments.
handlePromptsGet in src/handlers.ts instead returns a successful GetPromptResult:
- A TypeBox
argumentSchema failure returns a messages result containing "Invalid prompt arguments: …".
- A prompt declared with
arguments: [{ name, required: true }] but no argumentSchema is not validated at all, so the handler runs with the argument undefined.
- An error thrown by the prompt handler is also returned as a success message.
Also, prompts/list exposes the internal argumentSchema field, which is not part of the Prompt schema.
resources/read has the same pattern ("Resource read failed: …" returned as content). PR #170 fixes that on the 2026-07-28 path because it now attaches caching hints, which could make shared caches store the error.
Found while reviewing #170. Already present on main.
prompts.md(Error Handling) says servers SHOULD return-32602for missing required arguments and-32603for internal errors, and SHOULD validate prompt arguments.handlePromptsGetinsrc/handlers.tsinstead returns a successfulGetPromptResult:argumentSchemafailure returns amessagesresult containing "Invalid prompt arguments: …".arguments: [{ name, required: true }]but noargumentSchemais not validated at all, so the handler runs with the argumentundefined.Also,
prompts/listexposes the internalargumentSchemafield, which is not part of thePromptschema.resources/readhas the same pattern ("Resource read failed: …" returned as content). PR #170 fixes that on the 2026-07-28 path because it now attaches caching hints, which could make shared caches store the error.Found while reviewing #170. Already present on
main.