Skip to content

Support for Custom Metadata in Tool Specification #1483

Closed

Description

@SurajPandurangaJannu

The current MCP protocol does not allow attaching structured metadata to tools, which limits secure and context-aware execution in enterprise scenarios.

  1. **Is your feature request related to a problem? Please describe.**Currently, the MCP protocol does not support custom metadata in the tool specification. This limitation makes it difficult to handle advanced use cases such as authorization, role-based execution, scope validation, or tool-specific custom logic.
    For example:
    When different users interact with the same tool, some may only be authorized to execute read operations, while others may have permission for write or admin-level operations.
    A tool might require additional contextual metadata such as business unit, region, or tenant configuration to ensure it executes the correct logic.
    Without support for custom metadata, developers are forced to implement workarounds outside the MCP protocol, which increases complexity and reduces interoperability.

  2. Describe the solution you'd like
    I would like the MCP protocol to be extendable to include custom metadata fields within the tool specification.
    Metadata can include keys such as roles, scopes, tenantId, or any custom attributes defined by the implementer. But make sure the schema is flexible for new usecases.
    At runtime, this metadata should be available for validation before tool execution, enabling secure and context-aware execution.
    The protocol should allow metadata to be optional, so basic use cases remain simple while advanced use cases can leverage it when needed.

{
  "name": "generateReport",
  "description": "Generates a report based on input filters",
  "metadata": {
    "roles": ["admin", "report_viewer"],
    "scopes": ["finance.read", "finance.write"],
    "tenantConfig": "multiTenantEnabled",
    "execution": {
      "region": "US-East",
      "priority": "high"
    }
  }
}

  1. Describe alternatives you've considered

Embedding metadata in tool descriptions: Metadata can sometimes be embedded in the description field, but this is not machine-readable and cannot be reliably parsed.
External access control systems: Implementing authorization logic outside the MCP protocol works but results in fragmented responsibility and makes tool portability harder.
Custom wrapper layers: creates a wrapper services around tools to inject metadata, but this increases complexity and reduces standardization.

  1. Additional context
    Adding support for metadata would unlock several scenarios:

Role-based execution – Ensure only users with appropriate roles (e.g., admin) can execute sensitive tools.
Scope validation – Verify that the tool execution aligns with the user's granted scopes (e.g., finance.read vs. finance.write).
Multi-tenant systems – Pass tenant-specific configurations to tools in a standardized way.
Custom execution logic – Metadata could provide hints about execution environment (e.g., region=US-East, priority=high).

This feature would make MCP more secure, flexible, and adaptable to enterprise-grade scenarios where context-aware execution is critical.

Activity

  1. localden commented on Mar 23, 2026

    @localden
    Contributor

    Hi - thanks for putting this together.

    This item has been open for a while without a sponsor stepping forward, so per our SEP Guidelines we're moving it to dormant status and closing the issue.

    Dormant is not rejected. It does not mean we don't want the idea - it means that, at this time, no Maintainer or Core Maintainer has the bandwidth to champion it through the review process. The proposal may still be valid, and dormant SEPs can be revived at any point.

    How to revive this SEP

    1. Bring it to the community. Post in the MCP Contributor Discord and raise it with the relevant working group — this is the single best way to build support and surface a potential sponsor.
    2. Find a sponsor. Tag one or two maintainers from the maintainer list whose area aligns with the proposal.
    3. Submit a new Spec Enhancement Proposal (SEP) once a sponsor is on board, and they'll update the status back to draft.

    If circumstances change, such as finding new use cases, renewed community interest, or a maintainer picking it up, we'd be glad to see this move forward.

    Thanks again for contributing to MCP.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions