Skip to main content
Glama

get_document

Check a document's processing status and metadata to confirm it is ready before retrieving its structure or page content.

Instructions

Check a document's processing status and metadata. Call this before get_document_structure() or get_page_content() to confirm the document is ready (status === "completed").

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": {
      "doc_name": "<doc_name>"
    },
    "name": "get_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_nameYesCopy the `name` field verbatim from a browse_documents() or search_documents() response (case-sensitive, include extension). Example: "Q3 Report.pdf". If the response shows two documents with the same name, pass `folder_id` alongside to disambiguate.
folder_idNoDisambiguator for same-name documents. Copy the `folder_id` from the intended browse/search result; use "root" for root-level documents, or "shared-with-me"/"following" for the read-only folders at the library root; omit if `doc_name` is unique. Copy any folder_id verbatim from a browse_documents()/get_folder_structure() response, never construct one.
wait_for_completionNoIf true and document is processing, automatically wait up to 3 minutes until completed. Reduces repeated tool calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.9.0
    • addedInput schema / properties / folder_id / description
      Added value: +"Disambiguator for same-name documents. Copy the `folder_id` from the intended browse/search result; use \"root\" for root-level documents, or \"shared-with-me\"/\"following\" for the read-only folders at the library root; omit if `doc_name` is unique. Copy any folder_id verbatim from a browse_documents()/get_folder_structure() response, never construct one."
    • addedInput schema / properties / folder_id / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. First observedv1.8.2

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the burden of behavioral disclosure. It reveals useful readiness semantics, including the concrete 'status === "completed"' gate, but doesn't state that this is a read-only operation, doesn't list the other status values ('processing', 'failed'), and doesn't describe what metadata is returned or how the gating affects callers.

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?

Two tight sentences: the purpose is front-loaded, followed by the precondition. Zero wasted wording. Nothing repeats the schema, and every sentence earns its place.

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?

The description is complete for a small, fully documented 3-parameter status-check tool with no output schema. The one meaningful gap is the not-ready branch: it never says what to do if status is not 'completed', such as invoking process_document. That is the most valuable next-step guidance the description could add.

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?

With schema_description_coverage at 100%, the input schema already documents doc_name, folder_id, and wait_for_completion, down to verbatim-copy instructions and disambiguation rules. The description adds no parameter-level detail beyond that. The baseline 3 is appropriate, since the schema does the heavy lifting.

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 states a specific verb and resource: 'Check a document's processing status and metadata.' It also positions the tool relative to the downstream siblings get_document_structure() and get_page_content(), so an agent can tell it apart from the content-retrieval tools. However, 'metadata' remains unspecified, leaving the tool partially distinguishable from get_metadata_schema() in sibling set.

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?

Explicit precondition guidance: 'Call this before get_document_structure() or get_page_content() to confirm the document is ready (status === "completed")'. This tells the agent exactly when this tool is the right choice. It stops short of naming the fallback when the status is not completed, e.g. process_document, which is a sibling the agent would likely need next.

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