Skip to main content
Glama

get_document

Read-only

Fetch a specific document's metadata by ID, including correspondent, type, tags, and custom fields. Content is excluded by default.

Instructions

Get a specific document by ID with full details including correspondent, document type, tags, and custom fields. Note: Document content is excluded from results by default. Use 'get_document_content' to retrieve content when needed. Documents can have several file versions (versions; manage them with upload_document_version / update_document_version / delete_document_version). Content (get_document_content) and get_document_metadata follow the LATEST version, but page_count, original_file_name and archived_file_name always describe the ROOT (first) version — e.g. after a password-protected PDF was unlocked into a new version, page_count stays null. Don't use page_count to judge whether a document is readable; check its content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
fieldsNoReturn only these fields to keep the response small, e.g. ["title", "tags"]. id is always included.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.2.1
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "Return only these fields to keep the response small, e.g. [\"title\", \"tags\"]. id is always included.",
      +  "items": {
      +    "enum": [
      +      "id",
      +      "title",
      +      "correspondent",
      +      "document_type",
      +      "storage_path",
      +      "tags",
      +      "created",
      +      "created_date",
      +      "modified",
      +      "added",
      +      "deleted_at",
      +      "archive_serial_number",
      +      "original_file_name",
      +      "archived_file_name",
      +      "duplicate_documents",
      +      "owner",
      +      "permissions",
      +      "user_can_change",
      +      "is_shared_by_requester",
      +      "custom_fields",
      +      "page_count",
      +      "mime_type",
      +      "root_document",
      +      "versions"
      +    ],
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
  2. First observedv3.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, and the description goes well beyond that: content is excluded by default, content/metadata follow the LATEST version while page_count and file names describe the ROOT version, and it gives a concrete example (unlocked password-protected PDF leaves page_count null). This is exactly the extra behavioral context annotations cannot carry.

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?

Purpose is front-loaded and every sentence carries information, but the description is dense and the version/page_count caveat runs long. Slightly more structure (e.g., grouping the version caveats) would help, but no sentence is wasted.

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 no output schema, the description carries the return-value burden and does so: it explains what is included, what is excluded by default, how fields map to document versions, and which sibling to call for content. An agent has everything needed to call it correctly.

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 50%: the 'fields' parameter is documented in-schema, but 'id' is not. The description adds real semantic meaning to field values (versions, page_count, original_file_name, archived_file_name) beyond the raw enum list, which compensates meaningfully for the gap even though the id parameter itself is left implicit.

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 a specific document by ID') and enumerates the detail it returns (correspondent, document type, tags, custom fields). It clearly distinguishes itself from the get_document_content sibling by naming it and explaining the content-exclusion default.

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 routes the agent: use 'get_document_content' when content is needed, and names upload_document_version / update_document_version / delete_document_version for version management. It also gives a concrete when-not rule ('Don't use page_count to judge whether a document is readable; check its content').

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

Deploy Server

Other Tools