get_function_details
Retrieve detailed information about a specific custom function by providing its name, enabling users to understand and utilize its capabilities within the AI Meta MCP Server's dynamic tool execution framework.
Instructions
Get details of a custom MCP function
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name of the function to get details for |
Implementation Reference
- src/index.ts:493-527 (handler)Handler function that fetches and serializes details of a custom tool by name from the global customTools registry, returning structured JSON or an error if not found.async ({ name }) => { console.error(`Getting details for function: ${name}`); // Check if function exists if (!customTools[name]) { return { isError: true, content: [ { type: "text", text: `No function named "${name}" exists.`, }, ], }; } const tool = customTools[name]; return { content: [ { type: "text", text: JSON.stringify({ name: tool.name, description: tool.description, parameters_schema: tool.inputSchema, execution_environment: tool.executionEnvironment, implementation_code: tool.implementation, created_at: tool.createdAt, updated_at: tool.updatedAt, }, null, 2), }, ], }; }
- src/index.ts:490-492 (schema)Input schema defining the required 'name' parameter as a non-empty string.{ name: z.string().min(1).describe("Name of the function to get details for"), },
- src/index.ts:487-528 (registration)Full registration of the 'get_function_details' tool using server.tool(), including name, description, input schema, and inline handler implementation.server.tool( "get_function_details", "Get details of a custom MCP function", { name: z.string().min(1).describe("Name of the function to get details for"), }, async ({ name }) => { console.error(`Getting details for function: ${name}`); // Check if function exists if (!customTools[name]) { return { isError: true, content: [ { type: "text", text: `No function named "${name}" exists.`, }, ], }; } const tool = customTools[name]; return { content: [ { type: "text", text: JSON.stringify({ name: tool.name, description: tool.description, parameters_schema: tool.inputSchema, execution_environment: tool.executionEnvironment, implementation_code: tool.implementation, created_at: tool.createdAt, updated_at: tool.updatedAt, }, null, 2), }, ], }; } );