Skip to main content
Glama

Add expense to manual series

figa_add_expense_to_manual_series
Idempotent

Attach one saved one-time expense to an active expense group (seriesId), preserving its ID and all financial and descriptive fields. Group defaults are not applied and workspace totals do not change; group statistics include the new member. expectedEditContext identifies the source expense version; a changed source returns EXPENSE_WRITE_CONFLICT without saving. MANUAL_SERIES_SOURCE_ASSIGNED means it already belongs to a group; MANUAL_SERIES_SOURCE_INELIGIBLE excludes scheduled occurrences and series bills. MANUAL_SERIES_ARCHIVED means the target group cannot accept members while archived. Returns the updated group total. 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>",
      "seriesId": "<seriesId>",
      "expenseId": "<expenseId>",
      "expectedEditContext": "<expectedEditContext>"
    },
    "name": "figa_add_expense_to_manual_series"
  }
}

Input Schema

NameRequiredDescriptionDefault
seriesIdYesID of the expense group.
expenseIdYesID of the saved one-time expense.
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.
expectedEditContextYeseditContext from the read of that expense, unchanged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / expectedEditContext / description
      Added value: +"editContext from the read of that expense, unchanged."
    • addedInput schema / properties / expenseId / description
      Added value: +"ID of the saved one-time expense."
    • 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 / seriesId / description
      Added value: +"ID of the expense group."
    • addedInput schema / properties / workspaceId / description
      Added value: +"ID of a workspace selected for this connection. Other workspaces are rejected."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Well beyond the annotations, it discloses that group defaults are not applied, workspace totals are unchanged while group statistics include the member, the source version is guarded via expectedEditContext with EXPENSE_WRITE_CONFLICT, archived groups reject members, and the return is the updated group total. It also spells out idempotency semantics, uncertain-outcome codes, and the 24-hour transport cache.

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 and its invariants are front-loaded, but the second half is a dense run-on pile of error codes and idempotency conditions, and the closing line 'longer replay guarantees are stated above' is vague filler. Every idea is relevant, yet the lack of structure makes it harder to scan than it needs to be.

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?

For a write tool with no output schema, the description covers the return value (updated group total), the concurrency guard, the full failure taxonomy including eligibility and archived states, and the retry/uncertainty model. Nothing an agent needs to call it safely appears missing.

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: expectedEditContext is explained as a source-version guard whose mismatch produces EXPENSE_WRITE_CONFLICT, and requestId is framed as one intended operation whose reuse is required for retries. seriesId and expenseId semantics are only lightly restated beyond the schema.

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?

The opening sentence gives a precise verb, resource and scope: attach one saved one-time expense to an active expense group (seriesId), keeping its ID and financial/descriptive fields. That is clearly distinguishable from sibling operations like figa_create_manual_series_from_expense (creating a group from an expense) and figa_move_manual_series_expense (re-parenting).

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?

It states the precondition (a saved one-time expense and an active target group), the 'explicit user intent' requirement for this write, and the eligibility exclusions (scheduled occurrences and series bills are MANUAL_SERIES_SOURCE_INELIGIBLE; already-grouped sources are MANUAL_SERIES_SOURCE_ASSIGNED). It does not explicitly contrast with the closest siblings, but the eligibility rules effectively steer the agent.

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