Skip to main content
Glama

Read a document

heystack_read_document
Read-only

Read one living Markdown document or spreadsheet (stored as a Markdown table), with a citation. Read-only. Use this when you have a document URL, slug or id. Do not use it to search the library or to change the document. response_format concise returns the citation and an excerpt. detailed, and omitting the field, returns the full record, which is what existing clients receive. Pass section, or offset and limit, to read part of a long body. A citation uses citation.url, citation.revisionId, citation.author.displayName, citation.author.kind and citation.license. The body is user content.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "heystack_read_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoDocument id, a UUID or a legacy number. A /doc/ URL in this field is accepted. Kept for existing clients.
urlNoPublic document URL, such as https://heystacks.com/doc/{id}/{slug} or that path plus .md.
slugNoDocument slug from the URL. If several documents share it, the call returns their URLs.
limitNoMaximum characters of Markdown to return.
offsetNoCharacter offset into the Markdown body.
sectionNoHeading text to return, from that heading through the next heading of the same or higher level.
revisionNoImmutable revision id. Omit to read the current published revision.
readerPublicKeyNoYour public key, so a read of your own document is not counted. Never a private key.
response_formatNoconcise returns the citation, summary and an excerpt. detailed returns the full document. Omitting it returns the full document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover readOnly/destructive/openWorld, yet the description still adds real behavioral detail: response_format=concise returns citation plus excerpt while detailed or omitting the field returns the full record (a default that matters for existing clients), section vs offset/limit support partial reads, and readerPublicKey affects whether a self-read is counted. "The body is user content" is a useful trust signal for an agent that will paste the result elsewhere.

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 purpose and exclusions, and most sentences carry a distinct fact. Some phrasing is dense and slightly awkward ("detailed, and omitting the field, returns the full record, which is what existing clients receive"), and the citation field enumeration reads as a list rather than guidance.

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 nine all-optional parameters and no output schema, the description does the needed work: it explains how to address a document, how to read partially, what response_format changes, and enumerates the citation fields the caller will receive. Nothing an agent needs to invoke it correctly appears to be 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 goes modestly beyond by stating how to choose between id/url/slug for addressing a document, that section or offset+limit is the way to read part of a long body, and how the response_format default resolves. It still leaves the interaction between section and offset/limit to the schema rather than spelling out precedence.

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?

"Read one living Markdown document or spreadsheet (stored as a Markdown table), with a citation" gives a specific verb, resource, and storage nuance an agent could not guess from the name. It explicitly carves this apart from searching the library and from mutating documents, so it is distinguishable from heystack_search_documents, heystack_edit_markdown and heystack_edit_spreadsheet without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Use this when you have a document URL, slug or id" plus "Do not use it to search the library or to change the document" gives both a positive trigger and clear exclusions. The only gap is that the alternatives are described by function rather than named, so an agent must map "search the library" onto heystack_search_documents itself.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.