Skip to main content
Glama

Cooper Email

Resolve idempotency key

cooper_resolve_idempotency_key
Idempotent

Use this when an unknown Idempotency-Key matches a message you found in the sent folder. Requires auth and message_send. Inputs: key (required), message_id (required). Marks the key done and links that message so a later retry replays it and does not send again. The message must belong to the key's inbox. Returns the key with state done. A done key is HTTP 409 idempotency_key_done. A fresh in_progress key is HTTP 409 idempotency_request_in_progress. An unknown message is HTTP 404 message_not_found. A missing key is HTTP 404 idempotency_key_not_found.

Input Schema

NameRequiredDescriptionDefault
keyYesIdempotency-Key value to resolve.
message_idYesStored message id (msg_…), draft id, phone number id, or chat reply id on this key's inbox.

Output Schema

NameRequiredDescriptionDefault
keyNoThe Idempotency-Key value.
stateNoin_progress, done, or unknown.
endpointNoEndpoint the key was used on.
inbox_idNoInbox id (inb_…) this object belongs to. Null when it applies to every inbox.
releasedNoTrue when the key was released for reuse.
created_atNoISO-8601 time the object was created.
expires_atNoISO-8601 time the object expires, or null for no expiry.
last_errorNoLast error seen for this key, when any.
message_idNoMessage id (msg_…) this result refers to.
unknown_sinceNoISO-8601 time the outcome became unknown, when it did.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "The key, now in state done.",
      +  "properties": {
      +    "created_at": {
      +      "description": "ISO-8601 time the object was created."
      +    },
      +    "endpoint": {
      +      "description": "Endpoint the key was used on."
      +    },
      +    "expires_at": {
      +      "description": "ISO-8601 time the object expires, or null for no expiry."
      +    },
      +    "inbox_id": {
      +      "description": "Inbox id (inb_…) this object belongs to. Null when it applies to every inbox."
      +    },
      +    "key": {
      +      "description": "The Idempotency-Key value."
      +    },
      +    "last_error": {
      +      "description": "Last error seen for this key, when any."
      +    },
      +    "message_id": {
      +      "description": "Message id (msg_…) this result refers to."
      +    },
      +    "released": {
      +      "description": "True when the key was released for reuse."
      +    },
      +    "state": {
      +      "description": "in_progress, done, or unknown."
      +    },
      +    "unknown_since": {
      +      "description": "ISO-8601 time the outcome became unknown, when it did."
      +    }
      +  },
      +  "type": "object"
      +}
  2. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, idempotent=true, destructive=false), the description discloses required permissions, that it marks the key done and links the message for retry replay, the inbox ownership constraint, and specific HTTP error codes for done, in-progress, unknown-message, and missing-key cases.

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 description is front-loaded with the usage scenario, followed by prerequisites, behavior, and error codes in a logical order. It is slightly verbose in repeating the required inputs already covered by the schema, but no sentence is entirely wasted.

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 mutation tool with idempotency semantics, authentication requirements, and multiple error conditions, the description covers all necessary context. An output schema exists, so return details need not be explained, yet the description still adds useful state and error information.

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 100%, so the schema already documents both parameters fully. The description redundantly lists key and message_id as required and repeats the inbox constraint already present in the message_id field description, adding little beyond the structured data.

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 description states a specific verb and resource: resolving an unknown Idempotency-Key by linking a message found in the sent folder. It clearly distinguishes the operation from sibling tools like get_idempotency_key and release_idempotency_key by describing the exact recovery scenario.

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 gives a precise when-to-use condition: 'when an unknown Idempotency-Key matches a message you found in the sent folder,' and states prerequisites (auth and message_send). It does not explicitly name alternatives such as release_idempotency_key, so it falls short of full routing guidance.

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.