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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.ts:647-677 (handler)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, }; }
- index.ts:77-79 (schema)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: [], }, },
- index.ts:153-158 (schema)Input validation function for get_functions arguments.const isValidGetFunctionsArgs = (args: any): args is GetFunctionsArgs => { return ( typeof args === 'object' && args !== null ); };
- idaremoteclient.ts:326-328 (helper)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'); }