feat: add Telegram chat tools - #2
Draft
tdakkota wants to merge 9 commits into
Draft
Conversation
tdakkota
marked this pull request as draft
July 6, 2026 09:29
Co-authored-by: Codex <codex@openai.com>
Generalize mark-read to any dialog (mark_chat_read replaces mark_channel_read) and namespace cache mutations by peer kind, so marking a user or group read no longer misses the cache. Add a query filter to list_chats. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Server-side peer search, so public chats absent from the dialog cache are findable. Reuses the resolve_peer output shape, annotated with cached dialog state. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Read paths dropped every *tg.MessageService, so pins, joins and screenshot events were silently missing from history. They are now returned with service=true and a snake_case action name derived from the TL type. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Let Telegram decide which peers accept the notification instead of guessing from the TL schema comment. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
get_file gains inline mode, returning an image content block for vision-capable clients. It picks the smallest photo variant reaching 1280px on the long edge, since smaller is unreadable and larger only costs context, and caps the result at 5 MiB. TG_ALLOW_SEND now defaults to off like the other rights, so a server started with no configuration is read-only. Existing deployments relying on the old default must set TG_ALLOW_SEND=true. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Adds OpenTelemetry traces, metrics and logs: a span per MCP request and per MTProto call via gotd/contrib/oteltg, plus mcp.request.*, tg.rpc.* and tg.flood_wait.count. The MCP receiving middleware replaces the per-tool logged() wrapper, and injectLogger puts the zctx base logger on request contexts. Exporters keep the SDK defaults (OTLP/gRPC to localhost:4317), so deployments without a collector must set OTEL_*_EXPORTER=none. Binary grows 27 MB to 81 MB. "tgmcp auth" stays outside app.Run to keep its interactive prompts. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
send_message and send_file accept parse_mode: plain (default, verbatim) or markdown, parsed by gotd's telegram/message/markdown into Telegram entities. Default stays plain so text containing "_" or "*" is not silently reformatted. Mentions resolve the access hash from the dialog cache, since a user session cannot mention by ID alone; unknown users fail instead of sending a broken mention. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tdakkota
force-pushed
the
feat/more-tools
branch
from
August 3, 2026 07:46
07fb300 to
14eca80
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Tests