Skip to main content
Glama

Get Document Info

get_document_info
Read-onlyIdempotent

Retrieve metadata from PDF, DOCX, XLSX, and CSV files, including page counts from PDF metadata, to inspect document properties without extracting full text. Reads only files in allowed directories.

Instructions

Membaca metadata PDF/DOCX/XLSX/CSV. Untuk PDF, jumlah halaman diambil dari metadata tanpa fallback ekstraksi seluruh teks. Hanya file di ALLOWED_DIRS.

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_info"
  }
}

Input Schema

NameRequiredDescriptionDefault
filePathYesAbsolute path file di dalam salah satu direktori ALLOWED_DIRS.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior, so the burden is low. The description still adds real value by disclosing that PDF page counts come from metadata with no full-text-extraction fallback (a latency and behavior trait an agent cannot see in the schema) and by restating the directory sandbox constraint.

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?

Three short sentences, purpose first, then the one non-obvious behavioral caveat, then the scope restriction. Nothing is redundant and nothing is buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the burden of explaining what metadata is returned, and it never says which fields (title, author, page count, size, sheet names) come back. For a low-complexity 1-parameter read tool this is a noticeable but not fatal gap.

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 coverage is 100% and the single filePath parameter is already documented as an absolute path inside ALLOWED_DIRS, so the description's ALLOWED_DIRS sentence mostly repeats the schema. It adds no format hints (e.g., extension expectations) beyond what the schema provides.

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?

States a specific verb and resource ("Membaca metadata") and enumerates the supported formats (PDF/DOCX/XLSX/CSV), which implicitly separates it from content-reading siblings like read_pdf or read_word. It does not name any sibling, so differentiation rests on the word "metadata" alone.

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

Usage Guidelines3/5

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

The ALLOWED_DIRS restriction gives a clear precondition for use, but there is no explicit when-to-use versus the read_* / search_in_document siblings. An agent must infer that this is the metadata-only path rather than the content-extraction path.

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