Skip to main content
Glama

Read a document

get_document
Read-only

Retrieve a document's source code, diagnostics, metrics, and structure—containers, elements, relations, and indices—by document ID, filename, project name, or frontmost document.

Instructions

Source code (with line numbers), diagnostics, metrics and the structure (containers, elements, relations with their indices) of a document.

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": "get_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentNoDocument id (e.g. doc1), file name or project name. Omit for the frontmost document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

The readOnlyHint annotation already establishes that this is a safe read operation, and the description adds valuable disclosure of the returned data categories, which matters because there is no output schema. It still omits error behavior, empty-document behavior, and whether all content is returned, so it is not fully transparent.

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?

The description is a single compact sentence with no filler, and every listed item is relevant to what the tool returns. It is slightly less effective because it is a noun phrase rather than a front-loaded action statement.

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?

For a simple one-parameter read tool with no output schema, the description covers the main return categories and the annotations cover safety. It lacks usage routing and error/format details, but it is largely complete for the tool's complexity.

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%, and the single optional 'document' parameter is fully documented in the schema, including the frontmost-document default. The description adds no additional parameter meaning beyond what the schema already provides, so the baseline of 3 is appropriate.

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 title and description identify a read operation on a document and enumerate the returned artifacts: source code with line numbers, diagnostics, metrics, and structure. It is clear what the tool provides, though it does not explicitly contrast with siblings such as list_documents or review.

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

Usage Guidelines2/5

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

The description gives no when-to-use or when-not-to-use guidance. The only usage hint is in the schema ('Omit for the frontmost document'), so the agent must infer that this tool reads a specific document rather than listing or editing documents.

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