part…
Building governance for MCP?
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
The gateway applies what the guide teaches: policies on discovery, invocation and authorisation.
Prompts are message templates that the server defines and the user chooses (typically as slash commands). "User-controlled" refers to who decides to use it, not to who writes the content: the content is defined by the server.
{ "capabilities": { "prompts": { "listChanged": true } } }
Same invariants as tools and resources: the set returned by prompts/list does not vary by connection, may vary by authorisation, and may change over time.
prompts/listPageable and cacheable. Returns Prompt[].
prompts/get{ "method": "prompts/get", "params": { "name": "code_review", "arguments": { "code": "def hello():\n print('world')" } } }
Result: description?, messages[]. Arguments support autocompletion (completion/complete with ref/prompt). Supports input_required (MRTR): a prompt may ask the user for additional data before resolving.
notifications/prompts/list_changedTo clients with a listen and promptsListChanged: true.
Promptname, title?, description?, icons?, arguments?: PromptArgument[] (name, description?, required?), _meta?.
PromptMessagerole: user | assistant; content: text, image (base64 + MIME mandatory), audio, resource_link, embedded resource (URI, MIME, text or blob). All with optional annotations.
-32602.-32602.-32603.Servers SHOULD validate arguments; clients SHOULD handle pagination; both respect capabilities. Security: MUST validate inputs and outputs to prevent injection and unauthorised access to resources.
user or assistant: filter it just like tool descriptions, and watch for messages with role assistant that attempt to fix behaviour.1. Who decides when a prompt is used, and who defines its content?
User-controlled refers to who invokes it; the content is defined by the server.
2. Can prompts/get return input_required?
tools/call, resources/read and prompts/get support MRTR.
3. Which code corresponds to a missing required argument?
Invalid params.