Skip to main content
Glama

Prepare sending an invoice to KSeF

prepare_send_invoice_to_ksef

Checks that an issued invoice of a Polish company can be sent to KSeF (the Polish national e-invoicing system) and returns a summary of the submission for the user's confirmation: the number and date, the seller NIP, the buyer, the gross total, the KSeF environment (a test environment is not legally binding), the mode (online, or offline24 for an issue date before today in Poland), the KSeF warnings and the current KSeF status, with a one-time confirmation token valid for 10 minutes. Nothing is sent.

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": {
      "company_id": "<company_id>",
      "invoice_id": "<invoice_id>"
    },
    "name": "prepare_send_invoice_to_ksef"
  }
}

Input Schema

NameRequiredDescriptionDefault
company_idYesThe id of the company, from list_companies.
invoice_idYesThe id of the issued invoice, from list_invoices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only mark this as non-read-only, non-idempotent and non-destructive; the description adds that no submission occurs, that a one-time token expiring in 10 minutes is issued, and that the KSeF environment and online vs offline24 mode affect validity. It also resolves the apparent read/write ambiguity by explaining that state (a token) is produced without sending anything.

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 closes with the key safety fact 'Nothing is sent'. The middle is a single dense enumerated clause covering six returned fields, which is information-rich but harder to scan than a short structured list.

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?

There is no output schema, and the description fully compensates by enumerating exactly what the summary contains: number and date, seller NIP, buyer, gross total, environment, mode, warnings, status and token. An agent knows precisely what comes back and how long the token is valid.

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 100%, with both company_id and invoice_id documented including their source tools (list_companies, list_invoices). The description adds no further meaning about the parameters, so the baseline 3 applies.

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: validates that an issued invoice of a Polish company can be sent to KSeF and returns a confirmation summary. The closing 'Nothing is sent' plus the sibling name send_invoice_to_ksef makes the distinction from the actual send operation unmistakable.

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 makes the workflow position clear ('for the user's confirmation', 'Nothing is sent'), which implies this is the pre-step to actually sending. It does not explicitly name send_invoice_to_ksef as the follow-up tool or state exclusions such as when an invoice cannot be prepared at all.

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