Skip to main content
Glama

Set payment status

figa_set_payment_status
DestructiveIdempotent

Set Paid or Unpaid without transferring money or creating a payment ledger entry. Expectations describe the current expense editContext, paymentStatusRevision and confirmed bill revision. For an unconfirmed service bill with sessions, status.servicePlan contains the displayed calculation amount and period, bill/settings/activity revisions and a stable requestId; Paid atomically confirms that calculation and preserves its first snapshot. Zero-session and skipped bills cannot become Paid. Ordinary variable forecasts require confirmation of the actual invoice amount before Paid. A guess, estimate or placeholder, even with a provisional note, is not an actual invoice amount; unknown invoices remain unconfirmed and Unpaid. This operation does not correct invoice amounts. Repeated Paid preserves its known or unknown date. Unpaid clears the current date and preserves archived history. In a due-window series, Paid moves expenseDate to the payment day and its month; Unpaid restores the window start unless the date changed after payment. A replayed result describes the original operation, not necessarily 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>",
      "status": "<status>"
    },
    "name": "figa_set_payment_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
statusYesisPaid (true for Paid, false for Unpaid), the current expectedPaymentStatusRevision and expectedEditContext, expectedBillRevision for a confirmed bill, optional paymentDate in Unix seconds, and servicePlan for an unconfirmed service bill.
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 / 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 / status / description
      Added value: +"isPaid (true for Paid, false for Unpaid), the current expectedPaymentStatusRevision and expectedEditContext, expectedBillRevision for a confirmed bill, optional paymentDate in Unix seconds, and servicePlan for an unconfirmed service bill."
    • 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?

Goes well beyond the annotations: it discloses that Paid atomically confirms a service-plan snapshot, that date handling in due-window series differs for Paid vs Unpaid, that archived history is preserved, and that repeat Paid keeps a known/unknown date. The idempotency contract is unusually explicit — reused requestId with different payload, uncertain outcomes on missing response or INTERNAL_SERVER_ERROR, duplicate risk from a new ID, and a 24-hour response cache. This is exactly the behavior an agent cannot infer from destructiveHint/idempotentHint alone.

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 purpose leads and no sentence is pure filler, but it is a dense wall of run-on clauses mixing atomicity, date semantics, idempotency and cache lifetime without grouping or ordering. Given the tool's complexity some length is justified, yet the lack of structure makes key rules easy to miss.

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 nested, destructive, idempotent write with no output schema, it covers the hard parts: preconditions, snapshot confirmation, date behavior, replay semantics and uncertainty handling. It is nearly self-sufficient, with only the concrete response shape beyond 'a replayed result describes the original operation' left implicit.

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 structural baseline is satisfied, but the description adds real meaning: it explains that the expectation fields must describe the current editContext, paymentStatusRevision and confirmed bill revision, that servicePlan carries the displayed calculation amount and period plus revisions and a stable requestId, and that paymentDate is preserved or cleared depending on direction. That is more than the schema's field-level docstrings provide.

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?

Opens with a specific verb+resource ('Set Paid or Unpaid') and immediately scopes it as a pure status flag: no money transfer, no ledger entry, no invoice-amount correction. This reliably separates it from payment-listing and bill-confirmation siblings, though it never names a sibling to route the agent elsewhere.

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?

Gives concrete when-not conditions: zero-session and skipped bills cannot become Paid, ordinary variable forecasts require the actual invoice amount, and unknown invoices stay Unpaid. It also demands explicit user intent and treats corrected inputs as a new operation. It stops short of pointing to a specific alternative tool (e.g. bill confirmation) when this one is blocked.

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