Skip to main content
Glama

Bulk create expenses

figa_bulk_create_expenses
Idempotent

Create 1 to 50 expenses in order. Each expense follows the input schema, including fixed-only markPaid, minor-unit amounts, optional category and mutually exclusive tagIds/tagInputs. Variable expenses require a recurring schedule or service calculation. A malformed item rejects the entire call before saving. Otherwise each item succeeds or fails independently: results contains its index, success with expenseId, or failure with error.code/message, such as EXPENSE_LIMIT_REACHED. Failed items save nothing. Repeated category/tag drafts are created once per batch. Existing expenses are not deduplicated. Identical retries do not create the batch twice. On a limited plan, replayed batch results can be IDEMPOTENCY_RESPONSE_RESTRICTED, although the saved expenses remain subject to ordinary visibility. 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>",
      "expenses": "<expenses>"
    },
    "name": "figa_bulk_create_expenses"
  }
}

Input Schema

NameRequiredDescriptionDefault
expensesYes1 to 50 expenses, created in this order; each has the same shape as a single created 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / expenses / description
      Added value: +"1 to 50 expenses, created in this order; each has the same shape as a single created 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 / workspaceId / description
      Added value: +"ID of a workspace selected for this connection. Other workspaces are rejected."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (idempotentHint/destructiveHint already cover safety) by disclosing batch atomicity rules: malformed item rejects the whole call before saving, otherwise per-item independent success/failure with index and error codes, failed items save nothing. It also discloses no deduplication against existing expenses, draft category/tag creation once per batch, 24-hour response cache, plan-related IDEMPOTENCY_RESPONSE_RESTRICTED, and the uncertain-outcome error set.

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-loaded with the core action, and most sentences carry distinct information (batch atomicity, partial failure, idempotency, uncertainty). There is some redundancy, such as restating retry behavior twice ("Identical retries do not create the batch twice" and the requestId sentence), which costs it a point.

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 maximum-complexity nested batch write with no output schema, the description still explains the results shape (index plus expenseId or error), failure isolation, and the full idempotency/uncertainty model. An agent has what it needs to call it and interpret outcomes correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage the baseline is 3, but the description adds real meaning: markPaid is fixed-only, amounts are in minor units, tagIds/tagInputs are mutually exclusive, variable expenses require a schedule or service calculation, and requestId must be reused identically on retry. These constrain correct invocation in ways the schema does not.

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 and resource plus scope: "Create 1 to 50 expenses in order." The bulk cardinality and per-item semantics distinguish it from a single-expense create without needing to name the sibling.

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 a clear gating condition ("This write requires explicit user intent") and detailed when-to-retry vs when-to-use-a-new-ID guidance, including which errors mean uncertain rather than failed. It does not explicitly point to a single-expense alternative for one-item writes, which keeps it short of a 5.

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