Skip to main content
Glama

get_document

Read-onlyIdempotent

Retrieve a full knowledge document (title, tags, Markdown, date) by its repository path. Read-only, used when a section is insufficient or before proposing an update.

Instructions

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

Input Schema

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
tagsYes
scopeYes
titleYes
tokensYes
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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."
  2. First observedv0.4.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint and idempotentHint annotations, the description discloses error behaviors ('not-found for unknown paths', 'forbidden outside the requested scopes') and reiterates read-only nature. This adds meaningful behavioral context that the agent needs to handle outcomes correctly.

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: first states the core action and content, second gives usage conditions, third adds safety/error notes. Everything is front-loaded and every sentence earns its place; there is no fluff or repetition of schema details.

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, no return format explanation is needed. The description covers purpose, usage triggers, origin of key parameter, and error scenarios. It is complete enough for an agent to correctly select and invoke this tool without guessing.

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 descriptions already cover both parameters, so baseline is 3. The description enriches semantics by specifying that doc_path comes from search or bundle results and that scopes act as a guard ('forbidden outside the requested scopes'), reinforcing the meaning beyond the schema text without being redundant.

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 ('Return') and resource ('one knowledge document') with an explicit list of included fields (title, tags, Markdown, last-updated date). It distinguishes itself from siblings by referring to doc_path from search or bundle results and ties to a specific use case (when a section is not enough or before proposing an update).

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?

Provides explicit guidance: 'Use it when a section is not enough, or before proposing an update to that document.' It also indicates the origin of doc_path (from search/bundle results) and clarifies read-only and scope-related constraints, giving the agent clear decision rules for when to invoke this tool.

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