Class McpTool
Represents a tool exposed by a Model Context Protocol (MCP) server.
Instances of this class are thin wrappers over the server's tool metadata and
delegate execution to the owning McpClient via the
tools/call
JSON-RPC method.
Spec reference: https://modelcontextprotocol.io/specification/2025-06-18/server/tools#tool
public sealed class McpTool : ITool
- Inheritance
-
McpTool
- Implements
- Inherited Members
Properties
- Annotations
Optional behavioral hints for presentation and policy.
These are hints only and MUST NOT be used as the sole basis for security decisions. See schema defaults and fields: https://modelcontextprotocol.io/specification/2025-06-18/schema#toolannotations
- IsEnabled
Enables or disables this tool at runtime (framework-level gating).
Not part of the MCP wire spec; used by hosts to temporarily suppress tool execution without unregistering it.
- OutputSchema
Optional JSON Schema (as text) describing the tool's output shape.
This is a hint for clients/agents to validate or render the tool result. If empty (
""
), consumers should not assume an output contract.