Skip to main content
Glama

register_agent

Destructive

Register or update an agent identity in a project, creating the project if needed and generating a name when omitted.

Instructions

Register or update an agent identity in a project, creating the project if needed. Omit name to get a generated adjective+noun name, unless task_description starts with a session tag an eligible or lifecycle-bound agent already has; then that agent is updated. Re-registering an existing name replaces its program, model and task and clears inactivity retirement. Authoritative lifecycle closure requires a verified reopen. If the register hook already told you your name, pass it as name, or start task_description with the session tag it gave you. To also reserve paths and read your inbox in one call, use macro_start_session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoAdjective+noun such as GreenLake. Omit to get one generated.
modelYesModel id the session runs.
programYesAgent host, such as claude-code, codex or cursor.
worktreeNoAbsolute path of the checkout being edited, in this project. Omit to keep its recorded location.
project_keyYesAbsolute path of the repository's primary checkout.
task_descriptionNoWhat you are working on. Keep the leading [host:session ...] tag the register hook gave you.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.4
    • addedInput schema / properties / worktree
      Added value: +{
      +  "description": "Absolute path of the checkout being edited, in this project. Omit to keep its recorded location.",
      +  "type": "string"
      +}
  2. Changed4 schema fields changedv0.2.2
    • addedInput schema / properties / model / description
      Added value: +"Model id the session runs."
    • addedInput schema / properties / name / description
      Added value: +"Adjective+noun such as GreenLake. Omit to get one generated."
    • addedInput schema / properties / program / description
      Added value: +"Agent host, such as claude-code, codex or cursor."
    • addedInput schema / properties / task_description / description
      Added value: +"What you are working on. Keep the leading [host:session ...] tag the register hook gave you."
  3. First observedv0.2.1

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and non-idempotent, so the baseline is lower, yet the description goes well beyond them: it discloses project creation, generated naming, session-tag-driven update of an existing agent, that re-registration overwrites program/model/task and clears inactivity retirement, and that lifecycle closure needs a verified reopen. These are exactly the overwrite side effects an agent must know before calling.

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

Conciseness3/5

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

The main purpose is front-loaded, but the middle sentences stack convoluted conditionals ('unless task_description starts with a session tag an eligible or lifecycle-bound agent already has') and the hook/name guidance partly repeats the earlier session-tag rule, so some content does not fully earn its place.

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 complex, non-idempotent mutation tool with no output schema, the description covers side effects, naming, re-registration, hook interplay and the alternative macro_start_session. It is largely complete, though it does not say what the call returns (e.g., the assigned name/identity) or what happens on failure.

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 the baseline is 3. Most of the description's parameter guidance (omit name to get one generated, keep the leading session tag in task_description) restates what the schema already says, and the genuinely new cross-parameter rule (a session tag in task_description selecting an existing agent) is only lightly elaborated, so it adds limited meaning beyond 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?

The first sentence states a specific verb+resource with scope: 'Register or update an agent identity in a project, creating the project if needed.' It also names a sibling alternative (macro_start_session) and the conditions that distinguish it, so the agent can tell it apart without 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 Guidelines4/5

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

The description gives concrete conditions: omit name for a generated name, re-register to replace program/model/task, and use macro_start_session to also reserve paths and read inbox in one call. It stops short of an explicit 'do not use when' case, but the alternative routing is clear enough for correct selection.

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