Skip to main content
Glama

set_watched_groups

DestructiveIdempotent

Replace a telegram_mtproto userbot's watched-groups list — the chats it monitors. Requires the manage_settings permission. SET semantics: send the COMPLETE desired list every time (call list_watched_groups first and include existing entries you want to keep — omitting one removes it). Each entry needs a chatId (e.g. "-100…") or a public username/t.me link, and it must be a chat the account has JOINED: only joined chats can be watched. Watching a public chat without joining it is not available — an entry for a chat the account is not in is saved but never produces a message, so join the chat with the account first. The running userbot picks the change up within a few minutes, no restart. An empty list means "watch every joined chat" — NOT "watch nothing".

Input Schema

NameRequiredDescriptionDefault
botIdNoThe telegram_mtproto bot. Omit when the application has exactly one userbot.
groupsYesThe complete replacement list. Empty array = watch every joined chat.
applicationIdNoApplication (workspace) id. Optional: an application-scoped key (app_...) defaults to its own application, but a personal key (usr_...) has no default and omitting it fails with MCP_APPLICATION_REQUIRED. Call list_applications to get the id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / groups / items / properties / mode / description
      Previous value: -"\"joined\" (default) = passive updates for a chat the account is in; \"public_peek\" = poll a public chat without joining (max 10)."New value: +"Always \"joined\" (the default, may be omitted): a chat the account is a member of. No other mode exists."
    • changedInput schema / properties / groups / items / properties / mode / enum
      Previous value: -[
      -  "joined",
      -  "public_peek"
      -]New value: +[
      +  "joined"
      +]
    • changedInput schema / properties / groups / items / properties / username / description
      Previous value: -"Public @username or t.me link. Required for public_peek entries."New value: +"Public @username or t.me link of a chat the account is in. Supply this or chatId."
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Goes well beyond the destructiveHint/idempotentHint annotations by explaining what destruction means (omitting an entry removes it), the permission requirement, the silent-failure mode for unjoined chats ('saved but never produces a message'), and the propagation delay ('within a few minutes, no restart'). The only thing not disclosed is the response payload, which is minor for a settings mutation, so a 4 rather than 5.

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?

Front-loads the core action and SET semantics before the caveats, and nearly every sentence carries distinct operational information. Minor redundancy: the join requirement and its consequence are stated twice ('only joined chats can be watched' then 'saved but never produces a message'), and the empty-list rule repeats the schema description.

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 three-parameter settings mutation with no output schema, the description covers permissions, list replacement behavior, entry validation, propagation, and the edge case of an empty array. Nothing an agent needs in order to invoke it correctly is missing.

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 chatId/username/mode/applicationId semantics are already documented in the schema. The description reinforces the entry format ('chatId (e.g. "-100…") or a public username/t.me link') and adds the joined constraint, but says nothing about botId or applicationId selection beyond what the schema already states. Baseline 3 is appropriate.

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 ('Replace a telegram_mtproto userbot's watched-groups list') plus the scope of what a group means ('the chats it monitors'), and names the sibling list_watched_groups as the read counterpart. An agent can distinguish it from list_watched_groups and from generic chat tools without opening the schema.

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?

Explicitly instructs to call list_watched_groups first and re-send existing entries, states the prerequisite (manage_settings permission), the join requirement before adding a chat, and the counter-intuitive empty-list case ('watch every joined chat' — NOT 'watch nothing'). When-to-use, when-not, and the alternative tool are all named.

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.