Skip to main content
Glama

Müügiarve ettepanek

propose_sales_invoice

Koosta KINNITAMATA müügiarve ettepanek. See EI loo arvet — kasutaja näeb vestluses arve eelvaadet (klient, read, KM, summad, tähtaeg, eeldatav number, PDF-eelvaade) ja valib „Kinnita ja väljasta" (kanne + PDF), „Salvesta mustandina" või lükkab tagasi. KM-i määra EI anna — programm tuletab selle kliendi riigi/KM-staatuse ja tulukonto järgi (vastuses iga rea KM-käsitlus). Arve numbrit EI anna — kinnitamisel määratakse järgmine vaba number. Tulukonto jäta andmata, kui kasutaja seda ei nimeta (kasutatakse kliendi vaikekontot või viimase arve kontot). Parandusel koosta UUS ettepanek ja anna replacesProposalId — vana kaart märgitakse asendatuks.

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": {
      "lines": "<lines>",
      "rationale": "<rationale>"
    },
    "name": "propose_sales_invoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
linesYesArveread (1–30).
dueDateNoMaksetähtaeg YYYY-MM-DD
dueDaysNoMaksetähtaeg päevades (vaikimisi müügiarvete seadetest). Kasuta seda VÕI dueDate.
currencyNoValuuta, vaikimisi EUR
customerNoUus klient (kliendiregistris puudub). Äriregistri vaste korral piisab regCode-st — nimi, KMKR ja aadress laetakse registrist.
languageNoArve PDF keel (vaikimisi kliendi eelistus või seadetest)
rationaleYesLühike eestikeelne selgitus kaardile, nt „Korratud augusti arve 2026-0041 read".
customerIdNoOlemasoleva kliendi id find_customers tulemusest. Kasuta seda VÕI customer.
descriptionNoLisatekst arvele (valikuline), nt tellimuse number
invoiceDateNoArve kuupäev YYYY-MM-DD (vaikimisi täna)
vatIncludedNotrue = ühikuhinnad sisaldavad juba käibemaksu (kasutaja ütles nt „100 € koos KM-ga")
replacesProposalIdNoParandatava varasema müügiarve ettepaneku id (kui kasutaja palus kaardil olevat arvet muuta).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations (which only say non-read-only, open-world, non-idempotent, non-destructive), the description discloses that no invoice is actually created until the human confirms, that the response carries per-line VAT treatment, that the invoice number is assigned only at confirmation, and that a replaced proposal card is marked as superseded. These are exactly the non-obvious side effects and lifecycle facts an agent cannot get from structured fields.

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?

The key constraint (this does NOT create an invoice) is front-loaded and the remaining sentences are each doing distinct work — flow, VAT derivation, numbering, account default, correction path. It is dense but not padded, though the flow sentence is long enough to be slightly harder to scan than ideal.

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 12-parameter tool with nested line objects and no output schema, the description covers the behaviors that matter: lifecycle, derivation of omitted values, and the correction mechanism, and it hints at response contents. Minor omissions remain, such as the 1–30 line limit and the customerId-vs-customer exclusivity, but those are already documented in the schema.

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 real meaning on top: VAT and invoice number must not be supplied because they are derived, accountCode should be left empty unless named, and replacesProposalId is tied to a specific user-intent scenario. That goes beyond restating field descriptions.

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?

The opening sentence gives a specific verb and resource ("Koosta KINNITAMATA müügiarve ettepanek") and immediately negates the obvious misreading with "See EI loo arvet", so an agent knows this is a preview/proposal rather than an issuance. It stops short of naming the closest sibling, create_sales_invoice_draft, so the boundary between "proposal" and "draft" is left to inference.

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

Usage Guidelines4/5

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

The description spells out the downstream flow (user sees a preview card and picks confirm, save-as-draft, or reject), states explicitly not to pass VAT or an invoice number, and instructs to omit accountCode when the user doesn't mention it. The correction path is also given: build a NEW proposal and pass replacesProposalId. What's missing is an explicit statement of when to prefer this over alternatives such as create_sales_invoice_draft.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources