Skip to main content
Glama

get_functions

Extract a list of functions from a binary file using IDA Pro integration, enabling streamlined reverse engineering and analysis workflows.

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 using isValidGetFunctionsArgs, calls ida.getFunctions() to retrieve functions from IDA Pro, formats the response as text content with JSON stringified functions list, handles errors.
    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, }; }
  • Delegated handler implementation in IDARemoteClient: performs HTTP GET request to IDA Pro remote API endpoint '/functions' to fetch the list of functions.
    /** * Get functions from the binary * @returns List of functions in the binary */ async getFunctions(): Promise<FunctionsResponse> { return this.get<FunctionsResponse>('/functions'); }
  • TypeScript interface defining the input schema for get_functions tool arguments (no required parameters).
    interface GetFunctionsArgs { // No parameters required }
  • index.ts:333-340 (registration)
    Tool registration in the ListTools response: defines name 'get_functions', description, and empty input schema.
    name: 'get_functions', description: 'Get list of functions from the binary', inputSchema: { type: 'object', properties: {}, required: [], }, },
  • Helper function to validate if provided arguments match the GetFunctionsArgs type (accepts any non-null object).
    const isValidGetFunctionsArgs = (args: any): args is GetFunctionsArgs => { return ( typeof args === 'object' && args !== null ); };

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

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