Skip to content

Unknown prompt name returns -32601 instead of -32602 #267

Closed

Description

@mcollina

handlePromptsGet (src/handlers.ts) answers an unknown prompt name with -32601 (Method not found). prompts.md, Error Handling: "Invalid prompt name: -32602 (Invalid params)". The method exists; the parameter is wrong.

Repro

prompts/get with { name: 'nope' } → {"code":-32601,"message":"Prompt 'nope' not found"}.

Suggested fix

Return -32602. (Unknown tools and resources use -32601 the same way and may deserve the same look.)

Found during the round-7 review of #170; also on main.

🤖 Generated with Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions