Skip to main content
Glama

Resolve a reference a document writes

folio_embed
Read-onlyIdempotent

Resolve a document's data reference from its folder and return the table, value, or figure it shows; use it to verify a reference before writing it into a document.

Instructions

Resolve one data reference as a document writes it in {table: ...}, {value: ...}, a figure or a chart, from that document's folder, and return what it shows there. Use it to check a reference before writing it into a document, or to read the value a page shows; for a question of your own over the data use folio_query. Answers {version, grid: {columns, rows, total, partial} for a table, value: for a reference naming one value, error: why the reference resolves to nothing}. A list cut to fit one answer adds omitted, the entries each list left out, and narrow, how to ask for less.

Input Schema

NameRequiredDescriptionDefault
pathYesThe document whose folder the reference resolves from, relative to the served folder or absolute under it, such as reports/weekly.md
referenceYesThe reference as written: a data file relative to the document (data/daily.csv) or absolute under the served folder, a part of it after # (data/daily.csv#0.rain_mm, archive.sqlite#readings), a .sql file, or #name for a query fenced in the document (#totals, #totals#0.rain_mm)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive, closed-world behavior, and the description adds real context beyond that: the error field explains why a reference resolves to nothing, and the truncation contract (omitted entries listed, narrow tells how to ask for less) is behavior an agent could not infer. It stops short of saying anything about cost, size limits, or permission requirements, so it is strong but not exhaustive.

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-loaded with the action and immediately followed by the routing rule, and the return-shape sentence is dense but earned since there is no output schema. Slightly overpacked with brace notation that partly duplicates the schema, which keeps it from a 5.

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?

With no output schema, the description carries the full return contract (version, grid with columns/rows/total/partial, value, error) plus the partial-result escape hatch, which is exactly what an agent needs to interpret a two-parameter resolution tool. Nothing material about calling or reading the result is missing.

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 the schema already documents the relative-to-document resolution and every reference form (#fragment, .sql file, #name fence). The description restates these forms in prose, adding emphasis but little meaning beyond the schema; baseline 3 applies when structured fields carry the load.

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 ("Resolve one data reference ... and return what it shows there") and enumerates the reference forms it accepts ({table:...}, {value:...}, figure, chart). It also names the sibling it is not (folio_query), so an agent can distinguish it without opening 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 two explicit use cases (checking a reference before writing it, reading the value a page shows) and an explicit exclusion with the alternative named: "for a question of your own over the data use folio_query." Nothing is left to inference about selection.

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