Skip to main content
Glama

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
NameRequiredDescriptionDefault
nameYesName of the function to get details for

Implementation Reference

  • 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), }, ], }; }
  • 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), }, ], }; } );

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alxspiker/ai-meta-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server