Skip to main content
Glama

get_element_text

Retrieve the full text, type, page, and region of datasheet elements such as headings and paragraphs. Use it to read text-layer content; get table, figure, and formula values from page images.

Instructions

The full text of elements from the text layer, with their type, page and region. Use it for headings and paragraphs. Read table values, figures and formulas from get_page_image: the text layer can lose their structure. The text of a table or figure is only its caption. For a table, figure or formula, the result also gives the call of get_page_image for its image (with the caption label of a table, the call that gives each page of a table that continues on the next pages).

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": {
      "document": "<document>",
      "element_ids": "<element_ids>"
    },
    "name": "get_element_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentYesThe document: its reference from list_documents, project_status or add_document (the first 12 characters of its SHA-256). A longer SHA-256 prefix or the numeric document ID also works.
element_idsYesElement IDs from get_page_map or list_items, for example ["p7.T1", "p7.P3"].

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the disclosure burden and does well: it warns that the text layer can lose structure, that a table or figure's text is only its caption, and that results include the get_page_image call needed for the image. It does not discuss failure modes or limits, but covers the important behavioral caveat.

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?

Front-loaded and mostly efficient, but the final parenthetical ('with the caption label of a table, the call that gives each page of a table that continues on the next pages') is tangled and hard to parse. That sentence could be restructured to earn its place.

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?

An output schema exists, so return values need not be spelled out, and the description still flags the notable extra (embedded get_page_image calls). For a read-only retrieval tool the guidance on source fidelity and sibling routing is sufficient to call it correctly.

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 both parameters are fully documented in the schema, so the description adds no parameter-level detail. Baseline 3 applies; the mention of element types relates to output rather than inputs.

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 concrete verb and resource (retrieves the full text of elements from the text layer) and names the metadata returned: type, page and region. It is immediately distinguishable from get_page_image, which the description explicitly routes table/figure/formula content to.

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 ('headings and paragraphs') and when-not-to-use ('read table values, figures and formulas from get_page_image'), naming the alternative sibling and the reason (structure loss). Little is left to inference.

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