Skip to main content
Glama

load_doc

Read-onlyIdempotent

Opens a JSON document and returns its size, top-level shape, and docId for use with other tools; accepts file paths, inline text, or compressed payloads.

Instructions

Open a JSON document and return its size and top-level shape. Accepts a file path or inline text, and transparently decodes Zstd, Base64-Zstd and PostgreSQL bytea (\x…) payloads. Malformed JSON is auto-repaired and flagged. Returns a docId (d1, d2, …) that every other tool takes. The document itself is never returned — read it with get_schema, run_query, profile or sample instead. Prefer path for an existing or large document. For a single question, skip this step: those tools also take filePath.

Input Schema

NameRequiredDescriptionDefault
pathNoAbsolute or relative path to a .json/.jsonl/.zst file.
textNoInline document text, or a compressed payload string.

Output Schema

NameRequiredDescriptionDefault
okYes
hintNo
toolYes
errorNo
evictedNo
structuredTruncatedNo

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?

Beyond the readOnly/idempotent annotations, the description discloses decoding support (Zstd, Base64-Zstd, PostgreSQL bytea), auto-repair of malformed JSON with flagging, the docId output contract (d1, d2, …) that all other tools consume, and the key constraint that the document body is never returned. These are exactly the non-obvious behaviors an agent needs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Six short sentences, front-loaded with what the tool does and what it returns, followed by encoding behavior, the docId contract, the negative constraint, and the param preference. No sentence is redundant with the title or the structured fields.

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 an output schema present, the description needn't explain return values, yet it summarizes the docId contract anyway; annotations cover safety; both params are fully described in schema. Nothing an agent needs to call this correctly or decide to skip it is missing.

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?

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining the choice between the two params ('Prefer path for an existing or large document', inline text may be 'a compressed payload string'). It does not add format or syntax detail beyond the schema's own path description, keeping it short of a 5.

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 — opens a JSON document and returns its size and top-level shape — and immediately distinguishes itself from siblings by naming get_schema, run_query, profile and sample as the readers. It also makes explicit what it does NOT return (the document itself), which an agent could otherwise assume.

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 an explicit routing rule: 'Prefer path for an existing or large document' and 'For a single question, skip this step: those tools also take filePath.' That is a concrete when-to-use, when-to-skip, and named-alternative statement, not an inference.

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