Skip to main content
Glama

RepoMemory

Claim a task

claim_task

Take a task before starting it, so another agent or teammate doesn't work on the same one. Give the task's id (TASK-n), or leave it out to take the oldest open task. agent names who is working on it ("claude-code on dimaino's laptop"). It returns a claim_token: keep it. A task claimed by anyone else, even a session with your own name, is refused with already_claimed; claiming again with your claim_token extends your claim. A claim lasts minutes (default 120): claim again to extend it, and once it runs out the task is open to anyone, so a crashed agent never holds it for ever. If you stop without finishing, call this with release true and your claim_token. When finished, mark it done with retire_entry. Free. Returns task, or null when there is no open task.

Free to call.

Input Schema

NameRequiredDescriptionDefault
idNoThe task to claim (TASK-n). Leave out to take the oldest open task.
agentYesWho is taking it.
minutesNoHow long the claim lasts. Claim the task again to extend it; after it runs out, anyone may take the task.
projectYesThe project, usually the repository ("owner/repo" or a short name). Entries are kept per project.
releaseNoGive the task (`id`) back instead of claiming it, so another agent can take it now. Needs the claim's `claim_token`.
claim_tokenNoThe claim_token this tool returned when you claimed the task: give it to extend or release your claim. Your name in `agent` is not enough, since other sessions may use the same name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the non-readonly, non-idempotent annotations, it discloses the mutation semantics that actually matter: the claim_token must be retained, claims expire after `minutes` (default 120, crash-safe), re-claiming extends rather than duplicates, and a foreign claim is refused. This is exactly the extra context annotations cannot carry.

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?

Front-loaded with the purpose and the primary parameter, then ordered by workflow step (claim → extend → release → finish). Minor waste in the duplicated 'Free.' / 'Free to call.' tail, which is the only reason it falls short of 5.

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 six-parameter stateful mutation with no output schema, it still covers the return value ('task', or null when nothing is open), the token lifecycle, and the failure mode. Nothing an agent needs in order to call it 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 already 100%, so the baseline is 3, but the description adds genuine meaning: omitting `id` selects the oldest open task, `claim_token` is required to extend or release despite matching `agent` names, and `minutes` governs expiry rather than being a mere timeout. It does not restate types, only intent.

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?

The description gives a specific verb and resource ('Take a task') plus the reason for doing so (preventing duplicate work), and it explicitly separates itself from siblings by naming retire_entry as the completion step. An agent can distinguish it from record_entry/retire_entry without opening a 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?

It spells out when to call it (before starting work), what to pass or omit (id vs. oldest open task), how to extend, how to undo via release=true, and where to go when finished (retire_entry). The already_claimed refusal case and the 'your own name is not enough' caveat close the obvious ambiguity.

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