Interface IMCPSchema

Interface for the MCP schema, defining the structure and behavior of an MCP.

interface IMCPSchema {
    callbacks?: Partial<IMCPCallbacks>;
    callTool: <T extends { [x: string]: unknown } = { [x: string]: unknown }>(
        toolName: string,
        dto: IMCPToolCallDto<T>,
    ) => Promise<MCPToolOutput>;
    docDescription?: string;
    listTools: (clientId: string) => Promise<IMCPTool<unknown>[]>;
    mcpName: string;
}

Properties

callbacks?: Partial<IMCPCallbacks>

Optional callbacks for MCP lifecycle events.

callTool: <T extends { [x: string]: unknown } = { [x: string]: unknown }>(
    toolName: string,
    dto: IMCPToolCallDto<T>,
) => Promise<MCPToolOutput>

Function to call a specific tool with the provided parameters.

docDescription?: string

Optional description of the MCP for documentation.

listTools: (clientId: string) => Promise<IMCPTool<unknown>[]>

Function to list available tools for a client.

mcpName: string

Unique name of the MCP.