Skip to main content
Glama

search_in_names

Search for names and symbols in binary files to identify functions, data, imports, exports, or labels during reverse engineering analysis.

Instructions

Search for names/symbols in the binary

Input Schema

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

Implementation Reference

  • MCP tool handler for 'search_in_names': validates input arguments, calls IDARemoteClient.searchInNames with pattern and options, formats and returns 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-371 (registration)
    Registration of the 'search_in_names' tool in the MCP server's listTools response, including name, description, and inputSchema 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 the search_in_names tool.
    interface SearchInNamesArgs {
        pattern: string;
        caseSensitive?: boolean;
        type?: 'function' | 'data' | 'import' | 'export' | 'label' | 'all';
    }
  • IDARemoteClient helper method that implements the name search by making an HTTP GET request to the IDA Pro Remote Control server's /search/names endpoint with query parameters for pattern, case sensitivity, and type.
    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()}`);
    }
  • Type guard function for validating SearchInNamesArgs input in the tool handler.
    const isValidSearchInNamesArgs = (args: any): args is SearchInNamesArgs => {
        return (
            typeof args === 'object' &&
            args !== null &&
            typeof args.pattern === 'string'
        );
    };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions searching but doesn't specify what 'names/symbols' encompass (e.g., function names, variable names, imported symbols), how results are returned, whether it's read-only (implied but not stated), or any limitations like performance impact. This leaves significant gaps for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and a tool that performs searches (which could have behavioral nuances like result formats or limitations), the description is incomplete. It doesn't explain what constitutes 'names/symbols', how results are structured, or any constraints, leaving the agent with insufficient context for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional meaning beyond what's in the schema—it doesn't clarify what 'names/symbols' means in relation to the 'type' parameter or provide examples for the 'pattern'. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose as searching for names/symbols in a binary, which is a specific verb+resource combination. However, it doesn't differentiate from sibling tools like get_functions, get_exports, or search_text, which all involve retrieving information from binaries but with different scopes or methods.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like get_functions (retrieves functions), get_exports (retrieves exports), and search_text (searches text), there's no indication of when this name/symbol search is preferred over those more specific tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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