@modelcontextprotocol/sdk
    Preparing search index...

    Interface Tool

    Definition for a tool the client can call.

    interface Tool {
        _meta?: { [key: string]: unknown };
        annotations?: ToolAnnotations;
        description?: string;
        icons?: Icon[];
        inputSchema: {
            properties?: { [key: string]: object };
            required?: string[];
            type: "object";
        };
        name: string;
        outputSchema?: {
            properties?: { [key: string]: object };
            required?: string[];
            type: "object";
        };
        title?: string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    _meta?: { [key: string]: unknown }

    See General fields: _meta for notes on _meta usage.

    annotations?: ToolAnnotations

    Optional additional tool information.

    Display name precedence order is: title, annotations.title, then name.

    description?: string

    A human-readable description of the tool.

    This can be used by clients to improve the LLM's understanding of available tools. It can be thought of like a "hint" to the model.

    icons?: Icon[]

    Optional set of sized icons that the client can display in a user interface.

    Clients that support rendering icons MUST support at least the following MIME types:

    • image/png - PNG images (safe, universal compatibility)
    • image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility)

    Clients that support rendering icons SHOULD also support:

    • image/svg+xml - SVG images (scalable but requires security precautions)
    • image/webp - WebP images (modern, efficient format)
    inputSchema: {
        properties?: { [key: string]: object };
        required?: string[];
        type: "object";
    }

    A JSON Schema object defining the expected parameters for the tool.

    name: string

    Intended for programmatic or logical use, but used as a display name in past specs or fallback (if title isn't present).

    outputSchema?: {
        properties?: { [key: string]: object };
        required?: string[];
        type: "object";
    }

    An optional JSON Schema object defining the structure of the tool's output returned in the structuredContent field of a CallToolResult.

    title?: string

    Intended for UI and end-user contexts — optimized to be human-readable and easily understood, even by those unfamiliar with domain-specific terminology.

    If not provided, the name should be used for display (except for Tool, where annotations.title should be given precedence over using name, if present).