fleet_claim

Pack: fleet · Endpoint: https://gateway.pipeworx.io/fleet/mcp

Claim a task so no other worker takes it. Atomic: if two workers race for the same task exactly one wins and the loser gets claimed=false (not an error) and should move on. A claim carries a TTL; let it lapse without a heartbeat and the task auto-releases, so a dead session can never strand work.

Parameters

NameTypeRequiredDescription
task_idnumberyesThe task to claim.
claimed_bystringyesThe claiming worker, as ‘session-name@host (lane)’. Host identity matters: it makes a dead machine a visible fact.
ttl_secondsnumbernoClaim lifetime before auto-release, max ${MAX_TTL_SECONDS}. Default ${DEFAULT_TTL_SECONDS}. Extend with fleet_heartbeat rather than asking for a long one up front.

Example call

Arguments

{
  "task_id": 1,
  "claimed_by": "warren@laptop (backend)"
}

curl

curl -X POST https://gateway.pipeworx.io/fleet/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"fleet_claim","arguments":{"task_id":1,"claimed_by":"warren@laptop (backend)"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('fleet_claim', {
  "task_id": 1,
  "claimed_by": "warren@laptop (backend)"
});

More examples

{
  "task_id": 1,
  "claimed_by": "warren@mini-1 (backend)",
  "ttl_seconds": 3600
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "fleet": {
      "url": "https://gateway.pipeworx.io/fleet/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build August 4, 2026