Skip to main content
Glama
StructuraMCP

StructuraMCP

Parse PDF to structured JSON/CSV

parse_document
Read-only

Extract line items and header fields from construction and procurement PDFs into a chosen schema, returning schema-strict JSON or CSV with confidence scores and warnings.

Instructions

Extract line items and header fields from a PDF into the chosen schema.

Returns document (schema-strict JSON), csv (optional), confidence 0-1 with a breakdown, method (deterministic | hybrid | llm), warnings and billing info.

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": {
      "schema": "<schema>"
    },
    "name": "parse_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
schemaYesTarget schema: boq, invoice, quote or spec_sheet (see list_schemas)
pdf_urlNoPublic http(s) URL that returns the PDF bytes
allow_llmNoAllow the LLM fallback for low-confidence pages
pdf_base64NoThe PDF file, base64-encoded (data: URI prefix allowed)
output_formatNojson, csv or bothjson

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds real behavioral context beyond that — a confidence score with breakdown, the extraction method (deterministic | hybrid | llm), warnings, and billing info, which signals that calls may incur cost and that output quality varies. It stops short of explaining failure modes or what triggers the LLM path, but the added disclosure is substantial.

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 compact sentences: the operation is front-loaded, then the return shape is enumerated in a single dense line. No filler or restatement of the title.

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?

For a five-parameter tool with full schema coverage, annotations, and an output schema, the description covers purpose and return shape adequately. Minor gaps remain around error handling and when the LLM fallback is invoked or billed, but nothing essential for a correct invocation is missing.

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 100% schema description coverage, the schema already defines all five parameters including the schema enum hint and allow_llm's LLM-fallback meaning. The description reinforces this by mentioning CSV output and the deterministic/hybrid/llm method, but adds no new semantics such as URL size limits or base64 constraints; 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 states a specific verb and resource: 'Extract line items and header fields from a PDF into the chosen schema.' This is unambiguously distinct from the sibling tools (compare, list, validate), so an agent can identify the operation without opening any schema.

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 explicit when-to-use or when-not guidance in the description. The only routing hint ('see list_schemas') lives inside the schema parameter, and nothing tells the agent how this differs from validate_boq_schema or when a PDF versus another input should be used.

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