Skip to main content
Glama

register_task_schema

Registers an immutable JSON Schema that defines the required result shape for task completion, enabling validation of agent-submitted completion reports.

Instructions

Register a reusable, immutable JSON Schema that gates task completion (v2.10 — safety).

When to use: define the PROOF shape a completing agent must satisfy — e.g. a completion report requiring {ci_status:'green', tests_passed, summary}. A requester attaches the schema id to a task via post_task's schema_id; the assignee's update_task(action='complete', result=...) is then validated against it. Built-ins ship_pong_v1 / audit_verdict_v1 / merge_ready_v1 are auto-registered on init.

Behavior: the document is meta-validated + hardened (no $ref/$dynamicRef/$recursiveRef/$data) BEFORE ajv compiles it (a registered schema is compiled, so it is an attack surface). Schemas are IMMUTABLE — re-registering an id is refused; bump the version id. Auth: requires the manage_schemas capability.

Returns: { success: true, id, created_by, created_at, note }.

Errors: SCHEMA_MISMATCH (invalid/forbidden schema document), ALREADY_EXISTS (id already registered), CAP_DENIED, AUTH_FAILED, VALIDATION.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesSchema id, name-as-version (e.g. 'ship_pong_v1'). Immutable once registered.
agent_nameYesRegistering agent name
agent_tokenNoYour agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header.
json_schemaYesThe JSON Schema document (object). Meta-validated + hardened before compile; $ref/$dynamicRef/$recursiveRef/$data are rejected.
Behavior4/5

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

No annotations were provided, so the description carries the full burden. It discloses immutability (re-registering an id is refused), hardening behaviors ($ref/$dynamicRef/$recursiveRef/$data rejected, meta-validation before ajv compile), auth requirement, and explains the compile-time attack surface rationale. It doesn't explicitly state whether this is read-only vs mutating, but 'register' + immutability context makes the write nature clear.

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?

Well-structured with clear section headers (When to use, Behavior, Returns, Errors). Every section earns its place, and errors are enumerated. The version tag 'v2.10 — safety' adds perspective on the tool's maturity context. No fluff.

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

Completeness4/5

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

No output schema exists, so the description compensates by listing the exact return shape ({ success, id, created_by, created_at, note }) and all error codes. For a 4-param tool with 100% schema coverage and nested objects, this is thorough. Could mention pagination or the max number of schemas, but that's a minor omission given all else.

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. The description adds value by clarifying that json_schema rejects $ref-family keywords and is meta-validated/hardened, and that agent_token is optional (resolvable from env or header). Minor gap: no guidance on name uniqueness semantics beyond what's in the schema.

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?

Specific verb+resource: 'Register a reusable, immutable JSON Schema that gates task completion (v2.10 — safety).' It clearly distinguishes from siblings like task_schema_get (retrieval) and post_task (which just attaches a schema). The domain use case is explicit.

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?

Has an explicit 'When to use' section with a concrete example, explains the lifecycle (requester attaches via post_task's schema_id, assignee's update_task validates), and lists built-in schemas that are auto-registered, helping the agent avoid redundant registration. Auth requirement (manage_schemas) is stated.

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