Skip to content

Prompts - Metadata attributes in prompt registration, similar to resource metadata or tool annotations #703

Closed

Description

@KKonstantinov

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.

Activity

  1. KKonstantinov commented on Jun 27, 2025

    @KKonstantinov
    ContributorAuthor

    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()),

    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.

  2. added
    needs designValid issue but needs maintainer alignment on design or approach
    P3Nice to haves, rare edge cases
    v2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
    on Dec 16, 2025
  3. felixweinberger commented on Dec 16, 2025

    @felixweinberger
    Contributor

    @KKonstantinov is this still something you'd like to see for v2?

  4. added
    needs decisionIssue is actionable, needs maintainer decision on whether to implement
    and removed
    needs designValid issue but needs maintainer alignment on design or approach
    on Apr 15, 2026
  5. felixweinberger commented on Oct 5, 2026

    @felixweinberger
    Contributor

    registerPrompt() accepts _meta since 2.0.0 (#1629). Closing.

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

    P3Nice to haves, rare edge casesenhancementRequest for a new feature that's not currently supportedneeds decisionIssue is actionable, needs maintainer decision on whether to implementv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixes

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions