/** * MCP tool implementation for actgent * This tool represents a single tool from an MCP server */ import { Tool, ToolInput, StringOutput } from "../core/Tool"; import { McpClient } from "../mcp/client"; import { z } from "zod"; /** * Tool input for McpTool representing a single tool on an MCP server */ type McpToolInput = ToolInput & { args?: Record; }; /** * McpTool represents a single tool from an MCP server * It uses its corresponding McpClient to execute the tool on the server */ export declare class McpTool extends Tool { private mcpClient; private toolName; private inputZodSchema; private outputSchema; private logger; /** * Creates a new MCP Tool instance that represents a single tool on an MCP server * @param mcpClient The MCP client connected to the server that hosts this tool * @param toolName Name of the tool on the MCP server * @param description Description of the tool from the MCP server * @param inputSchema Input schema for the tool * @param outputSchema Output schema for the tool */ constructor(mcpClient: McpClient, toolName: string, description: string, inputSchema: any, outputSchema: any); /** * Returns the schema for this tool */ schema(): z.ZodSchema; /** * Converts a JSON schema to a Zod schema, preserving properties and required fields * @param jsonSchema The JSON schema to convert * @returns A Zod schema equivalent to the JSON schema */ private convertJsonSchemaToZod; /** * Executes the tool by calling the corresponding tool on the MCP server * @param input Tool input * @returns Promise that resolves to the tool output */ execute(input: McpToolInput): Promise; } export {};