Skip to main content
Glama

Izdaj fiskalni račun

tezga_izdaj_racun
Idempotent

Issues and fiscalizes a sales invoice through V-PFR, returning the PFR number, QR code, verification URL and public PDF link. Reuses externalId so the same order never creates a duplicate invoice.

Instructions

Izdaje i fiskalizuje račun preko V-PFR-a i vraća PFR broj, QR, verifikacioni URL i javni PDF link. Idempotentno: isti externalId nikad ne pravi drugi račun. U produkciji traži potvrdiProdukciju=true.

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": {
      "externalId": "<externalId>",
      "stavke": "<stavke>"
    },
    "name": "tezga_izdaj_racun"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokNoPodrazumevano fiskalni
kupacNoKupac: { naziv, email?, pib?, ... }. Sa pib postaje B2B.
stavkeYesStavke računa (do 500)
popustRsdNo
externalIdYesTvoj jedinstven broj porudžbine (idempotentnost)
datumUplateNo
posaljiMejlNoAko true i ima kupac.email, Tezga šalje račun kupcu
nacinPlacanjaNonpr. Kartica, Gotovina, Instant, Prenos na račun, Ček, Vaučer
popustProcenatNo
potvrdiProdukcijuNoMora biti true da bi se izdao PRAVI račun u produkciji

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already set idempotentHint and destructiveHint, but the description adds the specific idempotency key semantics ('isti externalId nikad ne pravi drugi račun') and the production-confirmation gate, which are real behavioral constraints not inferable from the annotation booleans. It also pre-empts the missing output schema by naming the returned artifacts (PFR broj, QR, verifikacioni URL, javni PDF link).

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?

Three short sentences, front-loaded with purpose, then idempotency, then the production caveat. No filler and every clause carries information an agent needs before calling.

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?

For a 10-parameter nested fiscalization mutation with no output schema, the description covers purpose, idempotency, production gating and return payload — enough to call it correctly. Gaps remain around failure behavior (what happens if fiscalization fails or the externalId collides with different content) and around which 'tok' value maps to the sibling advance tool.

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 70% and the schema itself documents externalId and potvrdiProdukciju in the same terms the description uses, so the description mostly echoes structured data. It adds nothing about the nested 'stavke' shape, the 'tok' variants, or the discount precedence between popustRsd/popustProcenat at item and document level. Baseline 3 is appropriate given decent schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource pair (izdaje i fiskalizuje račun) plus the mechanism (V-PFR) and the concrete outputs, so the agent knows exactly what invoking it produces. It does not, however, address the overlap with the sibling tezga_avans or the 'avans'/'predracun' values of the 'tok' enum, which could make an agent unsure whether this tool or the advance sibling is correct for an advance invoice.

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

Usage Guidelines3/5

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

The production-mode prerequisite ('U produkciji traži potvrdiProdukciju=true') is a genuine usage instruction, but there is no guidance on when to prefer this tool over tezga_storno_ili_refundacija or tezga_avans, and no statement of what to do when the invoice should not be issued. Usage is implied by the verb rather than explained.

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