Skip to main content
Glama

List Telegram Contacts

tg_list_contacts
Read-only

List or search a Telegram account's contacts and the people it chats with. For a WhatsApp account's address book use wa_list_contacts.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tg_list_contacts"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNohow many to return (default 500, max 2000)
queryNooptional: only contacts whose name, number or @username contains this; case-insensitive and ignores punctuation in numbers. Omit to list everything
account_idNowhich Telegram account to read, from wa_list_accounts; omit it when the workspace has only one Telegram account
after_cursorNoreturn contacts after this cursor; omit to start from the beginning

Output Schema

NameRequiredDescriptionDefault
noteNo
totalYeshow many contacts matched in total, before the limit was applied
refusalNopresent only when the request was declined
contactsYes
has_moreNotrue when more contacts remain after this page
truncatedNotrue when more contacts exist than were returned
next_cursorNopass this as after_cursor to continue; page until has_more is false to read the whole address book

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=false, so the safety profile is supplied. The description adds real context beyond them by disclosing that results include people the account has chatted with, not just saved contacts — a behavioral detail an agent could not infer from the annotations or schema, and one that affects how results should be interpreted.

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?

Two sentences, both front-loaded: the capability and scope come first, the disambiguation second. There is no filler and nothing repeated from the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and all four parameters are fully documented in the schema. The remaining element the description does supply — the mixed contact/chat-partner scope — is the one thing structured fields could not convey, leaving little material gap for a read-only list tool.

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 description coverage is 100%, so every parameter (limit, query, account_id, after_cursor) is already documented with defaults, max, matching semantics, and cursor usage. The description adds no parameter-level detail beyond what the schema states, which is the expected baseline when the schema does the work.

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 gives a specific verb pair (list or search) and a precise resource (a Telegram account's contacts), then extends the scope to 'the people it chats with' so the agent knows the result set is broader than a plain address book. It explicitly names wa_list_contacts as the different tool, so the agent can separate the two without opening either schema.

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?

It names the alternative tool (wa_list_contacts) and the condition that selects it (WhatsApp rather than Telegram), which is the main routing decision an agent faces here. It stops short of explicit guidance on when to page with after_cursor versus raising limit, but that is largely covered by the schema's own parameter descriptions.

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