Skip to main content
Glama
Frihet-io

Frihet MCP Server

by Frihet-io

Update Invoice

update_invoice
Idempotent

Update an existing invoice by providing only the fields to change. Mark invoices as paid, modify line items, or adjust client details.

Instructions

Update an existing invoice using PATCH semantics. Only the provided fields will be changed. Example: id='abc123', status='paid' to mark an invoice as paid. / Actualiza una factura existente. Solo se modifican los campos proporcionados.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInvoice ID / ID de la factura
itemsNoLine items / Conceptos
notesNoNotes / Notas
statusNoInvoice status / Estado
dueDateNoDue date (YYYY-MM-DD) / Fecha de vencimiento
taxRateNoTax rate % / IVA %
clientIdNoExisting client ID — server back-fills taxId/address / ID de cliente existente
irpfRateNoIRPF withholding % (retencion autonomo ES, e.g. 15 or 7) / Retencion IRPF %
poNumberNoClient purchase-order reference / Numero de pedido del cliente
seriesIdNoInvoice numbering series ID / ID de serie de numeracion
issueDateNoIssue date (YYYY-MM-DD) / Fecha de emision
clientNameNoClient name / Nombre del cliente
prepaymentNoPrepaid/advance amount already collected in EUR / Anticipo cobrado en EUR
clientTaxIdNoClient tax ID (NIF/CIF/VAT) shown on the invoice / NIF/CIF del cliente
discountRateNoGlobal discount % applied to the invoice / Descuento global %
clientAddressNoClient billing address shown on the invoice / Direccion fiscal del cliente
operationTypeNoOperation type (service or goods) / Tipo de operacion
clientLocationNoFiscal zone driving IVA vs IGIC vs exempt / Zona fiscal (IVA/IGIC/exento)
documentNumberNoExternally-issued number for import (honored verbatim) / Numero externo para importacion
equivalenceSurchargeRateNoRecargo de equivalencia % (ES retail regime) / Recargo de equivalencia %

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
itemsNo
notesNo
totalNo
statusNo
dueDateNo
taxRateNo
createdAtNo
issueDateNo
updatedAtNo
clientNameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.16.3
  2. Removedv1.15.2
  3. Changed3 schema fields changedv1.15.0
    • addedOutput schema / properties / clientName / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / clientName / type
      Removed value: -"string"
    • changedOutput schema / required
      Previous value: -[
      -  "id",
      -  "clientName",
      -  "items"
      -]New value: +[
      +  "id"
      +]
  4. Changed12 schema fields changedv1.14.5
    • addedInput schema / properties / clientAddress
      Added value: +{
      +  "description": "Client billing address shown on the invoice / Direccion fiscal del cliente",
      +  "type": "string"
      +}
    • addedInput schema / properties / clientId
      Added value: +{
      +  "description": "Existing client ID — server back-fills taxId/address / ID de cliente existente",
      +  "type": "string"
      +}
    • addedInput schema / properties / clientLocation
      Added value: +{
      +  "description": "Fiscal zone driving IVA vs IGIC vs exempt / Zona fiscal (IVA/IGIC/exento)",
      +  "enum": [
      +    "peninsula",
      +    "canarias",
      +    "ceuta_melilla",
      +    "eu",
      +    "world"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / clientTaxId
      Added value: +{
      +  "description": "Client tax ID (NIF/CIF/VAT) shown on the invoice / NIF/CIF del cliente",
      +  "type": "string"
      +}
    • addedInput schema / properties / discountRate
      Added value: +{
      +  "description": "Global discount % applied to the invoice / Descuento global %",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / documentNumber
      Added value: +{
      +  "description": "Externally-issued number for import (honored verbatim) / Numero externo para importacion",
      +  "maxLength": 50,
      +  "type": "string"
      +}
    • addedInput schema / properties / equivalenceSurchargeRate
      Added value: +{
      +  "description": "Recargo de equivalencia % (ES retail regime) / Recargo de equivalencia %",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / irpfRate
      Added value: +{
      +  "description": "IRPF withholding % (retencion autonomo ES, e.g. 15 or 7) / Retencion IRPF %",
      +  "maximum": 100,
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / operationType
      Added value: +{
      +  "description": "Operation type (service or goods) / Tipo de operacion",
      +  "enum": [
      +    "service",
      +    "goods"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / poNumber
      Added value: +{
      +  "description": "Client purchase-order reference / Numero de pedido del cliente",
      +  "type": "string"
      +}
    • addedInput schema / properties / prepayment
      Added value: +{
      +  "description": "Prepaid/advance amount already collected in EUR / Anticipo cobrado en EUR",
      +  "minimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / seriesId
      Added value: +{
      +  "description": "Invoice numbering series ID / ID de serie de numeracion",
      +  "type": "string"
      +}
  5. Changed2 schema fields changedv1.13.1
    • addedInput schema / properties / issueDate
      Added value: +{
      +  "description": "Issue date (YYYY-MM-DD) / Fecha de emision",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "clientName": {
      +      "type": "string"
      +    },
      +    "createdAt": {
      +      "type": "string"
      +    },
      +    "dueDate": {
      +      "type": "string"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "issueDate": {
      +      "type": "string"
      +    },
      +    "items": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "description": {
      +            "type": "string"
      +          },
      +          "quantity": {
      +            "type": "number"
      +          },
      +          "unitPrice": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "description",
      +          "quantity",
      +          "unitPrice"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "notes": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "taxRate": {
      +      "type": "number"
      +    },
      +    "total": {
      +      "type": "number"
      +    },
      +    "updatedAt": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "clientName",
      +    "items"
      +  ],
      +  "type": "object"
      +}
  6. First observedv1.1.0

TDQS

A3.9/5.0
Behavior3/5

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

Annotations (readOnlyHint=false, idempotentHint=true, destructiveHint=false) cover the key behavioral traits; the description reinforces PATCH semantics but adds no major new insights beyond what annotations provide.

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?

The description is concise with two clear sentences and an example; the bilingual duplication slightly impacts conciseness but is acceptable.

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?

Given the high parameter count and full schema/ output schema, the description provides sufficient context for an update tool, though it could mention any field-specific constraints (e.g., status transitions).

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%, so parameters are fully documented. The description adds an example and general PATCH behavior but does not elaborate on individual parameters.

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 clearly states 'Update an existing invoice using PATCH semantics' and provides a concrete example, distinguishing it from create or delete invoice tools.

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

Usage Guidelines4/5

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

The description explains partial update behavior ('Only the provided fields will be changed') and gives an example, but does not explicitly state when not to use it or list alternatives.

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

Deploy Server

Other Tools