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');
    }

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