Skip to main content
Glama

API Keg — PDF Forge & Layout Diagnostics

Inspect Binary PDF Structure & Metadata

inspect_pdf_document
Read-onlyIdempotent

Parses a Base64-encoded PDF binary to verify %PDF header/EOF integrity and extract pdfVersion, exact pageCount, byteLength, encryption status, AcroForm presence, and Info dictionary metadata. Pricing: $0.001 USD per PDF binary inspection (x402 instant micropayment). Pass ?dry_run=true on REST to validate schema free.

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": {
      "pdfBase64": "<pdfBase64>"
    },
    "name": "inspect_pdf_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
pdfBase64YesBase64-encoded PDF binary (standard or URL-safe Base64, optional 'data:application/pdf;base64,' prefix).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered structurally. The description adds genuinely new behavioral context: a per-call price of $0.001 USD and a free dry_run validation path on REST. It does not disclose failure behavior for malformed or non-PDF input, which matters for a parser advertised to verify integrity.

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?

Three sentences, front-loaded with the capability and followed by cost and the dry_run escape hatch; nothing is padded. The dry_run sentence references a REST query parameter that is not part of this MCP input schema, so it is slightly off-target for the calling surface, but it is short and still useful.

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?

With no output schema, the description carries the burden of describing return values and does so by naming every extracted field. Cost and the free-validation path are disclosed, which is more than most definitions offer. It omits the 5MB input cap and any statement about how invalid PDFs are reported, leaving a small but real gap for an integrity-checking tool.

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?

There is a single parameter at 100% schema description coverage, and the schema already documents Base64 encoding, the optional data-URI prefix, and length bounds. The description only restates "Base64-encoded PDF binary" without adding format or constraint detail, so the baseline of 3 applies.

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 uses a specific verb ("Parses") on a specific resource (Base64-encoded PDF binary) and enumerates exactly what it returns: header/EOF integrity, pdfVersion, pageCount, byteLength, encryption, AcroForm, Info metadata. That is far more concrete than the name alone. It stops short of naming or contrasting with the sibling render_document_pdf, so an agent must infer that this inspects rather than renders.

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?

There is no statement of when to choose this tool over render_document_pdf, nor any when-not guidance or prerequisite beyond the payment note. The only actionable guidance is the REST dry_run flag, which is a cost-saving tip rather than a usage-selection rule. The inspect-vs-render distinction is left entirely implicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources