Skip to main content
Glama

claim_run

Provider atomically claims a queued job or eligible expired lease. Use capability_id to restrict the worker to a configured capability. Returns a private claim_token; stale tokens cannot complete a newer attempt.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "claim_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
capability_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare not-read-only, not-idempotent, non-destructive, open-world. The description adds real context beyond that: the claim is atomic, an expired lease is only eligible under some condition, the returned claim_token is private, and stale tokens are fenced off from completing a newer attempt. That fencing-token semantics is genuinely useful. It still omits how long a claim is held and whether heartbeat_run is required to keep it.

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?

Three short sentences, front-loaded with purpose, then the parameter constraint, then the return/token caveat. No padding and no restatement of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 does at least name the returned claim_token, which is the critical return detail. For a lease-based claim tool it is still thin: no claim duration, no expiry behavior, and no pointer to heartbeat_run for keeping the lease alive. Adequate to call, but an agent could misuse the lease.

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 0% for the single parameter, so the description carries the burden: it says capability_id restricts the worker to a configured capability, which is meaningful beyond the string type and maxLength. It does not state what happens when the field is omitted (the schema marks it unrequired), which is the main open question for a worker pulling arbitrary work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Provider atomically claims a queued job or eligible expired lease" gives a specific verb (claims), a specific resource (queued job / expired lease), and the atomicity guarantee. It reads clearly against siblings such as get_run or list_runs, though it never explicitly contrasts with accept_run, which is the closest ambiguous alternative.

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

Usage Guidelines3/5

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

The description implies the usage context (a worker pulling work from a queue) and explains the optional capability_id restriction, but it gives no explicit when-not rule and does not name accept_run/start_run as the alternative path once a claim exists. Usage must be inferred from the queue-pull framing.

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