Skip to main content
Glama

Generate invoice PDF

pdf_invoice
DestructiveIdempotent

Generate an invoice PDF from structured seller, buyer, line-item, and tax data without a template, or create a Factur-X e-invoice with embedded XML.

Instructions

Generate an invoice PDF from structured data (seller, buyer, line items, tax); no template needed. Deterministic: the same input produces byte-identical output. Without a paid PDFops key the output carries a small "Generated with pdfops.dev" footer line. Returns the invoice written to output_path, or inline as an application/pdf resource when output_path is omitted; an existing file at output_path is overwritten. An existing invoice PDF or a fillable template is populated with pdf_fill instead. Setting invoice.e_invoice to "factur-x" produces an e-invoice instead: a PDF/A-3 file with the invoice data embedded as factur-x.xml (UN/CEFACT Cross Industry Invoice, profile EN 16931, also called COMFORT). Several more fields then become required, and a missing one fails with einvoice_fields_required naming every missing field: invoice_number, date, currency (no default), due or payment_terms, from.country and to.country (ISO 3166-1 alpha-2 codes), from.vat_id (or from.tax_id with from.registration_id), tax_category when tax_rate is 0, and a UN/ECE Recommendation 20 unit code on every item. Amounts in the XML and on the page come from the same exact decimal arithmetic: each line is rounded to 2 decimals, VAT is computed once on the summed basis. On that path text is limited to Latin letters, Latin Extended-A, the euro sign and common punctuation (other characters fail with unrenderable_text); leading and trailing whitespace is trimmed, over-long or control-character text is refused with a 400, and long text wraps onto further lines or pages on the page and is carried in full in the XML. Per-item tax fields and other unknown fields are refused, and a buyer tax_id is refused (to.vat_id carries the buyer's VAT number). Checked in testing with the Mustang validator 2.26.0 (PDF/A-3 via veraPDF, XSD, EN 16931 schematron); this is not a statement of legal compliance, and XRechnung and Peppol output are not produced.

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": {
      "invoice": "<invoice>"
    },
    "name": "pdf_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
invoiceYesInvoice data
output_pathNoPath of a .pdf file to write the result to, inside the allowed directories (PDFOPS_ROOT, default the working directory); an existing file there is overwritten. Without it (as when running remotely) the PDF is returned inline as an application/pdf resource for the client to save.

Output Schema

