Skip to main content
Glama

complete_lease

Complete a held lease: optionally patch the card (properties is merged), advance it to the contract's on_success_column_id, and release the lease, all in one transaction. Returns the released lease plus the updated card. Mirrors POST /v1/leases/{lease_id}:complete. Present the lease_token receipt from the claim; a stale token is refused with 409 lease_lost. Idempotent: a second complete with the same token on an already-completed lease is a no-op (the card is not moved twice). output is stored on the lease row. The nested card carries a top-level unique_id: the resolved human key ("BUG-12"), or null when the board defines no unique_id property.

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": "complete_lease"
  }
}

Input Schema

NameRequiredDescriptionDefault
outputNo
lease_idYes
propertiesNo
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?

With no annotations, the description carries the full behavioral burden and does so: mutation is atomic across three effects, stale tokens are refused with a specific error code, a second call is a no-op that will not move the card twice, and output is persisted on the lease row. That is exactly the transactional and idempotency context an agent needs before an irreversible 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-loaded with the operation and its three effects, then error and idempotency behavior, then return-shape notes, so nothing important is buried. It is dense but nearly every clause adds a decision-relevant fact; the closing sentence about unique_id resolution is the one piece that flirts with return-value detail an output schema might cover.

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 mutating, idempotent, token-guarded tool with 0% schema description coverage, this covers preconditions, atomic effects, failure mode, retry semantics, and what the response carries. An agent has everything needed to invoke it correctly and to interpret a 409 versus a success.

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 description coverage is 0%, yet all four parameters are given meaning: properties is a merge-patch rather than a replacement, lease_token is a receipt that can be stale, output is stored on the lease row, and lease_id is the target identified by the mirrored REST route. No parameter is left for the agent to guess at.

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 (complete) and resource (a held lease), plus the exact three operations performed (patch card, advance to on_success_column_id, release lease) in one transaction. It even maps itself to the underlying REST route, so an agent can distinguish it from fail_lease or renew_lease on the same resource.

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?

Makes the precondition explicit: this is for completing a lease you hold, and you must present the lease_token receipt from the claim. It also states the consequence of a stale token (409 lease_lost) and that repeats are idempotent, which tells the agent a retry is safe. It never names a sibling alternative (fail_lease/renew_lease) for the other outcomes, so it stops short of full when-not 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