The MCP C# SDK provides strongly-typed representations of all Model Context Protocol types defined in the specification.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/modelcontextprotocol/csharp-sdk/llms.txt
Use this file to discover all available pages before exploring further.
Namespace
Core Protocol Types
Tool
Represents a tool that the server is capable of calling.Properties
The unique identifier for the tool.
A human-readable display name for the tool.
A human-readable description of the tool that helps AI models understand what the tool does and when to use it.
A JSON Schema object defining the expected parameters for the tool. Must be a valid JSON Schema object with “type” property set to “object”.
A JSON Schema object defining the expected structured outputs for the tool. Describes the shape of data returned in
CallToolResult.StructuredContent.Optional additional tool information and behavior hints, such as whether the tool is read-only, destructive, idempotent, or operates in an open world.
Execution-related metadata for this tool, particularly regarding task augmentation support.
An optional list of icons for this tool.
Example
Prompt
Represents a prompt that the server offers.Properties
The unique identifier for the prompt.
A human-readable display name for the prompt.
An optional description of what this prompt provides.
A list of arguments that this prompt accepts for templating and customization.
An optional list of icons for this prompt.
Example
Resource
Represents a known resource that the server is capable of reading.Properties
The unique identifier for the resource.
A human-readable display name for the resource.
The URI of this resource.
A description of what this resource represents.
The MIME type of this resource (e.g., “text/plain”, “application/json”, “image/png”).
Optional annotations specifying the intended audience (User, Assistant, or both) and priority level.
The size of the raw resource content (before base64 encoding), in bytes, if known.
An optional list of icons for this resource.
Example
ResourceTemplate
Represents a known resource template that the server is capable of reading.Properties
The unique identifier for the resource template.
The URI template (according to RFC 6570) that can be used to construct resource URIs.
A description of what this resource template represents.
The MIME type of resources generated from this template.
Gets a value that indicates whether UriTemplate contains any template expressions.
Example
Content Types
ContentBlock
Base class for different types of content in MCP messages.Derived Types
TextContentBlock: Plain text contentImageContentBlock: Base64-encoded image dataAudioContentBlock: Base64-encoded audio dataEmbeddedResourceContentBlock: Reference to an embedded resource
Example
PromptMessage
Represents a message within the Model Context Protocol system.The content of the message, which can be text, image, audio, or an embedded resource.
The role of the message sender (User or Assistant).
Example
Result Types
CallToolResult
Represents the result of a tool call request.The response content from the tool call.
An optional JSON object representing the structured result of the tool call.
Indicates whether the tool call was unsuccessful. When
true, the tool execution failed and details are in the Content property.The task data for newly created task (task-augmented tool calls only).
Example - Success
Example - Error
GetPromptResult
Represents the result of a prompt retrieval request.The messages that make up the prompt.
An optional description of the prompt.
ReadResourceResult
Represents the result of a resource read request.The contents of the resource.
Enumerations
Role
Specifies the role of a message sender.McpErrorCode
Standard MCP error codes.Request and Notification Methods
RequestMethods
Constants for MCP request method names.NotificationMethods
Constants for MCP notification method names.See Also
- McpClient - Client class using these protocol types
- MCP Specification Schema - Official protocol specification