Skip to main content
Glama

fail_lease

Release a held lease as failed. With requeue=true (default) and attempts remaining, the card is re-queued behind a backoff window; once attempts are exhausted it dead-letters in place. Returns the released lease. Mirrors POST /v1/leases/{lease_id}:fail. Present the lease_token receipt from the claim; a stale token is refused with 409 lease_lost. Idempotent: a second fail with the same token on an already-failed lease is a no-op. reason is stashed on the lease row for the audit trail.

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": {
      "lease_id": "<lease_id>",
      "lease_token": "<lease_token>"
    },
    "name": "fail_lease"
  }
}

Input Schema

NameRequiredDescriptionDefault
reasonNo
requeueNo
lease_idYes
lease_tokenYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are supplied, so the description carries the full burden and does so thoroughly: requeue default true, backoff window, dead-letter-in-place when attempts are exhausted, 409 lease_lost for stale tokens, and idempotent no-op on repeat fails. It also discloses where the reason is persisted for audit.

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?

Dense but front-loaded: purpose first, then branch behavior, endpoint mirror, error condition, idempotency, and the reason parameter. No filler sentences, though the trailing reason note is slightly detached from the rest of the flow.

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?

An output schema exists, yet the description still briefly states the return (the released lease), and it covers the error contract and idempotency that an agent needs before calling a mutation. Nothing material is missing for a 4-parameter lease-failure tool.

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?

Schema coverage is 0%, and the description compensates for every meaningful parameter: requeue's default and branching behavior, lease_token's provenance and failure mode, and reason's storage location. Only lease_id is left implicit via the mirrored endpoint path.

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?

Specific verb and resource: "Release a held lease as failed," plus the exact REST endpoint it mirrors (POST /v1/leases/{lease_id}:fail). Clearly differentiated from sibling terminal operations like complete_lease and renew_lease by the failure/requeue semantics.

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 concrete precondition (present the lease_token receipt from the claim) and explains when requeue applies (attempts remaining) versus when it dead-letters. It stops short of naming an explicit alternative such as complete_lease for successful outcomes, so no clear when-not-to-use 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.

Resources