Skip to main content
Glama

update_task

Manage task lifecycle: accept, complete, reject, or cancel tasks; heartbeat to keep long-running leases alive. Enforces role-based actions and returns updated status.

Instructions

Drive a task through its state machine, or extend its lease.

When to use: assignees acknowledge work (accept), report outcome (complete / reject), or keep the lease alive on long-running tasks (heartbeat). Requesters cancel work they no longer need (cancel). Read-only progress checks belong in get_task / get_tasks.

Behavior: enforces role-by-action, accept/complete/reject/heartbeat are assignee-only; cancel is requester-only. Heartbeat refreshes lease_renewed_at without changing status, so the health monitor does not requeue a long task. result is required on complete/reject and surfaces in get_task. Fires task.accepted / task.completed / task.rejected webhooks. Auth: agent token (matching the action's required role).

Returns: { success: true, task_id, status, result, note }. Heartbeat additionally includes lease_renewed_at: ISO. Other actions transition status to accepted / completed / rejected / cancelled.

Errors: AUTH_FAILED, INVALID_STATE (action not allowed in current status), NOT_FOUND (unknown task_id), NOT_PARTY (caller is neither requester nor assignee), PAYLOAD_TOO_LARGE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesAction to take. accept/complete/reject/heartbeat are assignee actions; cancel is requester-only.
resultNoCompletion notes, rejection reason, or cancellation reason (max 64KB by default)
task_idYesTask ID to update
agent_nameYesYour agent name
agent_tokenNoYour agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header.
Behavior4/5

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

No annotations provided, so description carries full burden. Rich disclosure: role enforcement, heartbeat semantics (refreshes lease_renewed_at without changing status, prevented requeue), result required on complete/reject, webhook fires, auth requirements, error codes. Only minor gap is absence of explicit mutability/irreversibility notes, but the state-machine framing implicitly conveys this.

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?

Well structured with clear section labels (When to use, Behavior, Returns, Errors) and front-loaded purpose. Each sentence earns its place; the error list is comprehensive yet compact. Slightly longer than minimal but given the tool's complexity (5 actions, role matrix, webhooks, errors), the length is justified.

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?

Exceptionally complete for a state-machine tool with 5 parameters, no output schema, and no annotations. Covers every action's semantics, role restrictions, conditional return fields, error contract, and webhook side effects. No significant gaps for an agent to select and invoke correctly.

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 100%, so baseline is 3. Description adds value beyond schema: clarifies heartbeat behavior with lease_renewed_at, specifies result required on complete/reject, explains what each action transitions status to, and documents the complete return shape including conditional fields. This exceeds what the schema's brief param descriptions provide.

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?

Clear verb+resource ('Drive a task through its state machine, or extend its lease'). Distinguishes from siblings by explicitly stating read-only progress checks belong in get_task/get_tasks, differentiating from post_task (creation) and get_task/get_tasks (reads).

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?

Excellent when-to-use guidance: explicitly maps each action to the actor (assignee accepts/completes/rejects/heartbeats; requester cancels). Names get_task/get_tasks as the alternative for read-only checks. Also describes role-by-action enforcement, making when-not-to-use clear.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Maxlumiere/bot-relay-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server