Skip to main content
Glama

Commit idempotency

idem_commit

Store the outcome reference for an idempotency key. scope (max 64) and owner are optional. When owner is omitted, the caller key hash is sent. Call keys.create once. Pass caller_key on every later tools/call.

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": {
      "key": "<key>",
      "result_ref": "<result_ref>"
    },
    "name": "idem_commit"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYes
ownerNo
scopeNo
caller_keyNopf_ key from keys.create. Pass this on tools/call when Authorization and X-Caller-Key are not set. A header key wins if both are set.
result_refYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, and 'Store the outcome reference' is consistent with a non-destructive write. The description adds a real behavioral detail — when owner is omitted the caller key hash is sent — but says nothing about what happens on a repeat commit for the same key (overwrite, conflict, or no-op) or about failure modes.

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?

Four short sentences with the core behavior front-loaded and no filler. The phrasing is telegraphic and the auth-setup sentences sit slightly awkwardly next to the storage semantics, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter mutation tool with no output schema and light annotations, the description covers the auth path and two field constraints but leaves the commit's effect on an existing key, error behavior, and the meaning of result_ref underspecified.

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

Parameters3/5

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

Schema coverage is 20%, so the description has to carry weight; it partially does, explaining that scope caps at 64, owner is optional, and how caller_key relates to keys.create. The two required parameters, key and result_ref, are only implicitly defined through the phrase 'outcome reference for an idempotency key', with no format or uniqueness semantics.

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 first sentence gives a specific verb and resource: 'Store the outcome reference for an idempotency key.' That is enough for an agent to distinguish a write-side commit from a begin/acquire style sibling. It stops short of naming or contrasting with idem.begin, so differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Prerequisites are explicit ('Call keys.create once', 'Pass caller_key on every later tools/call'), which tells the agent how to authenticate. It never states when this tool is the right choice versus idem.begin or what condition should precede the commit, so usage is only implied.

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