Skip to main content
Glama

group_leave

Leave a group and stop syncing its messages to your inbox.

Name the group with ONE of:

  • thread_id: the DialogBrain conversation id of the group chat (primary way)

  • group_id: the discovered-group id from group.list Platform chat ids (Telegram -100...) are NOT accepted. If both are given they must be the same group.

The leave always runs as one concrete account: account_id if given, else the account the conversation / discovered group belongs to. There is no fallback to another account.

What this does:

  • Leaves the group on Telegram (or other channel)

  • Stops syncing new messages

  • Disables any AI auto-reply drafts for this group

  • Keeps a discovered group in the discovery list (not deleted)

Returns: success, thread_id.

Input Schema

NameRequiredDescriptionDefault
group_idNoThe discovered-group id from group.list (lifecycle='monitored'). NOT a platform chat id and NOT a thread id.
thread_idNoThe DialogBrain conversation (thread) id of the group chat. Primary way.
account_idNoWhich of the workspace's accounts on this channel acts (from channels.list). OMIT to use the account the conversation / discovered group belongs to.
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / account_id / description
      Previous value: -"Which of the workspace's accounts on this channel acts (from channels.list). OMIT to use the account the group belongs to."New value: +"Which of the workspace's accounts on this channel acts (from channels.list). OMIT to use the account the conversation / discovered group belongs to."
    • changedInput schema / properties / group_id / description
      Previous value: -"Group to leave. Accepts either the discovered-group id from group.list (lifecycle='monitored'), or the platform's own group id (e.g. a Telegram chat id like -1001234567890)."New value: +"The discovered-group id from group.list (lifecycle='monitored'). NOT a platform chat id and NOT a thread id."
    • addedInput schema / properties / thread_id
      Added value: +{
      +  "description": "The DialogBrain conversation (thread) id of the group chat. Primary way.",
      +  "type": "integer"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "group_id"
      -]New value: +[]
  2. Changed1 schema field changed
    • addedInput schema / properties / account_id
      Added value: +{
      +  "description": "Which of the workspace's accounts on this channel acts (from channels.list). OMIT to use the account the group belongs to.",
      +  "type": "integer"
      +}
  3. Added
  4. Removed
  5. Added

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by enumerating side effects: leaves the group on the channel, stops syncing, disables AI auto-reply drafts, but keeps the discovered group in the discovery list rather than deleting it. This is exactly the extra context annotations cannot convey, and it does not conflict with destructiveHint=false.

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?

Front-loaded with the core action, then cleanly sectioned into identifier rules, account behavior, effects, and return value. Every bullet contributes operational information with no filler.

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?

Covers inputs, side effects, account resolution, and even the return value ('success, thread_id') despite there being no output schema, leaving nothing material an agent needs before calling it.

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 the baseline is 3, but the description adds real meaning: it declares thread_id the primary way, warns which id formats are rejected, states the both-params-must-match rule, and explains account_id's fallback-and-no-fallback behavior.

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?

States a specific verb and resource ('Leave a group and stop syncing its messages') and immediately clarifies scope in the first line, distinguishing it clearly from group_join/group_list siblings.

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?

Gives explicit identifier selection rules (thread_id primary vs group_id), an exclusion (platform chat ids like Telegram -100 are NOT accepted), a consistency constraint (both must be same group), and account resolution order. It does not name a sibling alternative such as group_join for the reverse action, which keeps it just below top marks.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources