Skip to main content
Glama
ucetka-mcp

ucetka-mcp

Add customer from ARES

add_customer

Saves a Czech company to the customer address book by IČO, fetching its name, address, VAT ID and VAT status from ARES; requires a unique customer_id and never overwrites existing entries.

Instructions

Save a Czech company to the customer address book (~/.ucetka/customers.yaml) under customer_id, with name, address, DIČ (VAT ID) and VAT status fetched from the ARES registry by IČO (company ID).

Side effects: one HTTPS request to ares.gov.cz, then appends to customers.yaml. Not idempotent: if customer_id already exists it raises an error and changes nothing (existing entries are never overwritten or updated). Fails if the IČO is unknown in ARES or ARES is unreachable. Use lookup_company to only check a company, list_customers to see saved ones. Foreign customers without an IČO cannot be added here; pass their details directly to issue_invoice. Returns a one-line summary of the saved customer.

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": {
      "customer_id": "<customer_id>",
      "ico": "<ico>"
    },
    "name": "add_customer"
  }
}

Input Schema

NameRequiredDescriptionDefault
icoYesCustomer's IČO (company ID), exactly 8 digits, e.g. '27082440'. Name, address, DIČ and VAT status are filled in from ARES.
emailNoAddress that invoices are e-mailed to; draft_invoice_email uses it as the default recipient. Omitted = no e-mail stored.
customer_idYesNew short key for the address book, later passed to issue_invoice as customer_id, e.g. 'vzorova-firma'. Must not exist yet.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / customer_id / description
      Previous value: -"Krátký klíč do adresáře, např. 'vzorova-firma'."New value: +"New short key for the address book, later passed to issue_invoice as customer_id, e.g. 'vzorova-firma'. Must not exist yet."
    • changedInput schema / properties / email / description
      Previous value: -"E-mail pro zasílání faktur."New value: +"Address that invoices are e-mailed to; draft_invoice_email uses it as the default recipient. Omitted = no e-mail stored."
    • changedInput schema / properties / ico / description
      Previous value: -"IČO — údaje se doplní z ARES."New value: +"Customer's IČO (company ID), exactly 8 digits, e.g. '27082440'. Name, address, DIČ and VAT status are filled in from ARES."
    • addedInput schema / properties / ico / pattern
      Added value: +"^\\d{8}$"
  2. First observedv0.1.0

TDQS

A4.6/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 exact file written (~/.ucetka/customers.yaml), the outbound HTTPS call to ares.gov.cz, append-only behavior with no overwrite or update, the error on duplicate customer_id, and the two failure modes (unknown IČO, ARES unreachable). This is strong disclosure; the only small omission is any note on file locking or concurrency behavior for concurrent writes.

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 the core action and store, then side effects, failure modes, alternatives, and exclusions — every sentence earns its place. Slightly long, and the closing return-value sentence is redundant with the existing output schema, which is the only waste.

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 non-idempotent write tool with an external HTTP dependency, the definition covers the durable effect, the non-idempotency, the error conditions, the alternative tools, and the unsupported input class. With an output schema present, it need not describe the return shape beyond the one-line note.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: that IČO is the only real input and name, address, DIČ and VAT status are derived from ARES rather than supplied by the caller, and that customer_id must be new. It clarifies the derivation and the duplicate constraint in prose.

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 ('Save a Czech company to the customer address book'), names the storage location, and names the data source (ARES by IČO). It is immediately distinguishable from lookup_company and list_customers, which are explicitly named as different operations.

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 explicit routing: use lookup_company to only check a company, list_customers to see saved ones. It also states an exclusion — foreign customers without an IČO cannot be added here and should go to issue_invoice — so both when-to-use and when-not-to-use are covered.

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