Skip to main content
Glama

get_functions

Retrieve all function names from a binary file for reverse engineering analysis in IDA Pro.

Instructions

Get list of functions from the binary

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_functions': validates input arguments and delegates to ida.getFunctions() to retrieve the list of functions, formats the response.
    case 'get_functions':
        if (!isValidGetFunctionsArgs(request.params.arguments)) {
            throw new McpError(
                ErrorCode.InvalidParams,
                'Invalid get functions arguments'
            );
        }
    
        try {
            const result = await ida.getFunctions();
    
            return {
                content: [
                    {
                        type: 'text',
                        text: `Retrieved ${result.count} functions from the binary:\n\n${JSON.stringify(result.functions, null, 2)
                            }`,
                    },
                ],
            };
        } catch (error: any) {
            return {
                content: [
                    {
                        type: 'text',
                        text: `Error getting functions: ${error.message || error}`,
                    },
                ],
                isError: true,
            };
        }
  • Type definition for input arguments of get_functions tool (empty object).
    interface GetFunctionsArgs {
        // No parameters required
    }
  • index.ts:333-340 (registration)
    Tool registration in the MCP server: defines name, description, and input schema for listTools response.
        name: 'get_functions',
        description: 'Get list of functions from the binary',
        inputSchema: {
            type: 'object',
            properties: {},
            required: [],
        },
    },
  • Input validation function for get_functions arguments.
    const isValidGetFunctionsArgs = (args: any): args is GetFunctionsArgs => {
        return (
            typeof args === 'object' &&
            args !== null
        );
    };
  • Client method that performs the HTTP GET request to the IDA Remote API endpoint /functions to fetch function list.
    async getFunctions(): Promise<FunctionsResponse> {
        return this.get<FunctionsResponse>('/functions');
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a read-only operation ('Get'), but doesn't disclose details like whether it returns all functions, includes metadata, has pagination, requires specific binary states, or handles errors. For a tool with zero annotation coverage, this is inadequate transparency.

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 that directly states the tool's purpose without any fluff or redundancy. It is front-loaded and every word earns its place, making it highly concise and well-structured for quick comprehension.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool in this context. It doesn't explain what the returned list includes (e.g., function names, addresses, signatures), how it behaves with different binary types, or potential limitations. For a tool among siblings that perform complex binary analysis, more context is needed.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, and since there are none, it doesn't need to compensate for schema gaps. A baseline of 4 is applied as the description doesn't introduce confusion about non-existent parameters.

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 'Get list of functions from the binary' clearly states the verb ('Get') and resource ('functions from the binary'), making the purpose immediately understandable. It distinguishes from siblings like get_exports or get_strings by specifying functions, though it doesn't explicitly contrast with get_disassembly which might also involve functions.

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 prerequisites, context (e.g., after loading a binary), or comparisons to siblings like get_disassembly or search_in_names that might overlap with function retrieval. This leaves the agent without explicit usage direction.

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/fdrechsler/mcp-server-idapro'

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