Skip to main content
Glama

unregister_agent

Remove an agent from the relay registry and delete its associated messages and tasks for clean shutdown, role rotation, or recovery. Idempotent: unregistering a missing name returns removed:false.

Instructions

Remove an agent row so the relay reflects true presence after a clean shutdown.

When to use: terminal exit, role rotation, or one half of the recovery flow when reusing a name after revoke_token set the row to revoked. For graceful working-state announcements without removing the row, use set_status with offline instead.

Behavior: deletes the agent row + all messages and tasks the agent was the from/to of (cascade). Idempotent, unregistering a name that does not exist returns removed:false instead of an error. Auth: requires the agent's own token, OR for admin removals an authenticated agent with manage_others capability.

Returns: { success: true, name, removed: boolean, note }. removed=false indicates the name was already absent (idempotent no-op) and is NOT an error.

Errors: AUTH_FAILED (token missing or wrong owner), INVALID_INPUT.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesAgent name to unregister
agent_tokenNoYour agent token (from register_agent response). Optional here — also resolvable from RELAY_AGENT_TOKEN env or X-Agent-Token header.
Behavior5/5

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

With no annotations provided, the description carries full responsibility and delivers: discloses cascade deletion of messages/tasks, documents idempotency (returns removed:false instead of error), details auth requirements (own token or manage_others capability), and enumerates error codes. Exceptionally thorough behavioral disclosure.

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 labeled sections (When to use, Behavior, Returns, Errors), front-loaded with the core action. Each sentence carries purpose. Slightly verbose around return semantics but all content is substantive, so it earns its length.

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?

For a destructive mutation with no annotations and no output schema, this is model-complete: covers return format, error semantics, idempotency behavior, auth model, cascade effects, and when-not-to-use. No meaningful gaps remain for an agent deciding whether and how to invoke this tool.

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 explaining the semantics of the `removed` boolean return flag and clarifying that agent_token is optional (also resolvable from env var or header) — though this largely mirrors the schema. The auth/destruction context adds meaning beyond plain parameter definitions.

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: 'Remove an agent row so the relay reflects true presence after a clean shutdown.' Distinguishes from siblings (register_agent, set_status) by explicitly contrasting with set_status for offline announcements. The purpose is specific and action-oriented.

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?

Explicit 'When to use' section lists concrete scenarios (terminal exit, role rotation, recovery after revoke_token) and explicitly names the alternative tool (set_status with offline) for graceful working-state announcements. Offers strong when/when-not differentiation.

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