Skip to main content
Glama

sync_dialog_contacts

Idempotent

Import a telegram_mtproto userbot's existing chats as contacts — DM partners, groups, and channels — so everything the account already talks to becomes a contact send_message can target without waiting for each chat to message first. Importing does not allow sending: send_message to these contacts is rejected until the account's owner turns on "Sending from this account" in the dashboard (OFF by default, no tool changes it), and then it sends text only — no media, no buttons. Requires the manage_broadcasts permission. Reads the account's dialog list live (the userbot must be connected; large accounts can take up to a minute) and creates missing contacts; existing contacts are untouched, so the call is idempotent. Pass kinds to narrow the import (e.g. ["group","channel"] to leave personal DMs out). Does NOT change the watched-groups list. botId may be omitted when the application has exactly one userbot.

Input Schema

NameRequiredDescriptionDefault
botIdNoThe telegram_mtproto bot. Omit when the application has exactly one userbot.
kindsNoDialog kinds to import. Defaults to all three ("user" = the account's direct-message partners).
limitNoHow many most-recent dialogs to read from the account. Defaults to 1000.
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 / kinds / description
      Previous value: -"Dialog kinds to import. Defaults to [\"group\", \"channel\"]; add \"user\" only deliberately — it imports personal DM contacts."New value: +"Dialog kinds to import. Defaults to all three (\"user\" = the account's direct-message partners)."
    • changedInput schema / properties / limit / description
      Previous value: -"How many most-recent dialogs to read from the account. Defaults to 200."New value: +"How many most-recent dialogs to read from the account. Defaults to 1000."
    • changedInput schema / properties / limit / maximum
      Previous value: -500New value: +5000
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the send gate (OFF by default, no tool flips it, text only, no media/buttons), the permission requirement, the live-read cost (large accounts up to a minute), idempotency behavior (existing contacts untouched), and the watched-groups non-effect. These are exactly the operational traits annotations cannot express.

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?

The purpose and the send-gate caveat are front-loaded, and every sentence carries information. It is a dense single paragraph, though, and the constraint clauses (permission, sending limits, idempotency, watched-groups) could be separated for faster scanning.

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 4-parameter mutation with no output schema, the description covers what gets created, what is left alone, the failure conditions, and the permission/auth context. Nothing an agent needs in order to call it correctly is missing.

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 a concrete narrowing example (["group","channel"] to exclude personal DMs) and reiterates the single-userbot omission rule for botId. It does not add anything about limit or applicationId beyond the schema, so it exceeds baseline only modestly.

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 states a specific verb and resource ('Import a telegram_mtproto userbot's existing chats as contacts') and enumerates exactly which dialog kinds are imported (DMs, groups, channels). It clearly distinguishes this bulk-import from single-record siblings like create_contact and list_contacts by describing the live dialog-list read and the idempotent 'creates missing contacts' semantics.

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?

It states when to reach for this tool (so existing chats become contacts send_message can target without waiting for an inbound message), what it explicitly does NOT do ('Does NOT change the watched-groups list'), the prerequisite (manage_broadcasts permission, userbot connected), and the downstream constraint (sending stays rejected until the dashboard toggle is on). An agent has enough to decide for or against it.

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.