Skip to main content
Glama

Update service calculation

figa_update_service_calculation
DestructiveIdempotent

Save reviewed service price/weekday settings from fromMonth, which must be later than both the current month in the service timezone and the service start month. expectedRevision identifies the current settings version; a stale revision rejects the write. Earlier months retain their existing calculation settings. 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>",
      "settings": "<settings>"
    },
    "name": "figa_update_service_calculation"
  }
}

Input Schema

NameRequiredDescriptionDefault
settingsYesunitPrice: price per session in minor units; weekdays: unique days counted, 0 (Sunday) to 6 (Saturday); fromMonth: first month (YYYY-MM) using these settings; expectedRevision: current settingsRevision.
expenseIdYesTemplate ID of the service billed per session. Occurrence IDs and virtual aliases are rejected.
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: +"Template ID of the service billed per session. Occurrence IDs and virtual aliases are rejected."
    • 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 / settings / description
      Added value: +"unitPrice: price per session in minor units; weekdays: unique days counted, 0 (Sunday) to 6 (Saturday); fromMonth: first month (YYYY-MM) using these settings; expectedRevision: current settingsRevision."
    • addedInput schema / properties / workspaceId / description
      Added value: +"ID of a workspace selected for this connection. Other workspaces are rejected."
  2. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Goes well beyond the annotations: optimistic concurrency via expectedRevision with stale-write rejection, preservation of earlier months' settings, and a detailed idempotency contract covering uncertain outcomes (missing response, IDEMPOTENCY_OUTCOME_UNKNOWN, IN_PROGRESS, INTERNAL_SERVER_ERROR), when a new requestId is legitimate versus duplicative, and the 24-hour response cache. This is exactly the post-annotation context an agent needs for a destructive, idempotent write.

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-loads the core constraint (fromMonth bounds, revision check) before the idempotency discussion, and no sentence is filler. Minor waste from restating that requestId is a caller-generated UUID, already covered by the schema, and a duplicated "from from" in the opening clause.

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?

Covers preconditions, concurrency, idempotency, failure semantics, and retention for a destructive write with no output schema. The only gap is that nothing describes what a successful save returns or the shape of the thrown error payload, though the error codes themselves are enumerated.

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; the description adds real meaning by constraining fromMonth relative to the current month in the service timezone and the service start month, and by explaining that expectedRevision acts as a version guard. It does not elaborate unitPrice or weekdays, deferring to the nested schema description.

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?

States a specific verb and resource (save service price/weekday settings) and pins the scope to fromMonth and forward, which distinguishes it from a read or preview. It does not name the sibling preview tool explicitly, so differentiation is clear but not fully explicit.

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?

Implies the preview-then-save workflow ("reviewed" settings) and states "This write requires explicit user intent," plus a concrete precondition on fromMonth. It never names the alternative read/preview tools or states when not to use it, but the guiding context is clear.

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