Search public Telegram channel posts after consent
telegram_search_public_postsSearch public Telegram channel posts by query after a quota check and explicit user consent; continue the same approved search with a cursor.
Instructions
Execute a public-channel search only after the quota check and user consent.
First use ordinary account-history search, then telegram_get_public_search_quota. Explain the actual free quota, possible consumption of one attempt, and wider scope; ask the user and WAIT. Set user_confirmed=true only after their explicit reply approving this exact query, and supply its fresh confirmation_token. A generic request to find information is not consent. Missing confirmation performs no search. New/reworded queries always need fresh consent, even if cached-free. A valid next_cursor continues the same approved query for free without another token/confirmation; retain short/empty page continuations. Limits are checked again before execution. Quota changes/expiry require a new check and user consent. Never offer or spend Stars, buy attempts, or retry a paid request. At most one native search is performed per call. Unavailable is not an empty success. No joins, read-state changes or media downloads.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "telegram_search_public_posts"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum messages to return in this page, 1–20; not a total-match limit. Fewer items can still have a continuation. | |
| query | Yes | Telegram text-search query, 2–200 characters; surrounding whitespace is trimmed. Use ordinary search text, not a local regex or SQL expression. | |
| cursor | No | Opaque next_cursor returned by this same search tool for the same query; omit or use null for the first page. Pass it unchanged, even after an empty page. | |
| user_confirmed | No | Set true only after the user explicitly approves this exact public query following its live quota check; a general research request is insufficient. | |
| confirmation_token | No | Single-use confirmation_token from telegram_get_public_search_quota for this exact query, used only after the user's approval. Expires in five minutes; not a pagination cursor. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | ||
| items | Yes | ||
| quota | Yes | ||
| reason | No | ||
| status | Yes | ||
| next_cursor | Yes | ||
| quota_source | Yes | ||
| searched_scope | No | public_channel_posts | |
| trust_boundary | No | ||
| requested_limit | Yes | ||
| normalized_query | Yes | ||
| search_performed | Yes | ||
| stars_authorized | No | ||
| retry_after_seconds | No | ||
| duplicates_omitted_count | No |