Skip to main content
Glama

sheet_context

Retrieve a sheet region's classified vector segments, text spans, and hatch families as structured data, with decimation controls and content-derived hatch IDs for mapping plan regions to legend swatches.

Instructions

The sheet's STRUCTURE in one call and one frame: the classified vector segments, the positioned text spans, and the hatch-family instances of a region — everything the engine itself floods against, exposed as data instead of pixels. Use it when you need to REASON about a region rather than look at it: which lines bound this space and at what pen weight, what the region says, and which periodic fill pattern covers it. The join is the point — all three arrive in image px with no reconciliation left to do, and the reply echoes the post-clamp region so passing that same rect to view_sheet gives you the matching render by construction. Hatch families carry a content-derived id (same pattern spec ⇒ same id, anywhere on the sheet), so matching a plan region to a legend swatch is comparing two ids, not guessing from a render — read the legend region, read the room region, match ids, and cite both bboxes as evidence. Decimation is declared, ordered, and counted on every reply: segments shorter than min_len_px drop first (invisible ink), then a max_segments cap applies LONGEST-FIRST so walls survive and hatch strokes go; kept + dropped always reconciles to total_in_region, and whole segments drop with their meta intact — nothing is ever simplified or merged, because these are classified segments and a merge would rewrite the classification. A scan returns has_vector_linework: false with empty vectors — absence of linework, never a claim the region is blank. 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
sheetYes
regionNoRect in image px (origin top-left, y down); omit for the full sheet
min_len_pxNoDrop segments shorter than this (default 2 — one PDF point at render scale 2.0, below any pen width). 0 keeps everything
max_segmentsNoSegment cap, applied longest-first (default 4000). The reply's dropped.cap says exactly what a smaller region would recover

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYes
textYes
hatchYes
sheetYes
regionYesThe region actually resolved, post-clamp — pass this same rect to view_sheet and the render is in the same frame by construction
vectorsYes
sheet_pxYes
has_vector_lineworkYesfalse = a scan: vectors and hatch are empty because there are none, not because the region is blank
Behavior5/5

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

With no annotations, the description carries the full burden and excels: it details decimation ordering (longest-first, whole segments drop), the meaning of has_vector_linework:false, coordinate space, and the non-mutating nature ('exposed as data instead of pixels'). It also accounts for reconciliation of kept/dropped counts, leaving no ambiguity about side effects or edge behavior.

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?

The description is long but dense, with each sentence adding unique information about decimation, coordinate systems, or usage. It is slightly repetitive about image px and top-left origin, but this emphasis is justified given how often coordinate mistakes cause errors. No filler or tautology.

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?

The description fully covers what the tool returns, how decimation works, how the output relates to view_sheet, and the semantics of hatch IDs. Given the complexity (three data types, coordinate conversion, decimation policy), it leaves no significant gaps for an agent to select and invoke the tool correctly.

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?

The schema covers 75% of parameters, and the description adds semantic depth beyond the schema: it explains that min_len_px default corresponds to one point at render scale 2.0, and that max_segments cap is applied 'longest-first' so walls survive. This complements the schema's terse descriptions, though the schema already provides solid baseline coverage.

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?

The description clearly states the tool returns structural data (classified vector segments, positioned text spans, hatch-family instances) for a region, distinguishing it from rendering tools like view_sheet. The resource and scope are specific, and the emphasis on the integrated response makes the purpose unambiguous.

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?

It explicitly says 'Use it when you need to REASON about a region rather than look at it' and mentions view_sheet as the counterpart for visual rendering. It also provides a concrete usage pattern (matching plan regions to legend swatches via hatch IDs), leaving no doubt about when to apply this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kentucky-ai/opentakeoff'

If you have feedback or need assistance with the MCP directory API, please join our Discord server