Skip to main content
Glama

Claim messages from my queue

queue_claim

Claim up to max messages from a queue, each with a lease. Finish with queue_ack, or queue_nack to retry later. A lease that runs out hands the message to the next claim (at least once: make your work idempotent). Returns each message's id, body, attempts and lease (an empty list when none is ready). To only look, use queue_status.

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": {
      "max": 10,
      "queue": "jobs",
      "instance_id": "que_exampleexampleexample2",
      "visibility_timeout_seconds": 120
    },
    "name": "queue_claim"
  }
}

Input Schema

NameRequiredDescriptionDefault
maxNoDefault 1.
queueYesQueue name: 1 to 64 characters from a-z 0-9 . _ -.
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_secondsNoThis claim's lease in seconds (default: the queue's; queue_settings sets it).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / visibility_timeout_seconds / description
      Previous value: -"This claim's lease."New value: +"This claim's lease in seconds (default: the queue's; queue_settings sets it)."
  2. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "instance_id": "que_exampleexampleexample2",
      +    "max": 10,
      +    "queue": "jobs",
      +    "visibility_timeout_seconds": 120
      +  }
      +]
    • 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.7/5.0
Behavior5/5

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

Goes well past the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false) by disclosing the lease model, at-least-once redelivery when a lease expires, the resulting requirement to make work idempotent, and the exact return shape including the empty-list case. This is exactly the operational context the structured fields cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads what the tool does, then the follow-up workflow, then the delivery guarantee, then the return value, then the alternative. Every sentence carries distinct information; nothing is repeated from annotations or schema.

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 5-parameter mutation tool with no output schema, the description supplies the return fields (id, body, attempts, lease), the empty-result case, the lease-expiry consequence, and the paired ack/nack tools. Nothing an agent needs to call it correctly and safely is missing.

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 max, queue, instance_id, passport_token and visibility_timeout_seconds in detail. The description adds only the relational meaning of max and the notion of a lease, without format or bounds beyond the schema. Baseline 3 is right when the schema carries the parameter burden.

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 (claim) and resource (messages from a queue) with scope ('up to max'), and explicitly distinguishes itself from queue_status ('To only look'), queue_ack and queue_nack. An agent can tell what it does and what it does not do without opening any schema.

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

Usage Guidelines5/5

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

Gives the full consumption protocol: claim, then queue_ack to finish or queue_nack to retry later, and queue_status if you only want to look. Each alternative is named with the condition that selects it, so no inference is required.

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.