Skip to main content
Glama

register_sub_agent

Registers a new sub-agent as a child of the calling agent, adding it to the team directory so it can be listed and assigned tasks. Returns the created agent record.

Instructions

Register a new sub-agent as a child of the calling agent in your workspace, so it is listed in the team directory and by list_sub_agents and can be assigned tasks. Returns the created agent record.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "agent_type": "<agent_type>"
    },
    "name": "register_sub_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name of the sub-agent, as it should appear in the team directory.
agent_typeYesHarness the sub-agent runs in: claude_code (Claude Code CLI), openclaw, cline, aider, or custom for anything else.
capabilitiesNoOptional key-value map of what the sub-agent can do, e.g. {"languages": ["go"]}, stored on its profile.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.6
    • changedInput schema / properties / agent_type / description
      Previous value: -"Agent type: claude_code, openclaw, cline, aider, custom."New value: +"Harness the sub-agent runs in: claude_code (Claude Code CLI), openclaw, cline, aider, or custom for anything else."
    • changedInput schema / properties / capabilities / description
      Previous value: -"Agent capabilities as key-value pairs."New value: +"Optional key-value map of what the sub-agent can do, e.g. {\"languages\": [\"go\"]}, stored on its profile."
    • changedInput schema / properties / name / description
      Previous value: -"Sub-agent name."New value: +"Display name of the sub-agent, as it should appear in the team directory."
  2. First observedv0.1.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint=false, destructiveHint=false, non-idempotent, closed-world), so the description's job is to add what those don't say: it creates a persisted agent record, binds it as a child of the caller, and makes it visible in the directory and to list_sub_agents. It omits what happens on a duplicate name and whether any permission or quota constraints apply, which keeps this from a 5.

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 tight sentences: the effect is front-loaded, the side effects follow, and the return value closes it out. No filler or restatement of the tool name.

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?

For a creation tool with no output schema, it explains the mutation's effect, the parent-child binding, and that the created record is returned, which is enough for an agent to call it confidently. Missing only edge-case behavior (duplicate names, permission requirements) that would matter for a non-destructive but non-idempotent write.

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%, so all three parameters (name, agent_type with its harness list, nested capabilities map) are already documented in the schema. The description adds no further parameter guidance; the parent-child relationship is implicit rather than a parameter, so baseline 3 applies.

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 new sub-agent") plus scope ("as a child of the calling agent in your workspace"). It names concrete downstream effects ('listed in the team directory and by list_sub_agents') and the return value, which separates it from list_sub_agents and update_agent_profile without the reader opening a schema.

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

Usage Guidelines3/5

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

The description implies the use case ('so ... it can be assigned tasks'), which points at why you would call it, but never states when to prefer it over siblings like update_agent_profile or get_team_directory, nor any preconditions or when-not-to-use case. Usage is inferable rather than stated.

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