Skip to main content
Glama

iFirma: Add expense

ifirma_add_expense

iFirma: Add a cost document by hand: goods purchase, business cost or phone and internet bill. Adds one cost document with the amounts per VAT rate. KSeF marking is required: number (with ksef_number), offline, bfk or di. The seller is matched by contractor_id or NIP. The cost goes into your records. By default you confirm each call; you can switch that off for this tool. Reaches other people: confirm with the user before each call. Needs the user's Cotlet API key with access to this app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesgoods_purchase, business_cost_invoice or phone_internet.
net_23NoNet amount at 23%. The same for net_8, net_5, net_0 and net_exempt.
vat_23NoVAT amount at 23%. The same for vat_8 and vat_5.
issue_dateYesYYYY-MM-DD.
ksef_numberNoRequired when ksef_marking is number.
expense_nameYesName of the expense.
ksef_markingYesnumber, offline, bfk or di.
contractor_idNoContractor ID from list_contractors.
invoice_numberYesNumber printed on the supplier document.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already carry readOnlyHint=false, destructiveHint=false and openWorldHint=true, so the description's added value is the confirmation protocol: confirmation is on by default, can be disabled for this tool, and the user must be asked before each call because it "reaches other people." It also discloses the Cotlet API key/scope requirement, which annotations do not. Strong added context, though the "reaches other people" warning stays vague about the actual external effect.

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-loads the verb and resource, then layers the confirmation and auth notes in short sentences. Mostly efficient, but "The cost goes into your records" is near-redundant with the mutation already implied, and the two confirmation sentences could be tightened into one.

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 mutation tool with no output schema, it covers what matters before calling: confirmation default, overriding the confirmation, required API key scope, and the ksef_marking dependency. It does not hint at what the call returns (e.g. new document id), which is the only notable gap given no output schema exists.

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 genuine cross-field meaning: ksef_marking=number specifically requires ksef_number, and the seller is resolved via contractor_id or NIP. Minor concern: NIP is referenced but does not appear as a schema property (additionalProperties=false), so the seller-matching note is slightly at odds with the actual parameter set.

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+resource (add a cost document/expense) and immediately scopes it as manual entry ("by hand") with the three concrete document types, which is exactly what distinguishes it from the sibling ifirma_book_ksef_purchase_invoice. An agent can tell what this tool does without opening the schema.

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 "by hand" framing and the list of supported cost types give clear context for when to use it, and it flags the ksef_marking requirement and seller-matching path. However, it never names an alternative sibling (e.g. the KSeF purchase-invoice booking tool) to route the agent away when a KSeF invoice already exists, so the exclusion is implicit rather than explicit.

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