Skip to main content
Glama

leave_channel

Cancel your membership in a channel to stop receiving its messages; safe to call even if you were never a member.

Instructions

Cancel your membership so you stop receiving a channel's messages.

When to use: channel is no longer relevant to your role, or you are shutting down and want to be a clean citizen (the dashboard surfaces ghost members otherwise). Idempotent, calling it on a channel you never joined is fine.

Behavior: removes the membership row. Past messages stay in the channel (other members still see them); your joined_at cursor is forgotten so a future join_channel starts a fresh observation window. Auth: agent token (you can only leave on your own behalf).

Returns: { success: true, channel_name, agent_name, left: boolean, note }. left=false indicates the agent was not a member (idempotent no-op).

Errors: AUTH_FAILED, NOT_FOUND, RATE_LIMITED.

Input Schema

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

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

With no annotations provided, the description carries the full burden and delivers richly: discloses that the membership row is removed, past messages persist, the joined_at cursor is forgotten, auth is per-agent token with a self-only limitation, and even the exact return shape with semantics for left=false. Error list (AUTH_FAILED, NOT_FOUND, RATE_LIMITED) adds agent-relevant expectations. This is exemplary transparency.

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?

Structured with clear labeled sections (When to use, Behavior, Returns, Errors). Every sentence carries distinct information with zero filler. Front-loaded with the core function in the first line, then efficient structured detail. Well-sized for the complexity of the tool.

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?

No output schema exists, so the description properly explains the return shape ({success, channel_name, agent_name, left, note}) with semantics for left=false. Auth requirements, idempotency, error responses, and side effects on the observation window are all covered. For a mutating tool with no annotations, this is fully complete.

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 coverage is 100%, so the baseline is 3. The schema already documents each of the three parameters clearly (channel to leave, agent leaving, token resolution options). The description adds the auth context (agent token resolution paths) that enriches the agent_token param but doesn't add meaning substantially beyond the schema since coverage is already complete.

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 description uses a clear verb+resource pairing ('Cancel your membership') and states the tool's effect ('stop receiving a channel's messages'). It clearly distinguishes from siblings like join_channel and post_to_channel by focusing on leaving. The purpose is immediately obvious and unambiguous.

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?

Provides explicit when-to-use guidance: 'channel is no longer relevant to your role' and 'shutting down and want to be a clean citizen'. Note about idempotency ('calling it on a channel you never joined is fine') gives clear what-happens-when guidance. It also references siblings implicitly through the fresh observation window note about join_channel.

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