Humans as tools
An agent routes work to a person through the same tool protocol it uses for everything else, and gets the typed answer back.
The situation
An agent working through a task reaches a decision it should not make alone: approve a refund, confirm a shipping address, supply a password. It needs a person, and it should ask the way it calls any other tool.
The recipe
The long-tail-human-queue server exposes the escalation queue as MCP tools. Inside a workflow or a compiled pipeline, escalate_and_wait creates the row and pauses until it resolves:
{ "role": "reviewer", "message": "Approve a refund of $240 on order ORD-1042?", "data": { "orderId": "ORD-1042", "amount": 240 }, "form_schema": { "type": "object", "properties": { "approved": { "type": "boolean" }, "note": { "type": "string" } }, "required": ["approved"] }, "priority": 1}The row appears in the reviewer queue on the dashboard with the form rendered. When a reviewer submits, the step after the wait receives { approved, note }. escalate_to_human plus check_resolution is the fire-and-check variant.
| Tool | Purpose |
|---|---|
escalate_to_human |
Create an escalation, return its id |
escalate_and_wait |
Create an escalation and pause until it resolves |
check_resolution |
Read status and resolver payload |
get_available_work |
List pending, unclaimed rows for a role |
claim_and_resolve |
Claim and resolve in one atomic call |
The guarantee
Human labor and AI labor compose through one protocol: the row is the same whether a person clicks a button or an agent calls a tool. These tools act with full authority, so at /mcp they list for superadmin accounts. An external agent with another role works the queue through the role-checked tools (find_escalations, claim_escalation, admin_resolve_escalation). See MCP.
Related patterns
Agents and MCP
Tools as durable activities
Register an MCP server and its tools become checkpointed workflow activities: retried on failure, replayed from cache after a crash.
Identity
Ephemeral credential tokens
A password typed into a form reaches the tool as an opaque token, exchanged for plaintext only at the moment of the call.
The escalation boundary
Confidence-gated escalation
The workflow finishes on its own when the model is confident and parks a review row when it is not, so people see only the uncertain cases.
Resolving from anywhere
One row, many resolvers
A person, a service, an operator, an agent or a machine can resolve the same row. The workflow receives the same typed answer either way.
