@mcp-z/oauth
    Preparing search index...

    Interface McpTool

    MCP tool module definition with configuration and handler function.

    Represents a registered tool in the Model Context Protocol server that can be invoked by MCP clients. Tools are the primary mechanism for executing operations in response to client requests.

    This is the runtime representation of an MCP tool after registration. The handler receives JSON-serializable arguments validated against inputSchema and returns a CallToolResult validated against outputSchema.

    Tools are typically created using tool factory functions and registered with the MCP server during initialization.

    const tool: McpTool = {
    name: "gmail-message-send",
    config: {
    description: "Send an email message",
    inputSchema: { to: { type: "string" }, subject: { type: "string" } },
    outputSchema: { result: { type: "object" } }
    },
    handler: async (args, context) => {
    // Implementation
    return { content: [{ type: "text", text: "Message sent" }] };
    }
    };

    McpPrompt for prompt module definition

    interface McpTool {
        config: {
            description: string;
            inputSchema: Record<string, unknown>;
            outputSchema: Record<string, unknown>;
        };
        handler: (
            args: unknown,
            context?: unknown,
        ) => Promise<{ [key: string]: unknown }>;
        name: string;
    }
    Index

    Properties

    Properties

    config: {
        description: string;
        inputSchema: Record<string, unknown>;
        outputSchema: Record<string, unknown>;
    }

    Tool configuration including description and schemas

    handler: (
        args: unknown,
        context?: unknown,
    ) => Promise<{ [key: string]: unknown }>

    Async function that executes the tool operation

    name: string

    Unique tool identifier (e.g., "gmail-message-send", "sheets-values-get")