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

TableJSON 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

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.