Skip to main content
Glama

get_document_info

Read-onlyIdempotent

Inspect a document before conversion to identify its format, page count, metadata, table of contents, scan/OCR need, or encryption status. Use this first to plan which pages to convert or to check if a password is required.

Instructions

Inspect a document before converting it: detected format, page count, title/author metadata, table of contents (PDF), whether the file is scanned (needs OCR) or encrypted. Call this first for unknown or large documents to plan which pages to convert.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic http(s) URL of the document to fetch and convert. Leave empty when passing file_base64 instead.
filenameNoOriginal filename with extension (e.g. 'report.docx'). Used as a format hint when content type cannot be detected automatically.
passwordNoPassword for encrypted PDFs. Empty for normal files.
file_base64NoBase64-encoded file content (for documents not reachable by URL). Decoded size limit: 30 MB. Leave empty when passing url instead.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive behavior. The description adds value by disclosing what the inspection reveals, such as scanned/OCR needs and encryption, which is useful real-world behavior not visible in the schema.

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 sentences with no fluff. The primary purpose and workflow cue are front-loaded, followed by a compact list of returned information. Every sentence contributes meaningfully.

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 enumerates the key inspection outputs and gives clear guidance for planning conversions. Given the tool has no output schema, it compensates well, though a bit more detail about response shape or edge cases (e.g., unsupported formats) could make it fully complete.

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%, with each parameter (url, filename, password, file_base64) already documented. The description does not add parameter-level details, but since the schema carries the full burden, baseline 3 is appropriate.

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?

The description uses a specific verb ('Inspect') tied to the document resource and enumerates concrete outputs: detected format, page count, title/author metadata, table of contents, scanned/encrypted status. It clearly distinguishes itself from the conversion and extraction sibling tools.

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?

Explicitly states when to use it: 'Call this first for unknown or large documents to plan which pages to convert.' It gives clear context and intended position in a workflow, though it does not spell out when-not-to-use or name specific alternative tools.

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