Skip to main content
Glama

magic_convert_pdf

Read-onlyIdempotent

Convert Base64-encoded flat legacy PDF invoices up to five pages into ZUGFeRD 2.5 PDF/A-3b with EN16931 or XRechnung profiles, strict decimal math, and IBAN MOD-97 checks.

Instructions

Convert a flat legacy PDF (Base64, max 5 pages) into a ZUGFeRD 2.5 PDF/A-3b under strict BigDecimal Math & ISO 13616 MOD-97 IBAN guardrails.

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": "magic_convert_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
profileNoEN16931
pdfBase64YesBase64-encoded legacy PDF invoice
stampGiroCodeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

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 and destructiveHint=false, so the safety profile is covered. The description usefully adds the 5-page ceiling and warns that values are re-validated under BigDecimal math and ISO 13616 MOD-97 IBAN rules, implying content-checked rejections, but it never says what is returned or how validation failures surface.

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?

A single front-loaded sentence with no filler; the conversion target and page limit come first. The trailing 'strict BigDecimal Math & ISO 13616 MOD-97 IBAN guardrails' clause is dense jargon that takes a second pass to decode, but it is not wasted space.

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?

Covers the input format, size limit and validation guardrails, which is adequate for a three-parameter conversion tool. It leaves a meaningful gap by omitting the 'profile' choice (EN16931 vs XRECHNUNG) and the giro-code stamping option, and there is no output schema to compensate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33%: pdfBase64 is documented in the schema and echoed in the description, but 'profile' (with its EN16931/XRECHNUNG enum) and 'stampGiroCode' are never mentioned. The description does not compensate for the coverage gap on the two parameters that actually change the output.

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 (Convert) and both source and target resources: a flat legacy PDF (Base64) into a ZUGFeRD 2.5 PDF/A-3b. It does not name or differentiate itself from the sibling embed_zugferd_pdf, which an agent could plausibly confuse with this conversion tool.

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 phrase 'flat legacy PDF' plus the max 5 page limit implies the input precondition, but there is no explicit when-to-use guidance and no stated alternative for cases where the PDF already contains a ZUGFeRD structure. Usage must be inferred from the sibling list rather than the description.

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