Skip to main content
Glama

claim_task

Acquire the highest-priority pending task atomically for an agent in AgentMesh MCP, preventing duplicate work and collisions between parallel AI agents.

Instructions

Atomically claim the highest priority pending task for this agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesUnique identifier of the claiming agent (e.g., 'researcher-agent-1').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose real behavioral traits: atomicity (concurrency safety) and priority-ordered selection from pending tasks. However, it omits the failure mode when no pending task exists (error vs. empty result), whether the claim is exclusive/locked, and whether it expires or can be released.

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?

One sentence, front-loaded with the action verb, carrying only the qualifying details (atomic, highest priority, pending, this agent). No filler and nothing misplaced.

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?

For a state-mutating tool with no annotations and no output schema, the description should say what comes back (the claimed task object?) and what happens on failure. It covers the selection semantics well but leaves the result and no-task-available case unspecified.

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?

There is a single parameter with 100% schema description coverage, so the schema already explains agent_id and gives a format example. The description adds no format or constraint detail beyond the schema, so the baseline 3 applies.

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?

States a specific verb (claim) plus the resource and selection rule (highest priority pending task for this agent), which is more precise than a bare 'claim task'. It does not explicitly name a sibling like get_task or list_tasks as the non-mutating alternative, so the differentiation is left implicit.

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

Usage Guidelines2/5

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

The description says who the claim is for ('this agent') but gives no when-to-use guidance, no prerequisites (e.g., must an agent be registered, is there a queue to drain first), and no exclusions relative to get_task/list_tasks. An agent must infer the invocation context entirely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.