Skip to main content
Glama
draiqw
by draiqw

tg_account_use

Idempotent

Switch the active Telegram account for subsequent tool calls, and optionally persist the selection as the default for future sessions.

Instructions

Point the following tool calls at this account ("main" for the default one).

By default the switch lasts for this session only: it does not affect other clients, and it is forgotten when Claude closes. With persist=true the choice is written to disk and becomes the account every client starts from, including after a daemon restart — use it when the owner says "work from this account from now on", not for one errand.

Either way the background watcher is unaffected: it always covers every signed-in account.

A single call can also be aimed elsewhere without switching at all — tg_capabilities takes an account argument. Check tg_accounts if unsure where you are writing right now; every write tool also names the account it wrote to in its answer.

Args: account: label of a signed-in account, or "main" for the primary one. The owner adds accounts from a terminal; the agent cannot. persist: remember this account as the default for every client and every restart, instead of only this session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountYes
persistNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

Beyond the idempotentHint annotation, the description discloses the session-only default, the disk-persist side effect with daemon restart implications, that the background watcher remains unaffected, and that accounts can only be added by the owner from a terminal. This is exactly the behavioral context an agent needs beyond annotations.

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?

The description is longer than average but every sentence earns its place: core purpose, persistence behavior, watcher exemption, alternative tools, and parameter definitions. The most important scoping statement is front-loaded and the parameter details are cleanly separated under Args.

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 state-switching tool with no output schema, the description covers all operational aspects: meaning of account, meaning of persist, default behavior, side effects, alternatives, and how to verify current state. Nothing needed to call it correctly or reason about its effect is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by explaining the account parameter as a signed-in account label or 'main', noting the agent cannot add accounts, and detailing persist=true as remembering the account across clients and restarts rather than just the session. This is complete semantic documentation of both parameters.

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 opening line, 'Point the following tool calls at this account', is a specific verb+resource statement that clearly identifies the tool's function. It also actively distinguishes itself from siblings by noting tg_capabilities can target an account without switching and tg_accounts shows current context.

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?

The description explicitly explains when to use persist=true versus the default session-only switch: persist is for when the owner says 'work from this account from now on', not for one errand. It also names alternatives like tg_capabilities' account argument and tg_accounts for verifying current state, giving clear when-to-use and when-not-to-use guidance.

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