Telegram plugin: add disable_link_preview parameter to reply tool
Summary
The official Telegram plugin's reply tool doesn't expose Telegram's link_preview_options parameter. For link-heavy messages (news briefings, research digests, etc.), Telegram renders large preview cards for the first URL, which breaks mobile layout and makes messages much wider than intended.
Current behavior
The reply tool passes text and optional parse_mode to bot.api.sendMessage() but doesn't support disabling link previews. Messages with URLs get automatic preview cards.
Requested behavior
Add an optional disable_link_preview boolean parameter to the reply tool schema. When true, pass link_preview_options: { is_disabled: true } to bot.api.sendMessage().
Context
The Telegram Bot API supports link_preview_options natively. This is a one-line change in the tool schema + one line in the handler. I've patched it locally in my cached copy but it gets overwritten on plugin updates.
Suggested implementation
In server.ts, reply tool schema:
disable_link_preview: {
type: 'boolean',
description: 'Disable link preview cards in the message. Default: false.',
},
In the reply handler:
const disableLinkPreview = Boolean(args.disable_link_preview)
// ... in sendMessage options:
...(disableLinkPreview ? { link_preview_options: { is_disabled: true } } : {}),This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