get_exports
Retrieve exported functions and symbols from binary files for reverse engineering analysis in IDA Pro.
Instructions
Get list of exports from the binary
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_exports"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.ts:679-710 (handler)The main handler for the 'get_exports' MCP tool. Validates input arguments, calls ida.getExports() to fetch exports, formats the response as text content with JSON-stringified exports list, or returns an error.
case 'get_exports': if (!isValidGetExportsArgs(request.params.arguments)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid get exports arguments' ); } try { const result = await ida.getExports(); return { content: [ { type: 'text', text: `Retrieved ${result.count} exports from the binary:\n\n${JSON.stringify(result.exports, null, 2) }`, }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Error getting exports: ${error.message || error}`, }, ], isError: true, }; } - index.ts:341-349 (registration)Tool registration in the ListToolsRequestHandler. Defines the tool name 'get_exports', its description, and empty input JSON schema (no parameters required).
{ name: 'get_exports', description: 'Get list of exports from the binary', inputSchema: { type: 'object', properties: {}, required: [], }, }, - index.ts:81-83 (schema)TypeScript interface for GetExportsArgs, indicating no parameters are required for the tool.
interface GetExportsArgs { // No parameters required } - index.ts:160-165 (schema)Type guard function to validate input arguments conform to GetExportsArgs (non-null object).
const isValidGetExportsArgs = (args: any): args is GetExportsArgs => { return ( typeof args === 'object' && args !== null ); }; - idaremoteclient.ts:310-312 (helper)Core helper method in IDARemoteClient that implements getExports by making a GET request to the IDA Pro remote API endpoint '/exports', returning ExportsResponse.
async getExports(): Promise<ExportsResponse> { return this.get<ExportsResponse>('/exports'); }