NameRequiredDescriptionDefault
bytesYesSize of the produced PDF in bytes
output_pathNoAbsolute path written, when output_path was supplied
resource_uriNopdfops:// uri of the inline application/pdf resource, when output_path was omitted

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.7.1
    • addedInput schema / properties / invoice / additionalProperties
      Added value: +{}
    • changedInput schema / properties / invoice / properties / from / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "city": {
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "country": {
      -        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      -        "pattern": "^([A-Z]{2}|1A)$",
      -        "type": "string"
      -      },
      -      "lines": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "name": {
      -        "type": "string"
      -      },
      -      "postcode": {
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "registration_id": {
      -        "description": "Legal registration number, for example a commercial register number.",
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "street": {
      -        "maxLength": 200,
      -        "type": "string"
      -      },
      -      "tax_id": {
      -        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (to.vat_id carries the VAT number of the buyer).",
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "vat_id": {
      -        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      -        "maxLength": 35,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "name"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "city": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "country": {
      +        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      +        "pattern": "^([A-Z]{2}|1A)$",
      +        "type": "string"
      +      },
      +      "lines": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "postcode": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "registration_id": {
      +        "description": "Legal registration number, for example a commercial register number.",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "street": {
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "tax_id": {
      +        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (to.vat_id carries the VAT number of the buyer).",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "vat_id": {
      +        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      +        "maxLength": 35,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / invoice / properties / items / items / additionalProperties
      Added value: +{}
    • changedInput schema / properties / invoice / properties / to / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "city": {
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "country": {
      -        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      -        "pattern": "^([A-Z]{2}|1A)$",
      -        "type": "string"
      -      },
      -      "lines": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "name": {
      -        "type": "string"
      -      },
      -      "postcode": {
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "registration_id": {
      -        "description": "Legal registration number, for example a commercial register number.",
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "street": {
      -        "maxLength": 200,
      -        "type": "string"
      -      },
      -      "tax_id": {
      -        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (to.vat_id carries the VAT number of the buyer).",
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "vat_id": {
      -        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      -        "maxLength": 35,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "name"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "city": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "country": {
      +        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      +        "pattern": "^([A-Z]{2}|1A)$",
      +        "type": "string"
      +      },
      +      "lines": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "postcode": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "registration_id": {
      +        "description": "Legal registration number, for example a commercial register number.",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "street": {
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "tax_id": {
      +        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (to.vat_id carries the VAT number of the buyer).",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "vat_id": {
      +        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      +        "maxLength": 35,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed3 schema fields changedv0.6.0
    • changedInput schema / properties / invoice / properties / from / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "city": {
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "country": {
      -        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      -        "pattern": "^([A-Z]{2}|1A)$",
      -        "type": "string"
      -      },
      -      "lines": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "name": {
      -        "type": "string"
      -      },
      -      "postcode": {
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "registration_id": {
      -        "description": "Legal registration number, for example a commercial register number.",
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "street": {
      -        "maxLength": 200,
      -        "type": "string"
      -      },
      -      "tax_id": {
      -        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (use to.vat_id).",
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "vat_id": {
      -        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      -        "maxLength": 35,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "name"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "city": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "country": {
      +        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      +        "pattern": "^([A-Z]{2}|1A)$",
      +        "type": "string"
      +      },
      +      "lines": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "postcode": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "registration_id": {
      +        "description": "Legal registration number, for example a commercial register number.",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "street": {
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "tax_id": {
      +        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (to.vat_id carries the VAT number of the buyer).",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "vat_id": {
      +        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      +        "maxLength": 35,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / invoice / properties / to / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "city": {
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "country": {
      -        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      -        "pattern": "^([A-Z]{2}|1A)$",
      -        "type": "string"
      -      },
      -      "lines": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "name": {
      -        "type": "string"
      -      },
      -      "postcode": {
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "registration_id": {
      -        "description": "Legal registration number, for example a commercial register number.",
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "street": {
      -        "maxLength": 200,
      -        "type": "string"
      -      },
      -      "tax_id": {
      -        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (use to.vat_id).",
      -        "maxLength": 35,
      -        "type": "string"
      -      },
      -      "vat_id": {
      -        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      -        "maxLength": 35,
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "name"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "city": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "country": {
      +        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      +        "pattern": "^([A-Z]{2}|1A)$",
      +        "type": "string"
      +      },
      +      "lines": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "postcode": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "registration_id": {
      +        "description": "Legal registration number, for example a commercial register number.",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "street": {
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "tax_id": {
      +        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (to.vat_id carries the VAT number of the buyer).",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "vat_id": {
      +        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      +        "maxLength": 35,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / output_path / description
      Previous value: -"Path of a .pdf file to write the result to, inside the allowed directories (PDFOPS_ROOT, default the working directory); an existing file there is overwritten. Omit when running remotely: the PDF is then returned inline as an application/pdf resource for the client to save."New value: +"Path of a .pdf file to write the result to, inside the allowed directories (PDFOPS_ROOT, default the working directory); an existing file there is overwritten. Without it (as when running remotely) the PDF is returned inline as an application/pdf resource for the client to save."
  3. Changed17 schema fields changedv0.5.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / invoice / additionalProperties
      Removed value: -false
    • changedInput schema / properties / invoice / properties / date / description
      Previous value: -"Shown on the invoice; also pins metadata for determinism"New value: +"Calendar date in YYYY-MM-DD form (other formats are rejected with invalid_date). Shown on the invoice; also pins metadata for determinism"
    • addedInput schema / properties / invoice / properties / date / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}$"
    • addedInput schema / properties / invoice / properties / due / description
      Added value: +"Shown as given. With e_invoice it must be a calendar date in YYYY-MM-DD form."
    • addedInput schema / properties / invoice / properties / e_invoice
      Added value: +{
      +  "description": "Produce a Factur-X (ZUGFeRD) EN 16931 e-invoice: PDF/A-3 with factur-x.xml embedded. Makes several fields required, see the tool description.",
      +  "enum": [
      +    "factur-x"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / invoice / properties / from / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "lines": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "name": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "name"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "city": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "country": {
      +        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      +        "pattern": "^([A-Z]{2}|1A)$",
      +        "type": "string"
      +      },
      +      "lines": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "postcode": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "registration_id": {
      +        "description": "Legal registration number, for example a commercial register number.",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "street": {
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "tax_id": {
      +        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (use to.vat_id).",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "vat_id": {
      +        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      +        "maxLength": 35,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / invoice / properties / iban
      Added value: +{
      +  "description": "IBAN to pay into; the checksum is verified. Used only with e_invoice: written as SEPA credit transfer (code 58) for a EUR invoice and a SEPA-area IBAN, otherwise as credit transfer (code 30).",
      +  "type": "string"
      +}
    • removedInput schema / properties / invoice / properties / items / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / invoice / properties / items / items / properties / unit
      Added value: +{
      +  "description": "UN/ECE Recommendation 20 unit code, for example C62 (one), HUR (hour), KGM (kilogram). Required when e_invoice is set.",
      +  "maxLength": 3,
      +  "type": "string"
      +}
    • addedInput schema / properties / invoice / properties / payment_terms
      Added value: +{
      +  "description": "Payment terms text. With e_invoice, either this or a due date is required.",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • addedInput schema / properties / invoice / properties / tax_category
      Added value: +{
      +  "description": "EN 16931 VAT category: S standard rate (the default when tax_rate is above 0), Z zero rate, E exempt, AE reverse charge, O not subject to VAT. Required with e_invoice when tax_rate is 0 or omitted. Ignored without e_invoice.",
      +  "enum": [
      +    "S",
      +    "Z",
      +    "E",
      +    "AE",
      +    "O"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / invoice / properties / tax_exemption_reason
      Added value: +{
      +  "description": "Reason text, required with e_invoice for tax_category E, AE and O.",
      +  "maxLength": 200,
      +  "type": "string"
      +}
    • changedInput schema / properties / invoice / properties / to / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "lines": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "name": {
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "name"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "city": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "country": {
      +        "description": "ISO 3166-1 alpha-2 country code in capitals (1A for Kosovo, as in the EN 16931 list). Required when e_invoice is set.",
      +        "pattern": "^([A-Z]{2}|1A)$",
      +        "type": "string"
      +      },
      +      "lines": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "name": {
      +        "type": "string"
      +      },
      +      "postcode": {
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "registration_id": {
      +        "description": "Legal registration number, for example a commercial register number.",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "street": {
      +        "maxLength": 200,
      +        "type": "string"
      +      },
      +      "tax_id": {
      +        "description": "National tax number. With e_invoice it is accepted for the seller only: EN 16931 has no buyer tax number, so to.tax_id is refused (use to.vat_id).",
      +        "maxLength": 35,
      +        "type": "string"
      +      },
      +      "vat_id": {
      +        "description": "VAT identification number. With e_invoice it must start with a two-letter capital country prefix, such as DE123456789 (EL for Greece), and the seller needs vat_id, or tax_id plus registration_id.",
      +        "maxLength": 35,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name"
      +    ],
      +    "type": "object"
      +  }
      +]
    • changedInput schema / properties / output_path / description
      Previous value: -"Absolute path to write the result. Omit when running remotely: the PDF is then returned inline as an application/pdf resource for the client to save."New value: +"Path of a .pdf file to write the result to, inside the allowed directories (PDFOPS_ROOT, default the working directory); an existing file there is overwritten. Omit when running remotely: the PDF is then returned inline as an application/pdf resource for the client to save."
    • addedOutput schema / properties / bytes / maximum
      Added value: +9007199254740991
    • addedOutput schema / properties / bytes / minimum
      Added value: +-9007199254740991
  4. Changed3 schema fields changedv0.3.2
    • changedInput schema / properties / output_path / description
      Previous value: -"Absolute path to write the invoice PDF"New value: +"Absolute path to write the result. Omit when running remotely: the PDF is then returned inline as an application/pdf resource for the client to save."
    • changedInput schema / required
      Previous value: -[
      -  "invoice",
      -  "output_path"
      -]New value: +[
      +  "invoice"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "bytes": {
      +      "description": "Size of the produced PDF in bytes",
      +      "type": "integer"
      +    },
      +    "output_path": {
      +      "description": "Absolute path written, when output_path was supplied",
      +      "type": "string"
      +    },
      +    "resource_uri": {
      +      "description": "pdfops:// uri of the inline application/pdf resource, when output_path was omitted",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "bytes"
      +  ],
      +  "type": "object"
      +}
  5. First observedv0.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag the destructive/idempotent/openWorld profile, and the description corroborates rather than repeats them: byte-identical deterministic output, overwrite of an existing file at output_path, the unpaid-key footer line, and named failure modes (einvoice_fields_required, unrenderable_text, 400). The one thing it does not cover is the inline-resource return path's practical limits, though that is documented in the schema for output_path.

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?

Front-loaded correctly: purpose, determinism, watermark, and return/overwrite behavior come before the dense Factur-X section. It is a long single block with run-on sentences and some schema overlap, but nearly every clause carries a distinct behavioral fact, so little is truly expendable.

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

Completeness5/5

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

For a complex, nested, two-mode generator with an output schema, the description covers the gaps structured fields cannot: determinism, license watermarking, overwrite semantics, return-shape choice, character-set limits, and the compliance caveat about XRechnung/Peppol and non-legal-compliance. An agent can call this correctly without further discovery.

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

Parameters4/5

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

With 100% schema description coverage the baseline is 3, and the description earns above it by adding cross-field rules the schema cannot express: the enumerated list of fields that become required under e_invoice, refusal of per-item tax fields and buyer tax_id, and the exact rounding/VAT ordering. These are conditional requirements an agent would otherwise miss.

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?

Opens with a specific verb and resource ('Generate an invoice PDF from structured data') and immediately delimits scope ('no template needed'), which separates it from the template-population sibling. It goes further to name the e-invoice variant it can produce, so an agent knows both modes up front.

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

Usage Guidelines5/5

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

Explicitly routes away from this tool: 'An existing invoice PDF or a fillable template is populated with pdf_fill instead.' It also states the trigger for the alternate mode ('Setting invoice.e_invoice to "factur-x"'), so both when-to-use decisions are spelled out rather than inferred.

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