Skip to content
{mcpdesc}

Use valid metadata key names

MCP metadata keys follow a grammar for an optional dotted prefix and a local name. Check separators and permitted characters when a key is rejected. Reserved-name context and value checks are separate from this key-format check.

A _meta key has an optional prefix of dot-separated labels followed by a slash, and a name that begins and ends with an alphanumeric character.

Rule ID: mcp.meta.key-format
Owner: mcp
Surface: _meta
Kind: structural
Requirement level: must
Protocol versions: independent of the MCP protocol version
Document schema locations: #/$defs/metaObject
Status: internal · Enforcement: internal

  • MCP Description 0.9.0, Section 3.5 (the same grammar applies in every protocol version)

The document schema rejects malformed keys first; the semantic key check applies only to direct callers of the semantic validator.

Source: expected-invalid/meta-key-invalid.json · Selected: /tools/0

{
"name": "inspect",
"inputSchema": {
"type": "object"
},
"_meta": {
"com.example/bad key": true
}
}

meta.yaml at immutable tag v0.9.0-rc.3.