Skip to main content
Glama

search_in_names

Locate specific names or symbols in a binary file using customizable search parameters, including pattern matching and case sensitivity, to streamline reverse engineering tasks in IDA Pro.

Instructions

Search for names/symbols in the binary

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseSensitiveNoWhether the search is case sensitive (default: false)
patternYesPattern to search for in names
typeNoType of names to search for (function, data, import, export, label, all)

Implementation Reference

  • MCP tool handler for 'search_in_names': validates input using isValidSearchInNamesArgs, calls ida.searchInNames with pattern and options, formats and returns the search results as text content.
    case 'search_in_names': if (!isValidSearchInNamesArgs(request.params.arguments)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid search in names arguments' ); } try { const { pattern, caseSensitive, type } = request.params.arguments; const result = await ida.searchInNames(pattern, { caseSensitive, type: type as 'function' | 'data' | 'import' | 'export' | 'label' | 'all' }); return { content: [ { type: 'text', text: `Found ${result.count} names matching "${pattern}":\n\n${JSON.stringify(result.results, null, 2) }`, }, ], }; } catch (error: any) { return { content: [ { type: 'text', text: `Error searching in names: ${error.message || error}`, }, ], isError: true, }; }
  • index.ts:350-370 (registration)
    Registration of the 'search_in_names' tool in the listTools response, including name, description, and input schema definition.
    { name: 'search_in_names', description: 'Search for names/symbols in the binary', inputSchema: { type: 'object', properties: { pattern: { type: 'string', description: 'Pattern to search for in names', }, caseSensitive: { type: 'boolean', description: 'Whether the search is case sensitive (default: false)', }, type: { type: 'string', description: 'Type of names to search for (function, data, import, export, label, all)', }, }, required: ['pattern'], },
  • TypeScript interface defining the input arguments for search_in_names tool.
    interface SearchInNamesArgs { pattern: string; caseSensitive?: boolean; type?: 'function' | 'data' | 'import' | 'export' | 'label' | 'all'; }
  • Validator function to check if arguments match SearchInNamesArgs type, used in the tool handler.
    const isValidSearchInNamesArgs = (args: any): args is SearchInNamesArgs => { return ( typeof args === 'object' && args !== null && typeof args.pattern === 'string' ); };
  • Core implementation of searchInNames in IDARemoteClient: constructs query parameters and makes HTTP GET request to /search/names endpoint.
    async searchInNames( pattern: string, options: { caseSensitive?: boolean; type?: 'function' | 'data' | 'import' | 'export' | 'label' | 'all'; } = {} ): Promise<NameSearchResponse> { const params = new URLSearchParams(); params.append('pattern', pattern); if (options.caseSensitive !== undefined) { params.append('case_sensitive', options.caseSensitive.toString()); } if (options.type !== undefined) { params.append('type', options.type); } return this.get<NameSearchResponse>(`/search/names?${params.toString()}`); }

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