Skip to main content
Glama

Search the rendered listing

search_text
Read-only

Search IDA's rendered disassembly and comments for a text pattern or regex, scoped by start/end addresses to find code in large binaries.

Instructions

Search the rendered listing for pattern over [start, end).

Iterates idautils.Heads() in pure Python and renders each via ida_lines.generate_disassembly(). Per-head iteration is cheap and yields between heads, so the per-tool deadline (sync_wrapper) and the UI Cancel button both interrupt the walk reliably — unlike the C-level ida_search.find_text() it replaced, which on huge .text segments could run for minutes without polling user_cancelled().

Use start/end to scope the work for predictable performance on large binaries; without them the scan covers the whole image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoUpper bound (hex or symbol, exclusive). Empty = last segment.
limitNoMax hits per page (default: 30, max: 500)
regexNoTreat pattern as a Python regex
startNoLower bound (hex or symbol). Empty = first segment.
includeNo'disasm' | 'comments' | 'all' (default: all)all
patternYesText to search for in the rendered listing (literal substring by default)
code_onlyNoRestrict search to executable segments (default: true)
instance_idNoOptional database instance id. If omitted, use the current target.
case_sensitiveNoCase-sensitive match (default: false)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nNo
hitsNo
errorNo
cursorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv20261008.0.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, so safety is covered, and the description adds real behavioral context: the walk is pure-Python, interruptible by the sync deadline and UI Cancel, unlike the C-level find_text it replaced. This is genuinely useful for predicting responsiveness on large .text segments, though return/pagination behavior is not discussed.

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

Conciseness3/5

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

The first sentence is well front-loaded. The second paragraph is largely implementation backstory about Python iteration vs the C-level replacement, which explains interruption behavior but is longer than needed for a tool-selection description.

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

Completeness4/5

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

With an output schema present, return values need not be described, and schema coverage is complete. The description supplies the performance and interruption context an agent needs for a large-binary scan; it is close to complete, missing only explicit sibling routing.

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 baseline is 3; the schema already documents pattern, start, end, limit, regex, include, code_only, instance_id, and case_sensitive. The description reinforces start/end scoping intent but adds no format or syntax detail beyond the schema.

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?

States a specific verb and resource ('Search the rendered listing for pattern over [start, end)') and clarifies the search space is the rendered text, not raw bytes. It does not explicitly distinguish itself from siblings like find_regex or find_bytes, which a caller would need to choose between.

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

Usage Guidelines3/5

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

Gives a clear condition for scoping work ('Use start/end ... without them the scan covers the whole image'), which is useful for large binaries. However it offers no guidance on when to prefer this tool over find_regex, find, or find_bytes, so the alternative-selection problem is left implicit.

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