Skip to main content
Glama

doc.get

Read-only

Retrieve a saved document by doc_id or URL to inspect metadata, headings, recorded matches, and a line window of its text; set include_text false for metadata only.

Instructions

One saved document: metadata, headings, recorded matches, and a line window of the text. Address it by doc_id or by url. The full text is an artifact, so artifact.search and artifact.read_lines work on it too.

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": "doc.get"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoAny form of the saved URL; fragments and tracking parameters are ignored.
doc_idNoDocument handle (doc_*).
end_lineNoLast line (default 200).
start_lineNoFirst line of text to return (default 1).
include_textNoSet false for metadata only.
include_linksNoInclude the outbound links recorded at capture time.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds real behavioral context beyond that — that the response is a bounded line window rather than the whole document, and that the full text lives as an artifact reachable through other tools. It does not discuss pagination limits or what happens when a doc_id is stale, but the key structural behavior is disclosed.

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?

Three short sentences, front-loaded with what is returned, then how to address it, then where the full text lives. No filler and no repetition of schema detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and six optional parameters, the description carries the burden of explaining the return shape, and it does so by listing metadata, headings, matches, and a text window. The artifact pointer closes the main gap; only edge-case behavior for invalid handles is unaddressed.

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%, so all six parameters are already documented in the schema, which sets the baseline at 3. The description adds only the either/or addressing model (doc_id or url) and the notion of a line window; it does not clarify defaults or interactions such as include_text=false overriding the line range.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific resource and enumerates the payload: 'One saved document: metadata, headings, recorded matches, and a line window of the text.' The singular 'One saved document' implicitly separates it from doc.list and doc.search, though it never names those siblings directly.

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?

It gives concrete addressing options ('by doc_id or by url') and routes the agent elsewhere for full-text work by naming artifact.search and artifact.read_lines. It stops short of explicit when-not-to-use guidance against doc.search or doc.list, so the routing is helpful but not exhaustive.

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

Deploy Server

Other Tools