Skip to main content
Glama

Create manual series from expense

figa_create_manual_series_from_expense
Idempotent

Create an expense group and attach one saved one-time expense as its first member atomically, retaining the expense ID. expectedEditContext is the unchanged context of the source expense version; a changed or newly assigned source returns EXPENSE_WRITE_CONFLICT with no group created. name is required. categoryInput, recipientInput, tagInputs and currency define defaults for future expenses, accepting existing IDs or local drafts. Existing amount, date, Paid status, FX, description, tags and attachments are unchanged; no workspace total changes. MANUAL_SERIES_SOURCE_ASSIGNED means already in a group; MANUAL_SERIES_SOURCE_INELIGIBLE means a scheduled occurrence or series bill cannot start a group. 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>",
      "name": "<name>",
      "expenseId": "<expenseId>",
      "expectedEditContext": "<expectedEditContext>"
    },
    "name": "figa_create_manual_series_from_expense"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesGroup name, 1-200 characters.
currencyNoDefault currency, one of the supported currency codes; omitted means the workspace currency.
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.
tagInputsNoDefault tags, at most 50: accessible tag IDs or drafts {name}.
workspaceIdYesID of a workspace selected for this connection. Other workspaces are rejected.
categoryInputNoDefault category: an accessible category ID, a category name, or a local draft {name, parentId or parentName}.
recipientInputNoDefault recipient: an accessible recipient ID, or a name that reuses a matching recipient or creates one.
expectedEditContextYeseditContext from the read of that expense, unchanged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / categoryInput / description
      Added value: +"Default category: an accessible category ID, a category name, or a local draft {name, parentId or parentName}."
    • addedInput schema / properties / currency / description
      Added value: +"Default currency, one of the supported currency codes; omitted means the workspace currency."
    • 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 / name / description
      Added value: +"Group name, 1-200 characters."
    • addedInput schema / properties / recipientInput / description
      Added value: +"Default recipient: an accessible recipient ID, or a name that reuses a matching recipient or creates one."
    • 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 / tagInputs / description
      Added value: +"Default tags, at most 50: accessible tag IDs or drafts {name}."
    • addedInput schema / properties / workspaceId / description
      Added value: +"ID of a workspace selected for this connection. Other workspaces are rejected."
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare the write/non-destructive/idempotent profile, yet the description still adds substantial behavior: atomicity with no group created on conflict, EXPENSE_WRITE_CONFLICT on stale expectedEditContext, preservation of amount/date/Paid/FX/description/tags/attachments, and no change to workspace totals. It also spells out the uncertain-outcome cases (missing response, IDEMPOTENCY_OUTCOME_UNKNOWN, IDEMPOTENT_REQUEST_IN_PROGRESS, INTERNAL_SERVER_ERROR), the duplicate risk of a fresh requestId, 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.

Conciseness4/5

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

The core action and atomicity guarantee are front-loaded, and the error/idempotency clauses are dense but each carries operational weight. Some sentences are run-on (the uncertainty list in particular) and could be split, but there is very little redundancy.

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 9-parameter mutation with no output schema and a non-trivial idempotency contract, the description covers the atomicity guarantee, the conflict/eligibility error codes, the preservation semantics, and retry safety. An agent can call this correctly and interpret ambiguous outcomes without further documentation.

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 schema carries the baseline, but the description still adds meaning: expectedEditContext is the unchanged context from the source read and its staleness produces a conflict, name is required, and category/recipient/tag/currency inputs are defaults for future expenses accepting either existing IDs or local drafts. That is genuine semantic value beyond the field descriptions.

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 description opens with a specific verb and resource plus a precise scope: create an expense group and attach exactly one saved one-time expense as its first member, atomically, retaining the expense ID. The 'first member' and 'one-time expense' framing implicitly separates it from the plain series-create and add-expense siblings, but no sibling is named outright, so an agent must infer the routing.

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?

Eligibility rules are stated concretely: the source must not already be in a group (MANUAL_SERIES_SOURCE_ASSIGNED) and cannot be a scheduled occurrence or series bill (MANUAL_SERIES_SOURCE_INELIGIBLE). It also flags that explicit user intent is required. What is missing is an explicit pointer to which sibling to use instead (e.g. plain create_manual_series or add_expense_to_manual_series) when those conditions fail.

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