Skip to content

Function: toMcpTool()

Makaio Framework


Makaio Framework / tools-core / toMcpTool

toMcpTool(tool): McpToolDefinition

Defined in: ../../../tools/core/src/export.ts:110

Converts a ToolDefinition to MCP tool format.

AnyToolDefinition

Makaio tool definition

McpToolDefinition

MCP-compatible tool definition

const mcpTool = toMcpTool(readFileTool);
// Result:
// {
// name: 'readFile',
// description: 'Reads a file from the filesystem',
// inputSchema: { type: 'object', properties: { path: { type: 'string' } }, ... },
// annotations: { readOnly: true }
// }