Skip to main content
Glama
ucetka-mcp

ucetka-mcp

Record existing issued invoice

add_manual_invoice

Records in the ledger an issued invoice whose existing PDF the import could not parse, leaving the document unchanged and returning base and VAT totals.

Instructions

Record in the ledger an issued invoice whose PDF already exists but which the import could not read (see list_import_issues). Nothing is generated or rendered — the PDF stays as it is. Returns a confirmation with the base and VAT.

Writes ~/.ucetka/invoices/.json (customer address left empty, no bank account) and re-runs the issued-invoice import. No network. Not idempotent: fails if the number already exists in the ledger. To create a NEW invoice with a PDF use issue_invoice; for received invoices use add_expense.

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": {
      "pdf_path": "<pdf_path>",
      "number": "<number>",
      "issue_date": "<issue_date>",
      "due_date": "<due_date>",
      "customer_name": "<customer_name>",
      "lines": "<lines>"
    },
    "name": "add_manual_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesInvoice items as on the PDF (at least one), prices per unit without VAT.
numberYesInvoice number as printed on the PDF, e.g. '2603004'. Must be new.
due_dateYesDue date YYYY-MM-DD.
pdf_pathYesAbsolute path of the existing issued-invoice PDF, as listed by list_import_issues. Not read or checked here; a missing file is flagged by the next sync.
paid_dateNoPayment date YYYY-MM-DD if already paid. Omitted = unpaid (set later with mark_paid).
issue_dateYesIssue date YYYY-MM-DD.
customer_dicNoCustomer's DIČ (VAT ID), e.g. 'CZ12345678'. If given, the customer counts as a VAT payer.
customer_icoNoCustomer's IČO (company ID), 6–10 digits. Stored as given, no ARES lookup.
customer_nameYesCustomer's name as on the invoice.
tax_point_dateNoDUZP (tax point date) YYYY-MM-DD. Omitted = issue_date.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed20 schema fields changed
    • changedInput schema / $defs / LineInput / properties / description / description
      Previous value: -"Popis položky, např. 'Přednáška o AI'."New value: +"Item text printed on the document, e.g. 'Přednáška o AI' or 'AI workshop'."
    • changedInput schema / $defs / LineInput / properties / quantity / anyOf
      Previous value: -[
      -  {
      -    "exclusiveMinimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • changedInput schema / $defs / LineInput / properties / quantity / description
      Previous value: -"Počet jednotek (např. hodin)."New value: +"Number of units, e.g. 10 hours. Default 1."
    • changedInput schema / $defs / LineInput / properties / unit / description
      Previous value: -"Jednotka: 'ks', 'h', 'měsíc'…"New value: +"Unit label printed on the document: 'ks' (pieces, default), 'h' (hours), 'měsíc' (month)…"
    • changedInput schema / $defs / LineInput / properties / unit_price / anyOf
      Previous value: -[
      -  {
      -    "exclusiveMinimum": 0,
      -    "type": "number"
      -  },
      -  {
      -    "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "exclusiveMinimum": 0,
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  }
      +]
    • changedInput schema / $defs / LineInput / properties / unit_price / description
      Previous value: -"Jednotková cena BEZ DPH v měně faktury."New value: +"Price per unit WITHOUT VAT, in the document currency (e.g. 1500 = 1 500 CZK or 1 500 EUR). Must be positive, also on credit notes."
    • changedInput schema / $defs / LineInput / properties / vat_rate / anyOf
      Previous value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "type": "number"
      +  },
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / $defs / LineInput / properties / vat_rate / description
      Previous value: -"Sazba DPH v % (21 / 12 / 0). Prázdné = 21 pro plátce, 0 pro neplátce a reverse charge."New value: +"VAT rate in percent: 21, 12 or 0. Omitted = 21 if the supplier is a VAT payer, 0 for a non-payer or reverse charge (on a credit note: the rate of the original invoice's first line). A non-payer or a reverse-charge invoice must use 0."
    • changedInput schema / properties / customer_dic / description
      Previous value: -"DIČ odběratele."New value: +"Customer's DIČ (VAT ID), e.g. 'CZ12345678'. If given, the customer counts as a VAT payer."
    • changedInput schema / properties / customer_ico / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "pattern": "^\\d{6,10}$",
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / customer_ico / description
      Previous value: -"IČO odběratele."New value: +"Customer's IČO (company ID), 6–10 digits. Stored as given, no ARES lookup."
    • changedInput schema / properties / customer_name / description
      Previous value: -"Odběratel."New value: +"Customer's name as on the invoice."
    • changedInput schema / properties / due_date / description
      Previous value: -"Splatnost YYYY-MM-DD."New value: +"Due date YYYY-MM-DD."
    • changedInput schema / properties / issue_date / description
      Previous value: -"Datum vystavení YYYY-MM-DD."New value: +"Issue date YYYY-MM-DD."
    • changedInput schema / properties / lines / description
      Previous value: -"Položky (ceny bez DPH)."New value: +"Invoice items as on the PDF (at least one), prices per unit without VAT."
    • changedInput schema / properties / number / description
      Previous value: -"Číslo faktury."New value: +"Invoice number as printed on the PDF, e.g. '2603004'. Must be new."
    • addedInput schema / properties / number / pattern
      Added value: +"^[A-Za-z0-9_-]{1,20}$"
    • changedInput schema / properties / paid_date / description
      Previous value: -"Datum úhrady, pokud už je zaplacená."New value: +"Payment date YYYY-MM-DD if already paid. Omitted = unpaid (set later with mark_paid)."
    • changedInput schema / properties / pdf_path / description
      Previous value: -"Cesta k existujícímu PDF vydané faktury (z list_import_issues)."New value: +"Absolute path of the existing issued-invoice PDF, as listed by list_import_issues. Not read or checked here; a missing file is flagged by the next sync."
    • changedInput schema / properties / tax_point_date / description
      Previous value: -"DUZP. Default = vystavení."New value: +"DUZP (tax point date) YYYY-MM-DD. Omitted = issue_date."
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the annotations by disclosing the write target (~/.ucetka/invoices/<number>.json), the fact that nothing is generated or rendered, that the customer address is left empty and no bank account is stored, that it re-runs the issued-invoice import, and that it makes no network calls. It also explains the non-idempotency mechanism (fails if the number already exists), which is the concrete consequence behind idempotentHint=false. Minor gap: no mention of what happens to the ledger/import state on that failure or whether the written file is rolled back.

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 with purpose and exclusions, then side effects, then alternatives — a good ordering with almost no waste. The only slightly expendable line is 'Returns a confirmation with the base and VAT', since an output schema already exists.

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 10-parameter mutation tool with annotations and an output schema, the description covers trigger, side effects, non-idempotency, and sibling alternatives. Nothing an agent needs to invoke it safely 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?

Schema description coverage is 100%, so the schema already documents all 10 parameters, including number uniqueness, pdf_path being unchecked, and paid_date defaulting to unpaid. The description adds only marginal parameter meaning beyond that (the derived artifact omits customer address and bank account); it is adequate but does not extend the schema's semantics.

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?

States a specific verb and resource plus a precise scope qualifier: 'Record in the ledger an issued invoice whose PDF already exists but which the import could not read'. It explicitly separates this from issue_invoice (new invoice with PDF) and add_expense (received invoices), so an agent can route correctly 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 Guidelines5/5

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

Gives an explicit trigger condition (a PDF exists but the import could not read it, with a pointer to list_import_issues) and names both alternatives with the condition that selects each: issue_invoice for creating a new invoice with a PDF, add_expense for received invoices.

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