Skip to main content
Glama

get_document

Read-onlyIdempotent

Get the full knowledge document for a given path, including tags, markdown, date, and linked references, to read complete content or prepare an update.

Instructions

Return one knowledge document in full (title, tags, Markdown, last-updated date, and the documents it links to and is linked from) by the doc_path given in search or bundle results. Use it when a section is not enough, to follow a link, or before proposing an update. Read-only; not-found for unknown paths, forbidden outside the requested scopes.

Input Schema

NameRequiredDescriptionDefault
scopesNoOptional guard: the document must belong to one of these scopes, otherwise the call is refused.
doc_pathYesRepository-relative path of the document exactly as returned in doc_path, e.g. domain/rules/refunds.md. Required.

Output Schema

NameRequiredDescriptionDefault
pathYes
tagsYes
linksNo
scopeYes
titleYes
tokensYes
contentYes
backlinksNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.0
    • addedOutput schema / properties / backlinks
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
    • addedOutput schema / properties / links
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": [
      +    "null",
      +    "array"
      +  ]
      +}
  2. Changed2 schema fields changedv0.5.0
    • changedInput schema / properties / doc_path / description
      Previous value: -"Repository-relative path of the document, e.g. domain/rules/refunds.md"New value: +"Repository-relative path of the document exactly as returned in doc_path, e.g. domain/rules/refunds.md. Required."
    • changedInput schema / properties / scopes / description
      Previous value: -"If given, the document must belong to one of these scopes"New value: +"Optional guard: the document must belong to one of these scopes, otherwise the call is refused."
  3. First observedv0.4.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already provide readOnlyHint and idempotentHint, and the description reinforces those. Beyond the annotations, it adds useful behavioral details: not-found for unknown paths and refusal outside requested scopes. These error/guard behaviors are valuable context that the structured annotations alone do not convey.

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 sentences, each earning its place: the first defines the output, the second gives usage context, the third compresses error/read-only behavior. The most decision-relevant information is front-loaded, and there is no redundant filler.

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?

For a two-parameter read-only retrieval tool with an output schema, the description covers what the tool returns, where the key parameter comes from, when to use it, and key error behaviors. The sibling context and annotations fill the remaining safety and idempotency profile, so nothing an agent needs to invoke it correctly 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 description coverage is 100%, so the baseline is 3. The description reinforces that doc_path must be the exact path from search or bundle results and refers to the scopes guard, but it does not add meaning substantially beyond the already-complete parameter descriptions in the schema.

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 opens with a specific verb-resource pair, 'Return one knowledge document in full', and enumerates exactly what is included (title, tags, Markdown, last-updated date, links). It distinguishes itself from sibling tools like search_context and compile_bundle by focusing on a single full document obtained via doc_path.

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 explicit when-to-use guidance: 'when a section is not enough, to follow a link, or before proposing an update.' It also notes that doc_path comes from search or bundle results, which orients the agent toward sibling outputs. It stops short of naming specific alternative tools or explicit when-not-to-use conditions, so it misses the top score.

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