Skip to main content
Glama
alxspiker

AI Meta MCP Server

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),
            },
          ],
        };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Get details') but doesn't describe traits like whether it's read-only (implied but not explicit), error handling for invalid names, or response format (e.g., returns JSON with function properties). This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence ('Get details of a custom MCP function') that directly states the purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks context on usage, behavioral details, or output, which are needed for full completeness in a server with multiple function-related tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the 'name' parameter documented as 'Name of the function to get details for'. The description adds no additional meaning beyond this, such as format examples or constraints, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('details of a custom MCP function'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_functions' (which might return summaries vs. detailed information) or 'define_function' (which creates vs. retrieves), missing the specific distinction needed for a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios like retrieving metadata for a known function name, nor does it contrast with 'list_functions' for browsing or 'update_function' for modifications, leaving the agent without usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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