Table of Contents

Class MetaKeys

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Provides constants for well-known _meta field keys defined by the MCP protocol and its extensions.

public static class MetaKeys
Inheritance
MetaKeys
Inherited Members

Fields

ClientCapabilities

The metadata key used to declare client capabilities in a request's _meta field.

public const string ClientCapabilities = "io.modelcontextprotocol/clientCapabilities"

Field Value

string

Remarks

Introduced by the 2026-07-28 protocol revision (SEP-2575). Carries a ClientCapabilities describing what optional features the client supports for this specific request. Servers MUST NOT infer capabilities from previous requests.

ClientInfo

The metadata key used to identify the client software in a request's _meta field.

public const string ClientInfo = "io.modelcontextprotocol/clientInfo"

Field Value

string

Remarks

Introduced by the 2026-07-28 protocol revision (SEP-2575). Carries an Implementation describing the client; replaces the clientInfo previously sent only with initialize.

LogLevel

The metadata key used to specify the desired log level for a request's resulting log notifications.

public const string LogLevel = "io.modelcontextprotocol/logLevel"

Field Value

string

Remarks

Introduced by the 2026-07-28 protocol revision (SEP-2575). Carries a LoggingLevel. Replaces the legacy LoggingSetLevel RPC. When absent, the server MUST NOT send log notifications for the request.

ProtocolVersion

The metadata key used to carry the MCP protocol version in a request's _meta field.

public const string ProtocolVersion = "io.modelcontextprotocol/protocolVersion"

Field Value

string

Remarks

Introduced by the 2026-07-28 protocol revision (SEP-2575). For HTTP transports, the value MUST match the MCP-Protocol-Version header. Servers reject a header/body mismatch with HeaderMismatch.

RelatedTask

The metadata key used to associate requests, responses, and notifications with a task.

public const string RelatedTask = "io.modelcontextprotocol/related-task"

Field Value

string

Remarks

This constant defines the key "io.modelcontextprotocol/related-task" used in the _meta field to associate messages with their originating task across the entire request lifecycle.

For example, an elicitation that a task-augmented tool call depends on must share the same related task ID with that tool call's task.

For tasks/get, tasks/list, and tasks/cancel operations, this metadata should not be included as the taskId is already present in the message structure.

SubscriptionId

The metadata key used to associate a notification with the request ID of an active SubscriptionsListen subscription.

public const string SubscriptionId = "io.modelcontextprotocol/subscriptionId"

Field Value

string

Remarks

Introduced by the 2026-07-28 protocol revision (SEP-2575). Allows clients to demultiplex notifications belonging to different subscriptions on a shared channel (especially STDIO).