Skip to content

Commit 34cda5c

Browse files
authored
Merge pull request modelcontextprotocol#733 from modelcontextprotocol/basil/meta_key_language
add _meta key format guidance to schema.ts
2 parents db809ae + 133cdec commit 34cda5c

File tree

3 files changed

+81
-46
lines changed

3 files changed

+81
-46
lines changed

docs/specification/draft/basic/index.mdx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Overview
33
---
44

5+
<div id="enable-section-numbers" />
6+
57
<Info>**Protocol Revision**: draft</Info>
68

79
The Model Context Protocol consists of several key components that work together:
@@ -116,3 +118,29 @@ There is also a
116118
[JSON Schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/draft/schema.json),
117119
which is automatically generated from the TypeScript source of truth, for use with
118120
various automated tooling.
121+
122+
### General fields
123+
124+
#### `_meta`
125+
126+
The `_meta` property/parameter is reserved by MCP to allow clients and servers
127+
to attach additional metadata to their interactions.
128+
129+
Certain key names are reserved by MCP for protocol-level metadata, as specified below;
130+
implementations must not make assumptions about values at these keys.
131+
132+
Additionally, definitions in the [schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/draft/schema.ts)
133+
may reserve particular names for purpose-specific metadata, as declared in those definitions.
134+
135+
**Key name format:** valid `_meta` key names have two segments: an optional **prefix**, and a **name**.
136+
137+
**Prefix:**
138+
139+
- If specified, must be a series of labels separated by dots (`.`), followed by a slash (`/`).
140+
- Labels must start with a letter and end with a letter or digit; interior characters can be letters, digits, or hyphens (`-`).
141+
- The `modelcontextprotocol.[*]/` and `mcp.[*]/` prefixes are reserved for MCP use (where `[*]` stands for any top-level domain).
142+
143+
**Name:**
144+
145+
- Unless empty, must begin and end with an alphanumeric character (`[a-z0-9A-Z]`).
146+
- Could contain hyphens (`-`), underscores (`_`), dots (`.`), and alphanumerics in between.

schema/draft/schema.json

Lines changed: 38 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)