Skip to main content
Glama

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

Implementation Reference

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

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