Skip to main content
Glama

get_document

Retrieve the full content and metadata of an indexed document by filepath when you need the complete text instead of search-result chunks.

Instructions

Get the full content of a specific document by filepath.

Read-only. No side effects.

Args: filepath: Relative path to the document within the documents directory (e.g., "security/technique.md"). Must be an indexed file — use search_knowledge() to find the filepath by topic first, or browse list_documents(), which returns one page at a time (see its offset).

Returns: JSON string with full document content and metadata (filepath, category, size).

Usage: Use when you need the complete text of a known file — search_knowledge() returns chunks, not full docs. Use search_knowledge() first to find the filepath if unknown. Use list_documents() to browse files by category, one page at a time.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "filepath": "<filepath>"
    },
    "name": "get_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
filepathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does state 'Read-only. No side effects.', which is the key safety disclosure. It also discloses the return shape (content plus filepath, category, size) and the precondition that the file must be indexed, though it does not say what happens when the filepath is missing or unindexed.

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 the one-line purpose followed by Args/Returns/Usage sections, so structure is easy to scan. Minor redundancy in the Usage block restating the filepath-discovery advice already given under Args.

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?

A one-parameter read tool with a single required string and an output schema; the description covers purpose, precondition, return shape, and routing to siblings. Nothing an agent needs in order to call it correctly 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 0%, so the description must compensate, and it does: filepath is defined as a relative path within the documents directory, with an example ('security/technique.md') and the constraint that it must be an indexed file plus two routes to discover valid values. No error semantics for an invalid path, which keeps it from 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 ('Get the full content of a specific document by filepath') and implicitly differentiates from search_knowledge by emphasizing 'full content' versus chunks. An agent can tell exactly which retrieval tool this is.

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?

Explicitly names when to use it (need complete text of a known file), when to use alternatives (search_knowledge for chunks and for discovering an unknown filepath; list_documents for browsing by category), and notes that list_documents paginates one page at a time.

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