Skip to main content
Glama

read_element

Read-onlyIdempotent

Read cached OCR element data by job ID and element index, paging through text, metadata, or table sections without new API calls.

Instructions

分页读取缓存字段,无API调用。xParse的section可选element/text/objects/char_details/metadata/table_structure/page;VLM用element读原始chunk、text读文本、metadata读非text字段、page读原始图像元数据(不含分块列表)。从offset=0开始,保持job_id/element_index/section,按返回next_offset续读至null;不要按limit推算位置。顺序拼接content,仅format=json时解析JSON,format=text直接保留文本。complete只表示本次返回包含整个字段,不能作为续页停止条件。offset为字符位置,limit最多8000,单次可能更短。VLM坐标方向未作映射;置信度、方向、标签不能直接当作批改结论。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
job_idYes
offsetNo
sectionNotext
element_indexYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description adds substantial context they cannot: no API calls (served from cache), the subtle meaning of complete (covers only this return, not the field), truncation behavior with limit, and a caveat that VLM coordinates are unmapped and confidence/direction/labels must not be treated as grading conclusions.

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?

Dense but front-loaded and mostly earns its length, since nearly every clause is an invocation rule. It is on the verbose side (backend section mapping, pagination, format handling, caveats all in one block) and could be tightened, but nothing is purely redundant.

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?

An output schema exists, so return-shape explanation is not required, and the description covers everything else an agent needs: section selection, pagination loop, JSON vs text handling, and the VLM interpretation caveats. Nothing required for correct invocation is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry the load, and it does: offset is defined as a character position, limit's max is 8000 with a note that a single return may be shorter, and section is fully enumerated with per-value meaning. The two required identifiers are covered by the instruction to keep job_id/element_index stable across pages.

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 and resource (paged reading of cached element fields, no API calls) and immediately scopes it by enumerating the selectable sections for both xParse and VLM backends. An agent can tell this apart from sibling readers like read_document or read_evidence without inspecting either schema.

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 routing: which section to use per backend (element/text/metadata/page), the exact continuation protocol (start at offset=0, hold job_id/element_index/section constant, follow next_offset until null, never infer position from limit), and the concatenation rule (ordered, parse JSON only when format=json). It even warns that complete is not a stop condition.

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