Skip to main content
Glama

Extend queue leases

queue_extend
Destructive

More time for long work: each lease from queue_claim that has not run out ends visibility_timeout_seconds from now (a shorter time than is left shortens it). Call it before the lease ends; finish with queue_ack or queue_nack. Returns extended (each new lease_expires_at) and lost (leases that ran out or matched nothing).

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "queue": "jobs",
      "leases": [
        "lse_0123456789abcdef0123456789abcdef"
      ],
      "instance_id": "que_exampleexampleexample2",
      "visibility_timeout_seconds": 300
    },
    "name": "queue_extend"
  }
}

Input Schema

NameRequiredDescriptionDefault
queueYesQueue name: 1 to 64 characters from a-z 0-9 . _ -.
leasesYesLeases (lse_...) from queue_claim.
instance_idYesUtility instance id from buy or list_utilities.
passport_tokenNoYour amp_ token, only if you have no app sign-in and cannot send a header.
visibility_timeout_secondsYesThe lease ends this many seconds from now.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / leases / description
      Previous value: -"Leases from queue_claim."New value: +"Leases (lse_...) from queue_claim."
  2. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "instance_id": "que_exampleexampleexample2",
      +    "leases": [
      +      "lse_0123456789abcdef0123456789abcdef"
      +    ],
      +    "queue": "jobs",
      +    "visibility_timeout_seconds": 300
      +  }
      +]
    • changedInput schema / properties / passport_token / description
      Previous value: -"Your amp_ token, only if your app has no sign-in and cannot send it as an Authorization header."New value: +"Your amp_ token, only if you have no app sign-in and cannot send a header."
  3. Changed4 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / passport_token / description
      Previous value: -"Your amp_ token, only if your client cannot send it as an Authorization header; leave it out when your MCP app signed in."New value: +"Your amp_ token, only if your app has no sign-in and cannot send it as an Authorization header."
    • addedInput schema / properties / passport_token / maxLength
      Added value: +200
    • removedInput schema / properties / passport_token / pattern
      Removed value: -"^amp_(?:s_)?[A-Za-z0-9_-]{43}$"
  4. Added

TDQS

A4.4/5.0
Behavior4/5

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

Adds real behavior beyond the annotations: the non-obvious rule that a shorter visibility_timeout_seconds shortens the remaining lease (consistent with destructiveHint=true), that expiry forfeits the lease, and that the response splits into 'extended' and 'lost' buckets. It does not disclose atomicity if only some leases in the array are lost, nor any auth notes for passport_token, which the schema carries instead.

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?

Three short sentences, front-loaded with the purpose, then the mechanism, then the return shape — no filler. The parenthetical is dense but necessary; nothing could be cut without losing meaning.

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?

With no output schema, the description supplies the return contract ('extended' with new lease_expires_at, and 'lost'), which is exactly what the agent needs. Combined with full schema coverage and annotations, nothing essential to calling this mutation correctly is missing.

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, and the description earns a bump by clarifying that the timeout is measured from now rather than added to the existing expiry, plus the shortening edge case and which leases qualify. The remaining parameters (queue, leases, instance_id) are left to schema descriptions that already document them well.

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?

States a specific verb and resource ('extend' lease visibility timeouts) and anchors it to the sibling that creates those leases ('each lease from queue_claim'). The parenthetical about a shorter value shortening the lease makes the exact effect unambiguous without opening the schema.

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?

Explicitly says when to call it ('before the lease ends') and what to do afterward ('finish with queue_ack or queue_nack'), which routes the agent across siblings. It stops short of covering the failure path — e.g. what to do with leases returned in 'lost' (re-claim vs. abandon) — so it is strong but not exhaustive.

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.