Skip to main content
Glama

Claim agent run

claim_agent_run
Idempotent

Claims a Ready agent run for this runner, moving it to Working. Returns true when this call claimed it, false when it was no longer Ready (another runner claimed it first, or it was cancelled) or its issue is blocked - on false, skip the run. Atomic: of two runners claiming the same run, exactly one gets true. Only the issue's assignee can claim it (a runner works only on its own user's issues). After claiming, move the issue to its epic's first InProgress status with edit_issue_status. Requires canEdit on the issue.

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": {
      "runId": "<runId>"
    },
    "name": "claim_agent_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
runIdYesThe run's id, from list_agent_runs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: the atomic exactly-one-winner guarantee, the two distinct failure causes behind a false result (already claimed/cancelled vs. blocked issue), the required canEdit permission, and the assignee-only restriction. These are precisely the facts an agent needs before invoking a mutating claim.

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 the action and the return contract, then layers atomicity, authorization, and the follow-up call. Every sentence conveys a distinct operational fact with no filler.

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 one-parameter mutating tool with no output schema, the description covers return values, failure handling, permissions, and the required next step. Nothing an agent needs to call it correctly and act on the result 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% and the single runId parameter already documents its own origin ("from list_agent_runs"). The description adds no further meaning about the parameter, so it sits at the baseline where the schema carries the load.

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 ("Claims a Ready agent run for this runner") plus the state transition (Ready → Working). The state-machine framing distinguishes it implicitly but clearly from the other run siblings (create/start/finish/cancel) without needing to name them.

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 concrete operating guidance: skip the run when the result is false, and follow up with edit_issue_status to the epic's first InProgress status. It lacks an explicit ordering statement versus start_agent_run or a stated when-not-to-claim condition, so it stops just short of full routing 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.