# claim_next_agent_run

Atomically claim the next queued local agent run.

Agent View of the PolicyLayer registry record for `claim_next_agent_run`. HTML page: https://policylayer.com/tools/todos/claim-next-agent-run

## Facts

- Tool: `claim_next_agent_run`
- Server: Todos (`@hasna/todos`) — https://policylayer.com/tools/todos.md
- Install: `npx -y @hasna/todos`
- Homepage: git+https://github.com/hasna/todos.git
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

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

## Why claim_next_agent_run is rated High

This tool initiates/triggers execution of an agent run—an operation whose effects depend on what the queued run contains. It is not merely reading (no data retrieval stated), not creating benign data reversibly (it claims exclusive execution control), and not destroying data. It is Execute-category because it transitions a task from queued to running state and hands control to an external agent.

From the tool's own definition: "Tool claims (acquires/initiates) the next queued agent run. 'Claim' indicates state transition and operational control. Description uses 'atomically claim' suggesting transactional acquisition of execution rights."

## Use case

AI agents invoke claim_next_agent_run to trigger actions in Todos. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Todos:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "claim_next_agent_run": {
      "limits": [
        {
          "counter": "claim_next_agent_run_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Todos (527)

- `apply_retention_cleanup` — Destructive — https://policylayer.com/tools/todos/apply-retention-cleanup.md
- `bulk_delete_tasks` — Destructive — https://policylayer.com/tools/todos/bulk-delete-tasks.md
- `cancel_agent_run` — Destructive — https://policylayer.com/tools/todos/cancel-agent-run.md
- `cancel_agent_run_dispatch` — Destructive — https://policylayer.com/tools/todos/cancel-agent-run-dispatch.md
- `cancel_dispatch` — Destructive — https://policylayer.com/tools/todos/cancel-dispatch.md
- `cleanup_artifacts` — Destructive — https://policylayer.com/tools/todos/cleanup-artifacts.md
- `delete_agent` — Destructive — https://policylayer.com/tools/todos/delete-agent.md
- `delete_artifact` — Destructive — https://policylayer.com/tools/todos/delete-artifact.md
- `delete_comment` — Destructive — https://policylayer.com/tools/todos/delete-comment.md
- `delete_label` — Destructive — https://policylayer.com/tools/todos/delete-label.md
- `delete_milestone` — Destructive — https://policylayer.com/tools/todos/delete-milestone.md
- `delete_plan` — Destructive — https://policylayer.com/tools/todos/delete-plan.md
- `delete_project` — Destructive — https://policylayer.com/tools/todos/delete-project.md
- `delete_roadmap` — Destructive — https://policylayer.com/tools/todos/delete-roadmap.md
- `delete_search_view` — Destructive — https://policylayer.com/tools/todos/delete-search-view.md
- `delete_tag` — Destructive — https://policylayer.com/tools/todos/delete-tag.md
- `delete_task` — Destructive — https://policylayer.com/tools/todos/delete-task.md
- `delete_task_list` — Destructive — https://policylayer.com/tools/todos/delete-task-list.md
- `delete_template` — Destructive — https://policylayer.com/tools/todos/delete-template.md
- `delete_watch_rule` — Destructive — https://policylayer.com/tools/todos/delete-watch-rule.md
- `machines_archive` — Destructive — https://policylayer.com/tools/todos/machines-archive.md
- `machines_delete` — Destructive — https://policylayer.com/tools/todos/machines-delete.md
- `remove_agent_run_adapter` — Destructive — https://policylayer.com/tools/todos/remove-agent-run-adapter.md
- `remove_capacity_profile` — Destructive — https://policylayer.com/tools/todos/remove-capacity-profile.md
- `remove_encryption_profile` — Destructive — https://policylayer.com/tools/todos/remove-encryption-profile.md
- `remove_local_event_hook` — Destructive — https://policylayer.com/tools/todos/remove-local-event-hook.md
- `remove_local_extension` — Destructive — https://policylayer.com/tools/todos/remove-local-extension.md
- `remove_policy_pack` — Destructive — https://policylayer.com/tools/todos/remove-policy-pack.md
- `remove_review_routing_rule` — Destructive — https://policylayer.com/tools/todos/remove-review-routing-rule.md
- `remove_runner_sandbox_profile` — Destructive — https://policylayer.com/tools/todos/remove-runner-sandbox-profile.md
- …and 497 more: https://policylayer.com/tools/todos.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=todos · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/todos
