Skip to main content
Glama

Confirm bill

figa_confirm_bill
DestructiveIdempotent

Confirm an occurrence's actual invoice amount and period, optionally marking it Paid. Ordinary variable bills require the actual amount supplied or confirmed by the user; a forecast, guess or placeholder is not a confirmed invoice, even with a provisional note. Unknown amounts are not eligible for invoice confirmation; forecasts remain estimates. Service confirmations may use the returned service calculation under revision guards. Omitting markPaid preserves payment status; markPaid: true atomically sets Paid without transferring funds or recording a payment. expectedEditContext and expectedPaymentStatusRevision identify the expense state; bill/settings revisions and service activity revision identify the pre-write bill state. Existing Paid preserves its known or unknown date. Changed input or paymentDate conflicts with an existing requestId. Ordinary bills retain the last request receipt; services retain durable receipts. Replays never repeat Paid and do not establish current status. This write requires explicit user intent. A UUID requestId identifies one intended operation; identical retries retain the same ID and payload. A missing response or IDEMPOTENCY_OUTCOME_UNKNOWN, IDEMPOTENT_REQUEST_IN_PROGRESS or INTERNAL_SERVER_ERROR leaves the outcome uncertain, not a confirmed failure. A new ID can duplicate an uncertain write. Corrected inputs after a definite validation or business refusal constitute a new operation. The transport response cache lasts 24 hours; longer replay guarantees are stated above.

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": {
      "workspaceId": "<workspaceId>",
      "requestId": "<requestId>",
      "expenseId": "<expenseId>",
      "bill": "<bill>"
    },
    "name": "figa_confirm_bill"
  }
}

Input Schema

NameRequiredDescriptionDefault
billYesThe actual invoice: amount in minor units, period {start, end}, bill revision (expectedRevision), settings revision (expectedSettingsRevision), service activity revision if applicable, its own requestId, and optional markPaid with payment-state expectations.
expenseIdYesExpense ID as returned by expense reads: a stored expense UUID or the ID of a generated occurrence of a recurring series.
requestIdYesCaller-generated UUID identifying this one intended write. A retry of the same write reuses the ID and payload; the same ID with different input returns IDEMPOTENCY_KEY_MISMATCH.
workspaceIdYesID of a workspace selected for this connection. Other workspaces are rejected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • addedInput schema / properties / bill / description
      Added value: +"The actual invoice: amount in minor units, period {start, end}, bill revision (expectedRevision), settings revision (expectedSettingsRevision), service activity revision if applicable, its own requestId, and optional markPaid with payment-state expectations."
    • addedInput schema / properties / expenseId / description
      Added value: +"Expense ID as returned by expense reads: a stored expense UUID or the ID of a generated occurrence of a recurring series."
    • addedInput schema / properties / requestId / description
      Added value: +"Caller-generated UUID identifying this one intended write. A retry of the same write reuses the ID and payload; the same ID with different input returns IDEMPOTENCY_KEY_MISMATCH."
    • addedInput schema / properties / workspaceId / description
      Added value: +"ID of a workspace selected for this connection. Other workspaces are rejected."
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare idempotentHint=true and destructiveHint=true, and the description goes well beyond them: markPaid is atomic, transfers no funds and records no payment; omitting it preserves status; existing Paid keeps its known or unknown date; replays never re-trigger Paid. It also spells out idempotency semantics — retries reuse requestId and payload, a new ID can duplicate an uncertain write, uncertain outcomes (IDEMPOTENCY_OUTCOME_UNKNOWN, IN_PROGRESS, INTERNAL_SERVER_ERROR) are not confirmed failures. None of this contradicts the annotations.

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

Conciseness3/5

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

The core action is front-loaded in sentence one, and most sentences carry real signal, but the prose is a dense ten-sentence block with redundancy (forecasts are dismissed twice) and heavy jargon sequencing around revisions and receipts. It is accurate but noticeably harder to scan than it needs to be for a single write tool.

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 destructive, idempotent write with no output schema, the description covers payment side effects, revision guards, retry semantics and the 24-hour transport cache, which is the bulk of what an agent needs. It does not describe the shape of the success response or enumerate which validation/business refusal codes are safe to retry after, leaving some gaps.

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 description coverage is 100%, so the baseline would be 3, but the description adds genuine meaning beyond the schema: expectedEditContext and expectedPaymentStatusRevision identify the expense state, while bill/settings revisions and service activity revision identify the pre-write bill state. It also explains that contradicting requestId intent occurs when input or paymentDate changes. Remaining opaque items like historical are left to the schema.

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 states a specific verb and resource — confirming an occurrence's actual invoice amount and period, optionally marking it Paid — which is unambiguous. It also implicitly separates this from forecast siblings by declaring that forecasts, guesses and placeholders are not confirmed invoices. It stops short of naming any sibling explicitly, so differentiation is by concept rather than by tool.

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 gives clear eligibility conditions: ordinary variable bills need a user-supplied or user-confirmed amount, unknown amounts are not eligible, forecasts stay estimates, and the write requires explicit user intent. Those are real when-not rules. What's absent is explicit routing to alternatives such as figa_preview_bill_forecast or figa_get_bill for the non-confirmation path.

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