Skip to main content
Glama
ucetka-mcp

ucetka-mcp

Preview next invoice number

peek_invoice_number
Read-onlyIdempotent

Preview the next invoice number that will be assigned before issuing an invoice; read-only and reserves nothing, so the number may change if another invoice is issued first.

Instructions

Return the invoice number that issue_invoice would assign next, in the form YYMMNNN (year, month of the issue date, 3-digit sequence), e.g. '2610001'.

Read-only and reserves nothing: the number is computed again when issue_invoice runs, so it can change if another invoice is issued in between. Takes into account the ledger (~/.ucetka/invoices) and PDFs already in the issued-invoices folder. Use it to tell the user the number in advance; to create the invoice use issue_invoice.

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": "peek_invoice_number"
  }
}

Input Schema

NameRequiredDescriptionDefault
issue_dateNoIssue date YYYY-MM-DD, e.g. '2026-10-04'; the number series restarts every month. Omitted = today.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / issue_date / description
      Previous value: -"Datum vystavení YYYY-MM-DD. Default dnes."New value: +"Issue date YYYY-MM-DD, e.g. '2026-10-04'; the number series restarts every month. Omitted = today."
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Beyond the readOnly/destructive annotations it discloses what the computation is based on (the ledger at ~/.ucetka/invoices plus PDFs already in the issued-invoices folder) and that the number is recomputed at issue time, so no reservation occurs. The only gap is that the interaction with idempotentHint is left implicit — the returned value can change between calls even though the tool is side-effect free — but there is no actual contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight paragraphs: output format and example first, then behavioral caveat and routing to the sibling. Every sentence carries distinct information and nothing is repeated from the schema.

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?

Although an output schema exists, the description still conveys the one thing an agent must know before acting — that the previewed number is non-binding. For a single-optional-parameter read tool, nothing needed for correct invocation is missing.

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 by explaining how the number encodes the issue date (year plus month, sequence restarting monthly, example '2610001'), which tells the agent why issue_date matters. It does not restate the YYYY-MM-DD format already in the schema, which is appropriate.

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 ('return the invoice number that issue_invoice would assign next') and pins the exact output shape, YYMMNNN with the example '2610001'. It is clearly distinguishable from issue_invoice and get_invoice, so an agent can select it 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?

Explicitly names the use case ('tell the user the number in advance') and the alternative ('to create the invoice use issue_invoice'), including the pre-condition that nothing is reserved. It also warns the value can change if another invoice is issued in between, which is precisely the constraint an agent needs before quoting a number.

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