list_functions
Discover available custom MCP functions to understand what tools AI models can create and execute within the meta-function architecture.
Instructions
List all custom MCP functions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:464-483 (handler)The handler function for the 'list_functions' tool. It logs the action, maps over customTools to create a list of function metadata (name, description, executionEnvironment, dates), and returns it as a JSON string in the MCP response format.async () => { console.error(`Listing all functions`); const functionList = Object.entries(customTools).map(([name, tool]) => ({ name, description: tool.description, executionEnvironment: tool.executionEnvironment, createdAt: tool.createdAt, updatedAt: tool.updatedAt, })); return { content: [ { type: "text", text: JSON.stringify(functionList, null, 2), }, ], }; }
- src/index.ts:460-484 (registration)The registration of the 'list_functions' tool using server.tool(), including name, description, empty input schema (no parameters), and the handler function.server.tool( "list_functions", "List all custom MCP functions", {}, async () => { console.error(`Listing all functions`); const functionList = Object.entries(customTools).map(([name, tool]) => ({ name, description: tool.description, executionEnvironment: tool.executionEnvironment, createdAt: tool.createdAt, updatedAt: tool.updatedAt, })); return { content: [ { type: "text", text: JSON.stringify(functionList, null, 2), }, ], }; } );
- src/index.ts:463-463 (schema)The input schema for 'list_functions' tool, which is empty object indicating no input parameters required.{},