get_function_details
Retrieve details about custom MCP functions, including their input schema and runtime specifications, to understand how to use them effectively within the AI Meta MCP Server environment.
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 retrieves and returns detailed information about a custom MCP function by name from the customTools registry, including schema, code, and timestamps.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 for the get_function_details tool, requiring a 'name' string parameter.{ name: z.string().min(1).describe("Name of the function to get details for"), },
- src/index.ts:487-528 (registration)Registration of the get_function_details tool with the MCP server using server.tool, including name, description, schema, and inline handler.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), }, ], }; } );