Skip to main content
Glama
nbhson
by nbhson

Register Task

register_task

Creates a monitored coding-agent task record so an independent watchdog can resume interrupted work from the same session or checkpoint.

Instructions

Register a coding-agent task for monitoring and automatic recovery. The agent (or its launcher) calls this when starting a task so the watchdog can resume it after interruptions.

Input Schema

NameRequiredDescriptionDefault
taskIdYesUnique task identifier
adapterIdYesAdapter id, e.g. 'opencode', 'claude-code'
agentTypeNoAgent type label (defaults to adapterId)
sessionIdNoExisting agent session id to resume, when known
processPidNoAgent process id, when launched by the caller
descriptionYesOriginal task description used as recovery context
maxAttemptsNoRecovery attempt budget (default from configuration)
workingDirectoryYesAbsolute working directory the agent runs in

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It usefully discloses that registration enrolls the task in watchdog monitoring and recovery, but omits key traits: whether registering an existing taskId fails or overwrites, idempotency, and whether registration implies any process ownership. These gaps matter for a stateful registration call.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero padding, with the action and its monitoring purpose front-loaded before the call-site guidance. Nothing is restated redundantly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter, no-annotation, no-output-schema registration tool, the description covers purpose and trigger but leaves out duplicate-registration behavior and what a caller gets back (task id, status, error). Adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and all eight parameters carry inline descriptions, so the schema already does the work. The description adds no additional meaning about required fields, defaults, or how sessionId/processPid affect recovery behavior, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Register') and resource ('a coding-agent task') and adds the purpose ('for monitoring and automatic recovery'), which clearly separates it from siblings like report_progress or save_checkpoint. It stops short of explicitly naming an alternative tool, but the intent is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the trigger ('The agent (or its launcher) calls this when starting a task') and the rationale (so the watchdog can resume it after interruptions), which is a clear use context. It does not cover when-not-to-use, re-registration semantics, or whether a launcher should call it instead of the agent.

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