Skip to main content
Glama

find_text

Read-onlyIdempotent

Locate room numbers, labels, and note fragments by searching a sheet's text layer, returning exact bounding boxes and centers; falls back to OCR words on scanned pages.

Instructions

Search a sheet's TEXT LAYER — deterministic locate, no vision. Room numbers and labels on a CAD-exported plan are text with exact positions; this finds them by lookup instead of hunting a raster. Returns each match's normalized bbox and center. On a scanned page with no text layer it searches the plan index's OCR words instead (text_source:'ocr'; check digits on a crop). count: 0 for text you can SEE in a render = no text layer and no OCR hit. Also takes the open-source OpenTakeoff server's arguments (sheet, region): sheet keys or numbers, image px at render scale 2, finish tags.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "q": "<q>",
      "sheet": "<sheet>"
    },
    "name": "find_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYestext to find — a room number ('116'), label ('RECEPTION'), or note fragment; case-insensitive
limitNomax matches (default 200)
sheetYesA sheet key ("plan.pdf#2") or sheet number ("A-101"); sheet_id is accepted in its place.
regionNoRect in image px (origin top-left, y down); omit for the full sheet
sheet_idNosheet key — any page of an uploaded source (same as sheet; give one)
project_idNoThe project to work on (list_projects names them). Optional for the open-source arguments: the project the last call named (load_plan makes one) is used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changedv1.0.23
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / limit / default
      Removed value: -200
    • changedInput schema / properties / limit / description
      Previous value: -"Max hits returned"New value: +"max matches (default 200)"
    • changedInput schema / properties / limit / maximum
      Previous value: -2000New value: +500
    • addedInput schema / properties / project_id
      Added value: +{
      +  "description": "The project to work on (list_projects names them). Optional for the open-source arguments: the project the last call named (load_plan makes one) is used.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / q / description
      Previous value: -"Text to find — a room number ('134'), a label fragment ('RECEPTION'), a schedule tag ('CPT-1')"New value: +"text to find — a room number ('116'), label ('RECEPTION'), or note fragment; case-insensitive"
    • addedInput schema / properties / sheet / description
      Added value: +"A sheet key (\"plan.pdf#2\") or sheet number (\"A-101\"); sheet_id is accepted in its place."
    • addedInput schema / properties / sheet_id
      Added value: +{
      +  "description": "sheet key — any page of an uploaded source (same as sheet; give one)",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "sheet",
      -  "q"
      -]New value: +[
      +  "q",
      +  "sheet"
      +]
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "count": {
      -      "description": "Total matches before the limit cap",
      -      "maximum": 9007199254740991,
      -      "minimum": -9007199254740991,
      -      "type": "integer"
      -    },
      -    "hits": {
      -      "items": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "bbox": {
      -            "additionalItems": false,
      -            "description": "[x0, y0, x1, y1] image px",
      -            "items": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "number"
      -              }
      -            ],
      -            "maxItems": 4,
      -            "minItems": 4,
      -            "type": "array"
      -          },
      -          "center": {
      -            "additionalItems": false,
      -            "description": "Bbox center, image px — feed straight into one_click's seed",
      -            "items": [
      -              {
      -                "type": "number"
      -              },
      -              {
      -                "type": "number"
      -              }
      -            ],
      -            "maxItems": 2,
      -            "minItems": 2,
      -            "type": "array"
      -          },
      -          "str": {
      -            "description": "The matched pdf.js text run, verbatim (may be shorter than the full label — runs aren't merged into lines)",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "str",
      -          "bbox",
      -          "center"
      -        ],
      -        "type": "object"
      -      },
      -      "type": "array"
      -    },
      -    "q": {
      -      "type": "string"
      -    },
      -    "sheet": {
      -      "type": "string"
      -    },
      -    "truncated": {
      -      "description": "true = count exceeds hits.length; narrow the region or raise limit",
      -      "type": "boolean"
      -    }
      -  },
      -  "required": [
      -    "sheet",
      -    "q",
      -    "count",
      -    "truncated",
      -    "hits"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed6 schema fields changedv0.1.31
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / region / additionalProperties
      Removed value: -false
    • addedOutput schema / properties / count / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / count / minimum
      Added value: +-9007199254740991
    • addedOutput schema / properties / hits / items / properties / bbox / additionalItems
      Added value: +false
    • addedOutput schema / properties / hits / items / properties / center / additionalItems
      Added value: +false
  3. Addedv0.1.6

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-destructive and closed-world, so the description's added value is in the fallback chain: it silently switches to the plan index's OCR words with text_source:'ocr' and warns to verify digits on a crop. That is real behavior an agent could not derive from the annotations, though nothing is said about match ceiling behavior beyond the schema or about ordering of results.

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 core purpose is front-loaded and dense with useful detail, but the closing sentence ('Also takes the open-source OpenTakeoff server's arguments (sheet, region): sheet keys or numbers, image px at render scale 2, finish tags') is compressed to the point of opacity, and 'finish tags' is unexplained jargon that costs the reader more than it gives.

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?

For a six-parameter tool with a nested region object and no output schema, the description covers the return shape (bbox and center), the OCR fallback, the zero-match interpretation, and the project_id defaulting to the last named project. What remains unstated is result ordering and whether limit truncation is silently applied, which matters for paging through many room numbers.

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 coverage is 100% and every parameter carries its own description, so the schema does the heavy lifting. The description adds marginal context by noting region coordinates are image px at render scale 2 and that sheet accepts keys or numbers, but it does not explain q matching semantics beyond what the schema already says, nor the practical effect of limit.

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 a sheet's TEXT LAYER for text by lookup, returning each match's normalized bbox and center. It clearly distinguishes itself from raster/vision search ('deterministic locate, no vision... instead of hunting a raster'), but never names or contrasts the closest sibling, read_sheet_text, so the differentiation is behavioral rather than explicit.

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

Usage Guidelines4/5

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

Supplies a concrete use case (room numbers and labels on a CAD-exported plan) and explains fallback behavior on scanned pages when no text layer exists, plus how to interpret count:0 when text is visible in a render. It stops short of naming alternative tools for those cases, leaving the agent to infer whether read_sheet_text or OCR inspection is the better next call.

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

Deploy Server

Other Tools