You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prompts - Metadata attributes in prompt registration, similar to resource metadata or tool annotations #703
Is your feature request related to a problem? Please describe.
Tools currently support annotations (which can be predefined, but additional annotations can be added), and resources support metadata.
However, Prompts do not have any way to send additional data, for example "tag" them somehow.
An example use case is when you want to send a list of Prompts to the MCP client, and the client will then use the data to render them to the end user in the UI, for example prompts can be categorized via metadata, otherwise it's just a big list that the UI would receive.
Describe the solution you'd like
Add metadata/annotations to prompts similar to tools/resources.
Describe alternatives you've considered
Sending a json-encoded string in the prompt description is a bad workaround and not a real solution. With the current prompt arguments, there is no way to send extra metadata from the server to the client.
_meta could potentially be used for this, even though it's not part of the prompt definition, but rather the prompt response (e.g. alongside content).
I'd like some clarity / confirmation if _meta is intended to be used in such a manner.
If _meta is the one to use here instead of having something on the prompt definition; quick side comment then is the MCP spec does enforce _meta key name standards which the SDK does not enforce. Could we then add zod validations, as currently the SDK only has _meta: z.optional(z.object({}).passthrough()),
Key name format: valid _meta key names have two segments: an optional prefix, and a name.
Prefix:
If specified, MUST be a series of labels separated by dots (.), followed by a slash (/).
Labels MUST start with a letter and end with a letter or digit; interior characters can be letters, digits, or hyphens (-).
Any prefix beginning with zero or more valid labels, followed by modelcontextprotocol or mcp, followed by any valid label, is reserved for MCP use.
For example: modelcontextprotocol.io/, mcp.dev/, api.modelcontextprotocol.org/, and tools.mcp.com/ are all reserved.
Activity
KKonstantinov commentedon Jun 27, 2025
A further question on this would be:
_meta could potentially be used for this, even though it's not part of the prompt definition, but rather the prompt response (e.g. alongside content).
I'd like some clarity / confirmation if _meta is intended to be used in such a manner.
If _meta is the one to use here instead of having something on the prompt definition; quick side comment then is the MCP spec does enforce _meta key name standards which the SDK does not enforce. Could we then add zod validations, as currently the SDK only has
_meta: z.optional(z.object({}).passthrough()),felixweinberger commentedon Dec 16, 2025
@KKonstantinov is this still something you'd like to see for v2?
felixweinberger commentedon Oct 5, 2026
registerPrompt()accepts_metasince 2.0.0 (#1629). Closing.