Skip to main content
Glama
ucetka-mcp

ucetka-mcp

Import new invoice PDFs

sync_invoices
Idempotent

Imports new issued and received invoice PDFs into the ledger for the current and previous year from ISDOC or Alza data, and reports imported and manual-entry counts.

Instructions

Import new PDFs from the issued-invoices folder (read via the embedded ISDOC e-invoice) and the received-invoices folder (ISDOC, or Alza invoice text) into the ledger, for this and last year.

Side effects: adds records under ~/.ucetka/invoices and ~/.ucetka/expenses, re-links moved PDFs and rewrites the issue lists (import_issues.json, expense_issues.json). Idempotent: already-imported PDFs are skipped, so repeating is safe. No network. Returns counts of imported issued/received documents and of documents needing manual entry. Then call list_import_issues and record each listed document with add_expense (received) or add_manual_invoice (issued). tax_overview and export_vat_return run this import automatically.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "sync_invoices"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the annotations it discloses concrete side effects: writes under ~/.ucetka/invoices and ~/.ucetka/expenses, re-linking of moved PDFs, and rewriting of import_issues.json and expense_issues.json. 'Idempotent' and 'no network' largely restate idempotentHint and openWorldHint, but the filesystem-repair behavior adds real value and is not covered by any annotation.

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?

It is front-loaded with purpose before side effects, and every sentence carries information for an agent. There is minor redundancy in restating idempotency and no-network behavior that annotations already declare.

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 an importer with filesystem side effects and a mandatory downstream recording workflow, the description covers inputs, effects, safety, return counts, and next steps. The output schema already details return values, so the brief mention of counts is sufficient without extra detail.

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 zero parameters the baseline is 4; the description still usefully scopes the operation by describing which folders and which date range (this and last year) are processed, which functions as implicit input scoping.

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 opens with a specific verb-plus-resource statement — importing invoice PDFs from the issued-invoices and received-invoices folders into the ledger — and names the parsing sources (ISDOC, Alza invoice text). It is easy to tell apart from siblings like list_import_issues or add_manual_invoice from the text alone.

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?

It states the follow-up workflow explicitly: after syncing, call list_import_issues and record each listed document with add_expense (received) or add_manual_invoice (issued). It also warns that tax_overview and export_vat_return run this import automatically, telling the agent when not to call it redundantly.

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