Skip to main content
Glama

find_text

Locate where a known string appears on a plan sheet by case-insensitive match, returning coordinates to find a room number or label before measuring its polygon.

Instructions

LOCATE a known string on a sheet — the complement to read_sheet_text (which returns what a region SAYS; this finds WHERE a string you already know sits). Case-insensitive substring match against each pdf.js text run, so a room label split across runs ("OFFICE" then "134" as separate items) needs a find_text call per fragment, or read_sheet_text over a region to see the whole thing joined. Every hit tells you which room a polygon belongs to — the locate-then-trace workflow: find_text the room number, then measure_polygon (One-Click is temporarily gated on this server) on that room's wall faces. Optionally restrict to a region {x0, y0, x1, y1}; results cap at limit (default 200), with count/truncated telling you exactly how much a tighter region or higher limit would recover. Coordinates are image px at render scale 2.0: PDF pt × 2, origin top-left, y down (the browser canvas's native space). Sheet payloads carry dims in both px and pt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesText to find — a room number ('134'), a label fragment ('RECEPTION'), a schedule tag ('CPT-1')
limitNoMax hits returned
sheetYes
regionNoRect in image px (origin top-left, y down); omit for the full sheet

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYes
hitsYes
countYesTotal matches before the limit cap
sheetYes
truncatedYestrue = count exceeds hits.length; narrow the region or raise limit

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.6

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden, and it does well: it discloses case-insensitivity, substring matching against pdf.js text runs, the room-label-split-across-runs caveat, the limit default of 200 and truncation/count behavior, and the coordinate system (image px, scale 2.0, PDF pt × 2, top-left origin, y down). It also flags that measure_polygon's One-Click is temporarily gated. Minor remaining gap: no explicit statement of auth/permission requirements or whether it mutates anything (though 'find' strongly implies read-only).

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

Conciseness4/5

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

Front-loads purpose with the complement contrast first, then behavior, then the workflow, then coordinates. Sized appropriately for a tool with four parameters and non-obvious coordinate semantics, though it is dense and slightly long-winded in places (the room-label split example runs long).

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

Completeness5/5

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

Given the tool's complexity (nested region object, coordinate scale, truncation semantics) and that an output schema exists so return values need not be re-explained, the description covers everything an agent needs: what it finds, how matching works, how to scope, how the cap works, and the coordinate frame. Nothing material is missing.

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

Parameters4/5

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

Schema coverage is 75%, high enough that the schema carries the heavy lifting (q, limit, region bounds all documented). The description still adds value: it clarifies the optional region syntax idea and the meaning of count/truncated in relation to limit, and reiterates the coordinate space. Not a full 5 because the region's numeric bounds are only in the schema, not elaborated in the description.

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

Purpose5/5

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

States a specific verb (LOCATE) and resource (a known string on a sheet), and explicitly positions it as the complement to the sibling read_sheet_text with a parenthetical contrast. An agent can immediately distinguish the two tools.

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

Usage Guidelines5/5

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

Gives explicit when-to-use (you already know the string and want its location), when-not (read_sheet_text returns what a region SAYS), and even the locate-then-trace workflow chaining into measure_polygon. No inference required.

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