Documentation
¶
Overview ¶
Package tools provides MCP tool handlers for Telegram operations.
Index ¶
- Constants
- Variables
- func AddTool[In, Out any](server *mcp.Server, registry BoolFieldRegistry, tool *mcp.Tool, ...)
- func ChatsAdminsTool() *mcp.Tool
- func ChatsArchiveTool() *mcp.Tool
- func ChatsCreateTool() *mcp.Tool
- func ChatsDeleteTool() *mcp.Tool
- func ChatsMuteTool() *mcp.Tool
- func ChatsPermissionsTool() *mcp.Tool
- func ChatsSetDescriptionTool() *mcp.Tool
- func ChatsSetPhotoTool() *mcp.Tool
- func ContactsAddTool() *mcp.Tool
- func ContactsDeleteTool() *mcp.Tool
- func ContactsGetStatusesTool() *mcp.Tool
- func ContactsGetTool() *mcp.Tool
- func ContactsListBlockedTool() *mcp.Tool
- func ContactsSearchTool() *mcp.Tool
- func DialogsGetInfoTool() *mcp.Tool
- func DialogsListTool() *mcp.Tool
- func DialogsMarkUnreadTool() *mcp.Tool
- func DialogsPinTool() *mcp.Tool
- func DialogsSearchTool() *mcp.Tool
- func DraftsClearTool() *mcp.Tool
- func DraftsSetTool() *mcp.Tool
- func FoldersCreateTool() *mcp.Tool
- func FoldersDeleteTool() *mcp.Tool
- func FoldersEditTool() *mcp.Tool
- func FoldersListTool() *mcp.Tool
- func FormatMessageList(msgs []telegram.Message) string
- func GroupsAdminSetTool() *mcp.Tool
- func GroupsInfoTool() *mcp.Tool
- func GroupsInviteLinkGetTool() *mcp.Tool
- func GroupsInviteLinkRevokeTool() *mcp.Tool
- func GroupsJoinTool() *mcp.Tool
- func GroupsLeaveTool() *mcp.Tool
- func GroupsListTool() *mcp.Tool
- func GroupsMembersAddTool() *mcp.Tool
- func GroupsMembersListTool() *mcp.Tool
- func GroupsMembersRemoveTool() *mcp.Tool
- func GroupsRenameTool() *mcp.Tool
- func GroupsSlowmodeTool() *mcp.Tool
- func MediaDownloadTool() *mcp.Tool
- func MediaSendAlbumTool() *mcp.Tool
- func MediaUploadTool() *mcp.Tool
- func MessagesClearAllDraftsTool() *mcp.Tool
- func MessagesContextTool() *mcp.Tool
- func MessagesDeleteHistoryTool() *mcp.Tool
- func MessagesDeleteTool() *mcp.Tool
- func MessagesEditTool() *mcp.Tool
- func MessagesForwardTool() *mcp.Tool
- func MessagesGetReactionsTool() *mcp.Tool
- func MessagesGetScheduledTool() *mcp.Tool
- func MessagesGetTool() *mcp.Tool
- func MessagesListTool() *mcp.Tool
- func MessagesMarkReadTool() *mcp.Tool
- func MessagesPinTool() *mcp.Tool
- func MessagesReactTool() *mcp.Tool
- func MessagesSearchGlobalTool() *mcp.Tool
- func MessagesSearchTool() *mcp.Tool
- func MessagesSendFileTool() *mcp.Tool
- func MessagesSendTool() *mcp.Tool
- func NewChatsAdminsHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsAdminsParams, ChatsAdminsResult]
- func NewChatsArchiveHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsArchiveParams, ChatsArchiveResult]
- func NewChatsCreateHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsCreateParams, ChatsCreateResult]
- func NewChatsDeleteHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsDeleteParams, ChatsDeleteResult]
- func NewChatsMuteHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsMuteParams, ChatsMuteResult]
- func NewChatsPermissionsHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsPermissionsParams, ChatsPermissionsResult]
- func NewChatsSetDescriptionHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsSetDescriptionParams, ChatsSetDescriptionResult]
- func NewChatsSetPhotoHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsSetPhotoParams, ChatsSetPhotoResult]
- func NewContactsAddHandler(client telegram.Client) mcp.ToolHandlerFor[ContactsAddParams, ContactsAddResult]
- func NewContactsDeleteHandler(client telegram.Client) mcp.ToolHandlerFor[ContactsDeleteParams, ContactsDeleteResult]
- func NewContactsGetHandler(client telegram.Client) mcp.ToolHandlerFor[ContactsGetParams, ContactsGetResult]
- func NewContactsGetStatusesHandler(client telegram.Client) mcp.ToolHandlerFor[ContactsGetStatusesParams, ContactsGetStatusesResult]
- func NewContactsListBlockedHandler(client telegram.Client) mcp.ToolHandlerFor[ContactsListBlockedParams, ContactsListBlockedResult]
- func NewContactsSearchHandler(client telegram.Client) mcp.ToolHandlerFor[ContactsSearchParams, ContactsSearchResult]
- func NewDialogsGetInfoHandler(client telegram.Client) mcp.ToolHandlerFor[DialogsGetInfoParams, DialogsGetInfoResult]
- func NewDialogsListHandler(client telegram.Client) mcp.ToolHandlerFor[DialogsListParams, DialogsListResult]
- func NewDialogsMarkUnreadHandler(client telegram.Client) mcp.ToolHandlerFor[DialogsMarkUnreadParams, DialogsMarkUnreadResult]
- func NewDialogsPinHandler(client telegram.Client) mcp.ToolHandlerFor[DialogsPinParams, DialogsPinResult]
- func NewDialogsSearchHandler(client telegram.Client) mcp.ToolHandlerFor[DialogsSearchParams, DialogsSearchResult]
- func NewDraftsClearHandler(client telegram.Client) mcp.ToolHandlerFor[DraftsClearParams, DraftsClearResult]
- func NewDraftsSetHandler(client telegram.Client) mcp.ToolHandlerFor[DraftsSetParams, DraftsSetResult]
- func NewFoldersCreateHandler(client telegram.Client) mcp.ToolHandlerFor[FoldersCreateParams, FoldersCreateResult]
- func NewFoldersDeleteHandler(client telegram.Client) mcp.ToolHandlerFor[FoldersDeleteParams, FoldersDeleteResult]
- func NewFoldersEditHandler(client telegram.Client) mcp.ToolHandlerFor[FoldersEditParams, FoldersEditResult]
- func NewFoldersListHandler(client telegram.Client) mcp.ToolHandlerFor[FoldersListParams, FoldersListResult]
- func NewGroupsAdminSetHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsAdminSetParams, GroupsAdminSetResult]
- func NewGroupsInfoHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsInfoParams, GroupsInfoResult]
- func NewGroupsInviteLinkGetHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsInviteLinkGetParams, GroupsInviteLinkGetResult]
- func NewGroupsInviteLinkRevokeHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsInviteLinkRevokeParams, GroupsInviteLinkRevokeResult]
- func NewGroupsJoinHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsJoinParams, GroupsJoinResult]
- func NewGroupsLeaveHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsLeaveParams, GroupsLeaveResult]
- func NewGroupsListHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsListParams, GroupsListResult]
- func NewGroupsMembersAddHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsMembersAddParams, GroupsMembersAddResult]
- func NewGroupsMembersListHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsMembersListParams, GroupsMembersListResult]
- func NewGroupsMembersRemoveHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsMembersRemoveParams, GroupsMembersRemoveResult]
- func NewGroupsRenameHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsRenameParams, GroupsRenameResult]
- func NewGroupsSlowmodeHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsSlowmodeParams, GroupsSlowmodeResult]
- func NewMediaDownloadHandler(client telegram.Client, defaultDownloadDir string) mcp.ToolHandlerFor[MediaDownloadParams, MediaDownloadResult]
- func NewMediaSendAlbumHandler(client telegram.Client) mcp.ToolHandlerFor[MediaSendAlbumParams, MediaSendAlbumResult]
- func NewMediaUploadHandler(client telegram.Client) mcp.ToolHandlerFor[MediaUploadParams, MediaUploadResult]
- func NewMessagesClearAllDraftsHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesClearAllDraftsParams, MessagesClearAllDraftsResult]
- func NewMessagesContextHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesContextParams, MessagesContextResult]
- func NewMessagesDeleteHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesDeleteParams, MessagesDeleteResult]
- func NewMessagesDeleteHistoryHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesDeleteHistoryParams, MessagesDeleteHistoryResult]
- func NewMessagesEditHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesEditParams, MessagesEditResult]
- func NewMessagesForwardHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesForwardParams, MessagesForwardResult]
- func NewMessagesGetHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesGetParams, MessagesGetResult]
- func NewMessagesGetReactionsHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesGetReactionsParams, MessagesGetReactionsResult]
- func NewMessagesGetScheduledHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesGetScheduledParams, MessagesGetScheduledResult]
- func NewMessagesListHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesListParams, MessagesListResult]
- func NewMessagesMarkReadHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesMarkReadParams, MessagesMarkReadResult]
- func NewMessagesPinHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesPinParams, MessagesPinResult]
- func NewMessagesReactHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesReactParams, MessagesReactResult]
- func NewMessagesSearchGlobalHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesSearchGlobalParams, MessagesSearchGlobalResult]
- func NewMessagesSearchHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesSearchParams, MessagesSearchResult]
- func NewMessagesSendFileHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesSendFileParams, MessagesSendFileResult]
- func NewMessagesSendHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesSendParams, MessagesSendResult]
- func NewOnlineStatusSetHandler(client telegram.Client) mcp.ToolHandlerFor[OnlineStatusSetParams, OnlineStatusSetResult]
- func NewProfileGetHandler(client telegram.Client) mcp.ToolHandlerFor[ProfileGetParams, ProfileGetResult]
- func NewProfileSetBioHandler(client telegram.Client) mcp.ToolHandlerFor[ProfileSetBioParams, ProfileSetBioResult]
- func NewProfileSetNameHandler(client telegram.Client) mcp.ToolHandlerFor[ProfileSetNameParams, ProfileSetNameResult]
- func NewProfileSetPhotoHandler(client telegram.Client) mcp.ToolHandlerFor[ProfileSetPhotoParams, ProfileSetPhotoResult]
- func NewServerVersionHandler(version, revision, goVersion string) mcp.ToolHandlerFor[ServerVersionParams, ServerVersionResult]
- func NewStickersGetSetHandler(client telegram.Client) mcp.ToolHandlerFor[StickersGetSetParams, StickersGetSetResult]
- func NewStickersSearchHandler(client telegram.Client) mcp.ToolHandlerFor[StickersSearchParams, StickersSearchResult]
- func NewStickersSendHandler(client telegram.Client) mcp.ToolHandlerFor[StickersSendParams, StickersSendResult]
- func NewTopicsCreateHandler(client telegram.Client) mcp.ToolHandlerFor[TopicsCreateParams, TopicsCreateResult]
- func NewTopicsEditHandler(client telegram.Client) mcp.ToolHandlerFor[TopicsEditParams, TopicsEditResult]
- func NewTopicsListHandler(client telegram.Client) mcp.ToolHandlerFor[TopicsListParams, TopicsListResult]
- func NewTopicsSearchHandler(client telegram.Client) mcp.ToolHandlerFor[TopicsSearchParams, TopicsSearchResult]
- func NewTypingSendHandler(client telegram.Client) mcp.ToolHandlerFor[TypingSendParams, TypingSendResult]
- func NewUsersBlockHandler(client telegram.Client) mcp.ToolHandlerFor[UsersBlockParams, UsersBlockResult]
- func NewUsersCommonChatsHandler(client telegram.Client) mcp.ToolHandlerFor[UsersCommonChatsParams, UsersCommonChatsResult]
- func NewUsersGetHandler(client telegram.Client) mcp.ToolHandlerFor[UsersGetParams, UsersGetResult]
- func NewUsersPhotosHandler(client telegram.Client) mcp.ToolHandlerFor[UsersPhotosParams, UsersPhotosResult]
- func OnlineStatusSetTool() *mcp.Tool
- func ProfileGetTool() *mcp.Tool
- func ProfileSetBioTool() *mcp.Tool
- func ProfileSetNameTool() *mcp.Tool
- func ProfileSetPhotoTool() *mcp.Tool
- func ServerVersionTool() *mcp.Tool
- func StickersGetSetTool() *mcp.Tool
- func StickersSearchTool() *mcp.Tool
- func StickersSendTool() *mcp.Tool
- func TopicsCreateTool() *mcp.Tool
- func TopicsEditTool() *mcp.Tool
- func TopicsListTool() *mcp.Tool
- func TopicsSearchTool() *mcp.Tool
- func TypingSendTool() *mcp.Tool
- func UsersBlockTool() *mcp.Tool
- func UsersCommonChatsTool() *mcp.Tool
- func UsersGetTool() *mcp.Tool
- func UsersPhotosTool() *mcp.Tool
- type BoolFieldRegistry
- type ChatsAdminsParams
- type ChatsAdminsResult
- type ChatsArchiveParams
- type ChatsArchiveResult
- type ChatsCreateParams
- type ChatsCreateResult
- type ChatsDeleteParams
- type ChatsDeleteResult
- type ChatsMuteParams
- type ChatsMuteResult
- type ChatsPermissionsParams
- type ChatsPermissionsResult
- type ChatsSetDescriptionParams
- type ChatsSetDescriptionResult
- type ChatsSetPhotoParams
- type ChatsSetPhotoResult
- type ContactStatusItem
- type ContactsAddParams
- type ContactsAddResult
- type ContactsDeleteParams
- type ContactsDeleteResult
- type ContactsGetParams
- type ContactsGetResult
- type ContactsGetStatusesParams
- type ContactsGetStatusesResult
- type ContactsListBlockedParams
- type ContactsListBlockedResult
- type ContactsSearchParams
- type ContactsSearchResult
- type DialogItem
- type DialogsGetInfoParams
- type DialogsGetInfoResult
- type DialogsListParams
- type DialogsListResult
- type DialogsMarkUnreadParams
- type DialogsMarkUnreadResult
- type DialogsPinParams
- type DialogsPinResult
- type DialogsSearchParams
- type DialogsSearchResult
- type DraftsClearParams
- type DraftsClearResult
- type DraftsSetParams
- type DraftsSetResult
- type FolderItem
- type FoldersCreateParams
- type FoldersCreateResult
- type FoldersDeleteParams
- type FoldersDeleteResult
- type FoldersEditParams
- type FoldersEditResult
- type FoldersListParams
- type FoldersListResult
- type GroupsAdminSetParams
- type GroupsAdminSetResult
- type GroupsInfoParams
- type GroupsInfoResult
- type GroupsInviteLinkGetParams
- type GroupsInviteLinkGetResult
- type GroupsInviteLinkRevokeParams
- type GroupsInviteLinkRevokeResult
- type GroupsJoinParams
- type GroupsJoinResult
- type GroupsLeaveParams
- type GroupsLeaveResult
- type GroupsListParams
- type GroupsListResult
- type GroupsMembersAddParams
- type GroupsMembersAddResult
- type GroupsMembersListParams
- type GroupsMembersListResult
- type GroupsMembersRemoveParams
- type GroupsMembersRemoveResult
- type GroupsRenameParams
- type GroupsRenameResult
- type GroupsSlowmodeParams
- type GroupsSlowmodeResult
- type MediaDownloadParams
- type MediaDownloadResult
- type MediaSendAlbumParams
- type MediaSendAlbumResult
- type MediaUploadParams
- type MediaUploadResult
- type MessageItem
- type MessagesClearAllDraftsParams
- type MessagesClearAllDraftsResult
- type MessagesContextParams
- type MessagesContextResult
- type MessagesDeleteHistoryParams
- type MessagesDeleteHistoryResult
- type MessagesDeleteParams
- type MessagesDeleteResult
- type MessagesEditParams
- type MessagesEditResult
- type MessagesForwardParams
- type MessagesForwardResult
- type MessagesGetParams
- type MessagesGetReactionsParams
- type MessagesGetReactionsResult
- type MessagesGetResult
- type MessagesGetScheduledParams
- type MessagesGetScheduledResult
- type MessagesListParams
- type MessagesListResult
- type MessagesMarkReadParams
- type MessagesMarkReadResult
- type MessagesPinParams
- type MessagesPinResult
- type MessagesReactParams
- type MessagesReactResult
- type MessagesSearchGlobalParams
- type MessagesSearchGlobalResult
- type MessagesSearchParams
- type MessagesSearchResult
- type MessagesSendFileParams
- type MessagesSendFileResult
- type MessagesSendParams
- type MessagesSendResult
- type OnlineStatusSetParams
- type OnlineStatusSetResult
- type ParticipantItem
- type PeerRefItem
- type PhotoItem
- type ProfileGetParams
- type ProfileGetResult
- type ProfileSetBioParams
- type ProfileSetBioResult
- type ProfileSetNameParams
- type ProfileSetNameResult
- type ProfileSetPhotoParams
- type ProfileSetPhotoResult
- type ReactionUserItem
- type ReplyToMessage
- type ServerVersionParams
- type ServerVersionResult
- type StickerSetItem
- type StickersGetSetParams
- type StickersGetSetResult
- type StickersSearchParams
- type StickersSearchResult
- type StickersSendParams
- type StickersSendResult
- type TopicItem
- type TopicsCreateParams
- type TopicsCreateResult
- type TopicsEditParams
- type TopicsEditResult
- type TopicsListParams
- type TopicsListResult
- type TopicsSearchParams
- type TopicsSearchResult
- type TypingSendParams
- type TypingSendResult
- type UserItem
- type UsersBlockParams
- type UsersBlockResult
- type UsersCommonChatsParams
- type UsersCommonChatsResult
- type UsersGetParams
- type UsersGetResult
- type UsersPhotosParams
- type UsersPhotosResult
Constants ¶
const ServerVersionToolName = "tg_server_version"
ServerVersionToolName is the MCP tool name. Exported so tests and any future tool-allowlist (e.g. auth-bypass) can reference it without duplicating the literal.
Variables ¶
var ErrEmojiRequired = errors.New("emoji is required")
ErrEmojiRequired is returned when an emoji parameter is missing.
var ErrFirstNameRequired = errors.New("first name is required")
ErrFirstNameRequired is returned when a first name parameter is missing.
var ErrFolderIDRequired = errors.New("folder ID is required")
ErrFolderIDRequired is returned when a folder ID parameter is missing.
var ErrGroupRequired = errors.New("group is required")
ErrGroupRequired is returned when a group parameter is missing.
var ErrInvalidSlowmode = errors.New(
"invalid slowmode seconds; allowed: 0,10,30,60,300,900,3600,21600,43200",
)
ErrInvalidSlowmode is returned when seconds is not an allowed Telegram slowmode value.
var ErrLinkRequired = errors.New("link is required")
ErrLinkRequired is returned when a link parameter is missing.
var ErrMessageIDRequired = errors.New("message ID is required")
ErrMessageIDRequired is returned when a message ID parameter is missing.
var ErrMessageNotFound = errors.New("message not found")
ErrMessageNotFound is returned when a message cannot be found.
var ErrNameRequired = errors.New("name is required")
ErrNameRequired is returned when a name parameter is missing.
var ErrNegativeLimit = errors.New("numeric limits must not be negative")
ErrNegativeLimit is returned when a numeric limit parameter is negative.
var ErrParseModeNotImplemented = errors.New(
"parseMode not yet implemented; use 'commonmark' (supports **bold**, *italic*, `code`, [text](url), ```pre```, > quote)",
)
ErrParseModeNotImplemented is returned when parseMode is a valid value whose implementation is not yet available.
var ErrPathOutsideRoots = errors.New("file path is not within any client root directory")
ErrPathOutsideRoots is returned when a file path is not within any client root.
var ErrPathRequired = errors.New("path is required")
ErrPathRequired is returned when a file path parameter is missing.
var ErrPathsRequired = errors.New("paths list is required")
ErrPathsRequired is returned when a paths list parameter is missing.
var ErrPeerRequired = errors.New("peer is required")
ErrPeerRequired is returned when a peer parameter is missing.
var ErrQueryRequired = errors.New("query is required")
ErrQueryRequired is returned when a search query parameter is missing.
var ErrStickerFileIDRequired = errors.New("sticker file ID is required")
ErrStickerFileIDRequired is returned when a sticker file ID parameter is missing.
var ErrTelegram = errors.New("telegram request error")
ErrTelegram indicates a failure communicating with the Telegram API.
var ErrTextRequired = errors.New("text is required")
ErrTextRequired is returned when a text parameter is missing.
var ErrTitleRequired = errors.New("title is required")
ErrTitleRequired is returned when a title parameter is missing.
var ErrTooManyIDs = errors.New("too many IDs (max 100)")
ErrTooManyIDs is returned when too many message IDs are provided.
var ErrTopicIDOnNonForum = errors.New(
"topicId is only valid for forum-enabled supergroups; this chat is not a forum",
)
ErrTopicIDOnNonForum is returned when topicId is supplied for a chat that is not a forum-enabled supergroup.
var ErrTopicIDRequired = errors.New("topic ID is required")
ErrTopicIDRequired is returned when a topic ID parameter is missing.
var ErrUnknownParseMode = errors.New(
"unknown parseMode; allowed: '' (plain), 'commonmark', 'markdown' (alias for commonmark), 'html', 'markdownv2'",
)
ErrUnknownParseMode is returned when parseMode is a value the wrapper does not recognise.
var ErrUserPeerRequired = errors.New("this operation requires a user peer, not a group or channel")
ErrUserPeerRequired is returned when a user peer is needed but another type was provided.
var ErrUserRequired = errors.New("user is required")
ErrUserRequired is returned when a user parameter is missing.
var ErrValidation = errors.New("validation error")
ErrValidation indicates invalid parameters provided by the caller.
Functions ¶
func AddTool ¶ added in v0.9.4
func AddTool[In, Out any]( server *mcp.Server, registry BoolFieldRegistry, tool *mcp.Tool, handler mcp.ToolHandlerFor[In, Out], )
AddTool wraps mcp.AddTool, additionally recording the JSON names of every bool / *bool field on the In type into registry under the tool's name. The registry is later used by the bool-coercion middleware to rewrite string-encoded booleans (e.g. "true") into real JSON booleans before the SDK validator runs.
func ChatsAdminsTool ¶
ChatsAdminsTool returns the MCP tool definition for tg_chats_get_admins.
func ChatsArchiveTool ¶
ChatsArchiveTool returns the MCP tool definition for tg_chats_archive.
func ChatsCreateTool ¶
ChatsCreateTool returns the MCP tool definition for tg_chats_create.
func ChatsDeleteTool ¶
ChatsDeleteTool returns the MCP tool definition for tg_chats_delete.
func ChatsMuteTool ¶
ChatsMuteTool returns the MCP tool definition for tg_chats_mute.
func ChatsPermissionsTool ¶
ChatsPermissionsTool returns the MCP tool definition for tg_chats_set_permissions.
func ChatsSetDescriptionTool ¶
ChatsSetDescriptionTool returns the MCP tool definition for tg_chats_set_description.
func ChatsSetPhotoTool ¶
ChatsSetPhotoTool returns the MCP tool definition for tg_chats_set_photo.
func ContactsAddTool ¶ added in v0.6.0
ContactsAddTool returns the tool definition for tg_contacts_add.
func ContactsDeleteTool ¶ added in v0.6.0
ContactsDeleteTool returns the tool definition for tg_contacts_delete.
func ContactsGetStatusesTool ¶ added in v0.6.0
ContactsGetStatusesTool returns the tool definition.
func ContactsGetTool ¶
ContactsGetTool returns the MCP tool definition for tg_contacts_get.
func ContactsListBlockedTool ¶ added in v0.6.0
ContactsListBlockedTool returns the tool definition.
func ContactsSearchTool ¶
ContactsSearchTool returns the MCP tool definition for tg_contacts_search.
func DialogsGetInfoTool ¶
DialogsGetInfoTool returns the MCP tool definition for tg_dialogs_get_info.
func DialogsListTool ¶
DialogsListTool returns the MCP tool definition for tg_dialogs_list.
func DialogsMarkUnreadTool ¶ added in v0.6.0
DialogsMarkUnreadTool returns the tool definition for tg_dialogs_mark_unread.
func DialogsPinTool ¶ added in v0.6.0
DialogsPinTool returns the tool definition for tg_dialogs_pin.
func DialogsSearchTool ¶
DialogsSearchTool returns the MCP tool definition for tg_dialogs_search.
func DraftsClearTool ¶
DraftsClearTool returns the MCP tool definition for tg_drafts_clear.
func DraftsSetTool ¶
DraftsSetTool returns the MCP tool definition for tg_drafts_set.
func FoldersCreateTool ¶
FoldersCreateTool returns the MCP tool definition for tg_folders_create.
func FoldersDeleteTool ¶
FoldersDeleteTool returns the MCP tool definition for tg_folders_delete.
func FoldersEditTool ¶
FoldersEditTool returns the MCP tool definition for tg_folders_edit.
func FoldersListTool ¶
FoldersListTool returns the MCP tool definition for tg_folders_list.
func FormatMessageList ¶ added in v0.13.0
FormatMessageList renders a slice of domain messages in the same multi-line block format the tool surface uses. Exported so other packages (resources) can produce identical output without duplicating the layout rules.
func GroupsAdminSetTool ¶ added in v0.6.0
GroupsAdminSetTool returns the tool definition for tg_groups_admin_set.
func GroupsInfoTool ¶
GroupsInfoTool returns the MCP tool definition for tg_groups_info.
func GroupsInviteLinkGetTool ¶
GroupsInviteLinkGetTool returns the MCP tool definition for tg_groups_invite_link_get.
func GroupsInviteLinkRevokeTool ¶
GroupsInviteLinkRevokeTool returns the MCP tool definition for tg_groups_invite_link_revoke.
func GroupsJoinTool ¶
GroupsJoinTool returns the MCP tool definition for tg_groups_join.
func GroupsLeaveTool ¶
GroupsLeaveTool returns the MCP tool definition for tg_groups_leave.
func GroupsListTool ¶
GroupsListTool returns the MCP tool definition for tg_groups_list.
func GroupsMembersAddTool ¶
GroupsMembersAddTool returns the MCP tool definition for tg_groups_members_add.
func GroupsMembersListTool ¶ added in v0.6.0
GroupsMembersListTool returns the tool definition.
func GroupsMembersRemoveTool ¶
GroupsMembersRemoveTool returns the MCP tool definition for tg_groups_members_remove.
func GroupsRenameTool ¶
GroupsRenameTool returns the MCP tool definition for tg_groups_rename.
func GroupsSlowmodeTool ¶ added in v0.6.0
GroupsSlowmodeTool returns the tool definition for tg_groups_slowmode.
func MediaDownloadTool ¶
MediaDownloadTool returns the MCP tool definition for tg_media_download.
func MediaSendAlbumTool ¶
MediaSendAlbumTool returns the MCP tool definition for tg_media_send_album.
func MediaUploadTool ¶
MediaUploadTool returns the MCP tool definition for tg_media_upload.
func MessagesClearAllDraftsTool ¶ added in v0.6.0
MessagesClearAllDraftsTool returns the tool definition.
func MessagesContextTool ¶
MessagesContextTool returns the MCP tool definition for tg_messages_context.
func MessagesDeleteHistoryTool ¶ added in v0.6.0
MessagesDeleteHistoryTool returns the tool definition.
func MessagesDeleteTool ¶
MessagesDeleteTool returns the MCP tool definition for tg_messages_delete.
func MessagesEditTool ¶
MessagesEditTool returns the MCP tool definition for tg_messages_edit.
func MessagesForwardTool ¶
MessagesForwardTool returns the MCP tool definition for tg_messages_forward.
func MessagesGetReactionsTool ¶ added in v0.6.0
MessagesGetReactionsTool returns the tool definition.
func MessagesGetScheduledTool ¶ added in v0.6.0
MessagesGetScheduledTool returns the tool definition for tg_messages_get_scheduled.
func MessagesGetTool ¶
MessagesGetTool returns the MCP tool definition for tg_messages_get.
func MessagesListTool ¶
MessagesListTool returns the MCP tool definition for tg_messages_list.
func MessagesMarkReadTool ¶
MessagesMarkReadTool returns the MCP tool definition for tg_messages_mark_read.
func MessagesPinTool ¶
MessagesPinTool returns the MCP tool definition for tg_messages_pin.
func MessagesReactTool ¶
MessagesReactTool returns the MCP tool definition for tg_messages_react.
func MessagesSearchGlobalTool ¶ added in v0.6.0
MessagesSearchGlobalTool returns the tool definition.
func MessagesSearchTool ¶
MessagesSearchTool returns the MCP tool definition for tg_messages_search.
func MessagesSendFileTool ¶
MessagesSendFileTool returns the MCP tool definition for tg_messages_send_file.
func MessagesSendTool ¶
MessagesSendTool returns the MCP tool definition for tg_messages_send.
func NewChatsAdminsHandler ¶
func NewChatsAdminsHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsAdminsParams, ChatsAdminsResult]
NewChatsAdminsHandler creates a handler for the tg_chats_get_admins tool.
func NewChatsArchiveHandler ¶
func NewChatsArchiveHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsArchiveParams, ChatsArchiveResult]
NewChatsArchiveHandler creates a handler for the tg_chats_archive tool.
func NewChatsCreateHandler ¶
func NewChatsCreateHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsCreateParams, ChatsCreateResult]
NewChatsCreateHandler creates a handler for the tg_chats_create tool.
func NewChatsDeleteHandler ¶
func NewChatsDeleteHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsDeleteParams, ChatsDeleteResult]
NewChatsDeleteHandler creates a handler for the tg_chats_delete tool.
func NewChatsMuteHandler ¶
func NewChatsMuteHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsMuteParams, ChatsMuteResult]
NewChatsMuteHandler creates a handler for the tg_chats_mute tool.
func NewChatsPermissionsHandler ¶
func NewChatsPermissionsHandler( client telegram.Client, ) mcp.ToolHandlerFor[ChatsPermissionsParams, ChatsPermissionsResult]
NewChatsPermissionsHandler creates a handler for the tg_chats_set_permissions tool.
func NewChatsSetDescriptionHandler ¶
func NewChatsSetDescriptionHandler( client telegram.Client, ) mcp.ToolHandlerFor[ChatsSetDescriptionParams, ChatsSetDescriptionResult]
NewChatsSetDescriptionHandler creates a handler for the tg_chats_set_description tool.
func NewChatsSetPhotoHandler ¶
func NewChatsSetPhotoHandler(client telegram.Client) mcp.ToolHandlerFor[ChatsSetPhotoParams, ChatsSetPhotoResult]
NewChatsSetPhotoHandler creates a handler for the tg_chats_set_photo tool.
func NewContactsAddHandler ¶ added in v0.6.0
func NewContactsAddHandler( client telegram.Client, ) mcp.ToolHandlerFor[ContactsAddParams, ContactsAddResult]
NewContactsAddHandler creates a handler for tg_contacts_add.
func NewContactsDeleteHandler ¶ added in v0.6.0
func NewContactsDeleteHandler( client telegram.Client, ) mcp.ToolHandlerFor[ContactsDeleteParams, ContactsDeleteResult]
NewContactsDeleteHandler creates a handler for tg_contacts_delete.
func NewContactsGetHandler ¶
func NewContactsGetHandler(client telegram.Client) mcp.ToolHandlerFor[ContactsGetParams, ContactsGetResult]
NewContactsGetHandler creates a handler for the tg_contacts_get tool.
func NewContactsGetStatusesHandler ¶ added in v0.6.0
func NewContactsGetStatusesHandler( client telegram.Client, ) mcp.ToolHandlerFor[ContactsGetStatusesParams, ContactsGetStatusesResult]
NewContactsGetStatusesHandler creates a handler for tg_contacts_get_statuses.
func NewContactsListBlockedHandler ¶ added in v0.6.0
func NewContactsListBlockedHandler( client telegram.Client, ) mcp.ToolHandlerFor[ContactsListBlockedParams, ContactsListBlockedResult]
NewContactsListBlockedHandler creates a handler for tg_contacts_list_blocked.
func NewContactsSearchHandler ¶
func NewContactsSearchHandler(client telegram.Client) mcp.ToolHandlerFor[ContactsSearchParams, ContactsSearchResult]
NewContactsSearchHandler creates a handler for the tg_contacts_search tool.
func NewDialogsGetInfoHandler ¶
func NewDialogsGetInfoHandler(client telegram.Client) mcp.ToolHandlerFor[DialogsGetInfoParams, DialogsGetInfoResult]
NewDialogsGetInfoHandler creates a handler for the tg_dialogs_get_info tool.
func NewDialogsListHandler ¶
func NewDialogsListHandler(client telegram.Client) mcp.ToolHandlerFor[DialogsListParams, DialogsListResult]
NewDialogsListHandler creates a handler for the tg_dialogs_list tool.
func NewDialogsMarkUnreadHandler ¶ added in v0.6.0
func NewDialogsMarkUnreadHandler( client telegram.Client, ) mcp.ToolHandlerFor[DialogsMarkUnreadParams, DialogsMarkUnreadResult]
NewDialogsMarkUnreadHandler creates a handler for tg_dialogs_mark_unread.
func NewDialogsPinHandler ¶ added in v0.6.0
func NewDialogsPinHandler( client telegram.Client, ) mcp.ToolHandlerFor[DialogsPinParams, DialogsPinResult]
NewDialogsPinHandler creates a handler for tg_dialogs_pin.
func NewDialogsSearchHandler ¶
func NewDialogsSearchHandler(client telegram.Client) mcp.ToolHandlerFor[DialogsSearchParams, DialogsSearchResult]
NewDialogsSearchHandler creates a handler for the tg_dialogs_search tool.
func NewDraftsClearHandler ¶
func NewDraftsClearHandler(client telegram.Client) mcp.ToolHandlerFor[DraftsClearParams, DraftsClearResult]
NewDraftsClearHandler creates a handler for the tg_drafts_clear tool.
func NewDraftsSetHandler ¶
func NewDraftsSetHandler(client telegram.Client) mcp.ToolHandlerFor[DraftsSetParams, DraftsSetResult]
NewDraftsSetHandler creates a handler for the tg_drafts_set tool.
func NewFoldersCreateHandler ¶
func NewFoldersCreateHandler(client telegram.Client) mcp.ToolHandlerFor[FoldersCreateParams, FoldersCreateResult]
NewFoldersCreateHandler creates a handler for the tg_folders_create tool.
func NewFoldersDeleteHandler ¶
func NewFoldersDeleteHandler(client telegram.Client) mcp.ToolHandlerFor[FoldersDeleteParams, FoldersDeleteResult]
NewFoldersDeleteHandler creates a handler for the tg_folders_delete tool.
func NewFoldersEditHandler ¶
func NewFoldersEditHandler(client telegram.Client) mcp.ToolHandlerFor[FoldersEditParams, FoldersEditResult]
NewFoldersEditHandler creates a handler for the tg_folders_edit tool.
func NewFoldersListHandler ¶
func NewFoldersListHandler(client telegram.Client) mcp.ToolHandlerFor[FoldersListParams, FoldersListResult]
NewFoldersListHandler creates a handler for the tg_folders_list tool.
func NewGroupsAdminSetHandler ¶ added in v0.6.0
func NewGroupsAdminSetHandler( client telegram.Client, ) mcp.ToolHandlerFor[GroupsAdminSetParams, GroupsAdminSetResult]
NewGroupsAdminSetHandler creates a handler for tg_groups_admin_set.
func NewGroupsInfoHandler ¶
func NewGroupsInfoHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsInfoParams, GroupsInfoResult]
NewGroupsInfoHandler creates a handler for the tg_groups_info tool.
func NewGroupsInviteLinkGetHandler ¶
func NewGroupsInviteLinkGetHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsInviteLinkGetParams, GroupsInviteLinkGetResult]
NewGroupsInviteLinkGetHandler creates a handler for the tg_groups_invite_link_get tool.
func NewGroupsInviteLinkRevokeHandler ¶
func NewGroupsInviteLinkRevokeHandler( client telegram.Client, ) mcp.ToolHandlerFor[GroupsInviteLinkRevokeParams, GroupsInviteLinkRevokeResult]
NewGroupsInviteLinkRevokeHandler creates a handler for the tg_groups_invite_link_revoke tool.
func NewGroupsJoinHandler ¶
func NewGroupsJoinHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsJoinParams, GroupsJoinResult]
NewGroupsJoinHandler creates a handler for the tg_groups_join tool.
func NewGroupsLeaveHandler ¶
func NewGroupsLeaveHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsLeaveParams, GroupsLeaveResult]
NewGroupsLeaveHandler creates a handler for the tg_groups_leave tool.
func NewGroupsListHandler ¶
func NewGroupsListHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsListParams, GroupsListResult]
NewGroupsListHandler creates a handler for the tg_groups_list tool.
func NewGroupsMembersAddHandler ¶
func NewGroupsMembersAddHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsMembersAddParams, GroupsMembersAddResult]
NewGroupsMembersAddHandler creates a handler for the tg_groups_members_add tool.
func NewGroupsMembersListHandler ¶ added in v0.6.0
func NewGroupsMembersListHandler( client telegram.Client, ) mcp.ToolHandlerFor[GroupsMembersListParams, GroupsMembersListResult]
NewGroupsMembersListHandler creates a handler for tg_groups_members_list.
func NewGroupsMembersRemoveHandler ¶
func NewGroupsMembersRemoveHandler( client telegram.Client, ) mcp.ToolHandlerFor[GroupsMembersRemoveParams, GroupsMembersRemoveResult]
NewGroupsMembersRemoveHandler creates a handler for the tg_groups_members_remove tool.
func NewGroupsRenameHandler ¶
func NewGroupsRenameHandler(client telegram.Client) mcp.ToolHandlerFor[GroupsRenameParams, GroupsRenameResult]
NewGroupsRenameHandler creates a handler for the tg_groups_rename tool.
func NewGroupsSlowmodeHandler ¶ added in v0.6.0
func NewGroupsSlowmodeHandler( client telegram.Client, ) mcp.ToolHandlerFor[GroupsSlowmodeParams, GroupsSlowmodeResult]
NewGroupsSlowmodeHandler creates a handler for tg_groups_slowmode.
func NewMediaDownloadHandler ¶
func NewMediaDownloadHandler( client telegram.Client, defaultDownloadDir string, ) mcp.ToolHandlerFor[MediaDownloadParams, MediaDownloadResult]
NewMediaDownloadHandler creates a handler for the tg_media_download tool.
func NewMediaSendAlbumHandler ¶
func NewMediaSendAlbumHandler( client telegram.Client, ) mcp.ToolHandlerFor[MediaSendAlbumParams, MediaSendAlbumResult]
NewMediaSendAlbumHandler creates a handler for the tg_media_send_album tool.
func NewMediaUploadHandler ¶
func NewMediaUploadHandler(client telegram.Client) mcp.ToolHandlerFor[MediaUploadParams, MediaUploadResult]
NewMediaUploadHandler creates a handler for the tg_media_upload tool.
func NewMessagesClearAllDraftsHandler ¶ added in v0.6.0
func NewMessagesClearAllDraftsHandler( client telegram.Client, ) mcp.ToolHandlerFor[MessagesClearAllDraftsParams, MessagesClearAllDraftsResult]
NewMessagesClearAllDraftsHandler creates a handler for tg_messages_clear_all_drafts.
func NewMessagesContextHandler ¶
func NewMessagesContextHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesContextParams, MessagesContextResult]
NewMessagesContextHandler creates a handler for the tg_messages_context tool.
func NewMessagesDeleteHandler ¶
func NewMessagesDeleteHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesDeleteParams, MessagesDeleteResult]
NewMessagesDeleteHandler creates a handler for the tg_messages_delete tool.
func NewMessagesDeleteHistoryHandler ¶ added in v0.6.0
func NewMessagesDeleteHistoryHandler( client telegram.Client, ) mcp.ToolHandlerFor[MessagesDeleteHistoryParams, MessagesDeleteHistoryResult]
NewMessagesDeleteHistoryHandler creates a handler for tg_messages_delete_history.
func NewMessagesEditHandler ¶
func NewMessagesEditHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesEditParams, MessagesEditResult]
NewMessagesEditHandler creates a handler for the tg_messages_edit tool.
func NewMessagesForwardHandler ¶
func NewMessagesForwardHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesForwardParams, MessagesForwardResult]
NewMessagesForwardHandler creates a handler for the tg_messages_forward tool.
func NewMessagesGetHandler ¶
func NewMessagesGetHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesGetParams, MessagesGetResult]
NewMessagesGetHandler creates a handler for the tg_messages_get tool.
func NewMessagesGetReactionsHandler ¶ added in v0.6.0
func NewMessagesGetReactionsHandler( client telegram.Client, ) mcp.ToolHandlerFor[MessagesGetReactionsParams, MessagesGetReactionsResult]
NewMessagesGetReactionsHandler creates a handler for tg_messages_get_reactions.
func NewMessagesGetScheduledHandler ¶ added in v0.6.0
func NewMessagesGetScheduledHandler( client telegram.Client, ) mcp.ToolHandlerFor[MessagesGetScheduledParams, MessagesGetScheduledResult]
NewMessagesGetScheduledHandler creates a handler for tg_messages_get_scheduled.
func NewMessagesListHandler ¶
func NewMessagesListHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesListParams, MessagesListResult]
NewMessagesListHandler creates a handler for the tg_messages_list tool.
func NewMessagesMarkReadHandler ¶
func NewMessagesMarkReadHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesMarkReadParams, MessagesMarkReadResult]
NewMessagesMarkReadHandler creates a handler for the tg_messages_mark_read tool.
func NewMessagesPinHandler ¶
func NewMessagesPinHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesPinParams, MessagesPinResult]
NewMessagesPinHandler creates a handler for the tg_messages_pin tool.
func NewMessagesReactHandler ¶
func NewMessagesReactHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesReactParams, MessagesReactResult]
NewMessagesReactHandler creates a handler for the tg_messages_react tool.
func NewMessagesSearchGlobalHandler ¶ added in v0.6.0
func NewMessagesSearchGlobalHandler( client telegram.Client, ) mcp.ToolHandlerFor[MessagesSearchGlobalParams, MessagesSearchGlobalResult]
NewMessagesSearchGlobalHandler creates a handler for tg_messages_search_global.
func NewMessagesSearchHandler ¶
func NewMessagesSearchHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesSearchParams, MessagesSearchResult]
NewMessagesSearchHandler creates a handler for the tg_messages_search tool.
func NewMessagesSendFileHandler ¶
func NewMessagesSendFileHandler( client telegram.Client, ) mcp.ToolHandlerFor[MessagesSendFileParams, MessagesSendFileResult]
NewMessagesSendFileHandler creates a handler for the tg_messages_send_file tool.
func NewMessagesSendHandler ¶
func NewMessagesSendHandler(client telegram.Client) mcp.ToolHandlerFor[MessagesSendParams, MessagesSendResult]
NewMessagesSendHandler creates a handler for the tg_messages_send tool.
func NewOnlineStatusSetHandler ¶
func NewOnlineStatusSetHandler(client telegram.Client) mcp.ToolHandlerFor[OnlineStatusSetParams, OnlineStatusSetResult]
NewOnlineStatusSetHandler creates a handler for the tg_online_status_set tool.
func NewProfileGetHandler ¶
func NewProfileGetHandler(client telegram.Client) mcp.ToolHandlerFor[ProfileGetParams, ProfileGetResult]
NewProfileGetHandler creates a handler for the tg_profile_get tool.
func NewProfileSetBioHandler ¶
func NewProfileSetBioHandler(client telegram.Client) mcp.ToolHandlerFor[ProfileSetBioParams, ProfileSetBioResult]
NewProfileSetBioHandler creates a handler for the tg_profile_set_bio tool.
func NewProfileSetNameHandler ¶
func NewProfileSetNameHandler(client telegram.Client) mcp.ToolHandlerFor[ProfileSetNameParams, ProfileSetNameResult]
NewProfileSetNameHandler creates a handler for the tg_profile_set_name tool.
func NewProfileSetPhotoHandler ¶
func NewProfileSetPhotoHandler(client telegram.Client) mcp.ToolHandlerFor[ProfileSetPhotoParams, ProfileSetPhotoResult]
NewProfileSetPhotoHandler creates a handler for the tg_profile_set_photo tool.
func NewServerVersionHandler ¶ added in v0.11.0
func NewServerVersionHandler( version, revision, goVersion string, ) mcp.ToolHandlerFor[ServerVersionParams, ServerVersionResult]
NewServerVersionHandler creates a handler that reports the build metadata passed in — typically the package-level `version` and `revision` strings injected via -ldflags from the Containerfile, plus runtime.Version(). Taking these as parameters (instead of reading from the cmd package directly) avoids an internal-tool import cycle and keeps the handler trivially testable.
func NewStickersGetSetHandler ¶
func NewStickersGetSetHandler(client telegram.Client) mcp.ToolHandlerFor[StickersGetSetParams, StickersGetSetResult]
NewStickersGetSetHandler creates a handler for the tg_stickers_get_set tool.
func NewStickersSearchHandler ¶
func NewStickersSearchHandler(client telegram.Client) mcp.ToolHandlerFor[StickersSearchParams, StickersSearchResult]
NewStickersSearchHandler creates a handler for the tg_stickers_search tool.
func NewStickersSendHandler ¶
func NewStickersSendHandler(client telegram.Client) mcp.ToolHandlerFor[StickersSendParams, StickersSendResult]
NewStickersSendHandler creates a handler for the tg_stickers_send tool.
func NewTopicsCreateHandler ¶ added in v0.6.0
func NewTopicsCreateHandler( client telegram.Client, ) mcp.ToolHandlerFor[TopicsCreateParams, TopicsCreateResult]
NewTopicsCreateHandler creates a handler for tg_topics_create.
func NewTopicsEditHandler ¶ added in v0.6.0
func NewTopicsEditHandler( client telegram.Client, ) mcp.ToolHandlerFor[TopicsEditParams, TopicsEditResult]
NewTopicsEditHandler creates a handler for tg_topics_edit.
func NewTopicsListHandler ¶
func NewTopicsListHandler(client telegram.Client) mcp.ToolHandlerFor[TopicsListParams, TopicsListResult]
NewTopicsListHandler creates a handler for the tg_topics_list tool.
func NewTopicsSearchHandler ¶
func NewTopicsSearchHandler(client telegram.Client) mcp.ToolHandlerFor[TopicsSearchParams, TopicsSearchResult]
NewTopicsSearchHandler creates a handler for the tg_topics_search tool.
func NewTypingSendHandler ¶
func NewTypingSendHandler(client telegram.Client) mcp.ToolHandlerFor[TypingSendParams, TypingSendResult]
NewTypingSendHandler creates a handler for the tg_typing_send tool.
func NewUsersBlockHandler ¶
func NewUsersBlockHandler(client telegram.Client) mcp.ToolHandlerFor[UsersBlockParams, UsersBlockResult]
NewUsersBlockHandler creates a handler for the tg_users_block tool.
func NewUsersCommonChatsHandler ¶
func NewUsersCommonChatsHandler(client telegram.Client) mcp.ToolHandlerFor[UsersCommonChatsParams, UsersCommonChatsResult]
NewUsersCommonChatsHandler creates a handler for the tg_users_get_common_chats tool.
func NewUsersGetHandler ¶
func NewUsersGetHandler(client telegram.Client) mcp.ToolHandlerFor[UsersGetParams, UsersGetResult]
NewUsersGetHandler creates a handler for the tg_users_get tool.
func NewUsersPhotosHandler ¶
func NewUsersPhotosHandler(client telegram.Client) mcp.ToolHandlerFor[UsersPhotosParams, UsersPhotosResult]
NewUsersPhotosHandler creates a handler for the tg_users_get_photos tool.
func OnlineStatusSetTool ¶
OnlineStatusSetTool returns the MCP tool definition for tg_online_status_set.
func ProfileGetTool ¶
ProfileGetTool returns the MCP tool definition for tg_profile_get.
func ProfileSetBioTool ¶
ProfileSetBioTool returns the MCP tool definition for tg_profile_set_bio.
func ProfileSetNameTool ¶
ProfileSetNameTool returns the MCP tool definition for tg_profile_set_name.
func ProfileSetPhotoTool ¶
ProfileSetPhotoTool returns the MCP tool definition for tg_profile_set_photo.
func ServerVersionTool ¶ added in v0.11.0
ServerVersionTool returns the MCP tool definition for tg_server_version.
func StickersGetSetTool ¶
StickersGetSetTool returns the MCP tool definition for tg_stickers_get_set.
func StickersSearchTool ¶
StickersSearchTool returns the MCP tool definition for tg_stickers_search.
func StickersSendTool ¶
StickersSendTool returns the MCP tool definition for tg_stickers_send.
func TopicsCreateTool ¶ added in v0.6.0
TopicsCreateTool returns the tool definition for tg_topics_create.
func TopicsEditTool ¶ added in v0.6.0
TopicsEditTool returns the tool definition for tg_topics_edit.
func TopicsListTool ¶
TopicsListTool returns the MCP tool definition for tg_topics_list.
func TopicsSearchTool ¶
TopicsSearchTool returns the MCP tool definition for tg_topics_search.
func TypingSendTool ¶
TypingSendTool returns the MCP tool definition for tg_typing_send.
func UsersBlockTool ¶
UsersBlockTool returns the MCP tool definition for tg_users_block.
func UsersCommonChatsTool ¶
UsersCommonChatsTool returns the MCP tool definition for tg_users_get_common_chats.
func UsersGetTool ¶
UsersGetTool returns the MCP tool definition for tg_users_get.
func UsersPhotosTool ¶
UsersPhotosTool returns the MCP tool definition for tg_users_get_photos.
Types ¶
type BoolFieldRegistry ¶ added in v0.9.4
BoolFieldRegistry mirrors middleware.BoolFieldRegistry without creating a dependency on the middleware package. The cmd/mcp-tg entry point passes the same map to both packages.
type ChatsAdminsParams ¶
type ChatsAdminsParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
ChatsAdminsParams defines the parameters for the tg_chats_get_admins tool.
type ChatsAdminsResult ¶
type ChatsAdminsResult struct {
Count int `json:"count"`
Admins []UserItem `json:"admins"`
Output string `json:"output"`
}
ChatsAdminsResult is the output of the tg_chats_get_admins tool.
type ChatsArchiveParams ¶
type ChatsArchiveParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Archive bool `json:"archive" jsonschema:"True to archive, false to unarchive"`
}
ChatsArchiveParams defines the parameters for the tg_chats_archive tool.
type ChatsArchiveResult ¶
type ChatsArchiveResult struct {
Peer string `json:"peer"`
Archived bool `json:"archived"`
Output string `json:"output"`
}
ChatsArchiveResult is the output of the tg_chats_archive tool.
type ChatsCreateParams ¶
type ChatsCreateParams struct {
Title string `json:"title" jsonschema:"Title for the new chat or channel"`
IsChannel *bool `json:"isChannel,omitempty" jsonschema:"Create a channel instead of a group"`
UserPeers []string `json:"userPeers,omitempty" jsonschema:"Users: @usernames or numeric IDs"`
}
ChatsCreateParams defines the parameters for the tg_chats_create tool.
type ChatsCreateResult ¶
type ChatsCreateResult struct {
Title string `json:"title"`
Type string `json:"type"`
Output string `json:"output"`
}
ChatsCreateResult is the output of the tg_chats_create tool.
type ChatsDeleteParams ¶
type ChatsDeleteParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
ChatsDeleteParams defines the parameters for the tg_chats_delete tool.
type ChatsDeleteResult ¶
type ChatsDeleteResult struct {
Output string `json:"output"`
}
ChatsDeleteResult is the output of the tg_chats_delete tool.
type ChatsMuteParams ¶
type ChatsMuteParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
MuteUntil int `json:"muteUntil" jsonschema:"Unix timestamp until which to mute (0 to unmute)"`
}
ChatsMuteParams defines the parameters for the tg_chats_mute tool.
type ChatsMuteResult ¶
type ChatsMuteResult struct {
Peer string `json:"peer"`
MuteUntil int `json:"muteUntil"`
Output string `json:"output"`
}
ChatsMuteResult is the output of the tg_chats_mute tool.
type ChatsPermissionsParams ¶
type ChatsPermissionsParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
SendMessages *bool `json:"sendMessages,omitempty" jsonschema:"Allow sending text messages"`
SendMedia *bool `json:"sendMedia,omitempty" jsonschema:"Allow sending media (photos, videos, etc.)"`
SendStickers *bool `json:"sendStickers,omitempty" jsonschema:"Allow sending stickers"`
SendGifs *bool `json:"sendGifs,omitempty" jsonschema:"Allow sending GIFs"`
SendPolls *bool `json:"sendPolls,omitempty" jsonschema:"Allow sending polls"`
AddMembers *bool `json:"addMembers,omitempty" jsonschema:"Allow adding new members"`
PinMessages *bool `json:"pinMessages,omitempty" jsonschema:"Allow pinning messages"`
ChangeInfo *bool `json:"changeInfo,omitempty" jsonschema:"Allow changing chat info"`
}
ChatsPermissionsParams defines the parameters for the tg_chats_set_permissions tool.
type ChatsPermissionsResult ¶
type ChatsPermissionsResult struct {
Output string `json:"output"`
}
ChatsPermissionsResult is the output of the tg_chats_set_permissions tool.
type ChatsSetDescriptionParams ¶
type ChatsSetDescriptionParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
About string `json:"about" jsonschema:"New description text for the chat"`
}
ChatsSetDescriptionParams defines the parameters for the tg_chats_set_description tool.
type ChatsSetDescriptionResult ¶
type ChatsSetDescriptionResult struct {
Peer string `json:"peer"`
About string `json:"about"`
Output string `json:"output"`
}
ChatsSetDescriptionResult is the output of the tg_chats_set_description tool.
type ChatsSetPhotoParams ¶
type ChatsSetPhotoParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Path string `json:"path" jsonschema:"Local file path of the new photo"`
}
ChatsSetPhotoParams defines the parameters for the tg_chats_set_photo tool.
type ChatsSetPhotoResult ¶
type ChatsSetPhotoResult struct {
Peer string `json:"peer"`
Path string `json:"path"`
Output string `json:"output"`
}
ChatsSetPhotoResult is the output of the tg_chats_set_photo tool.
type ContactStatusItem ¶ added in v0.6.0
type ContactStatusItem struct {
UserID int64 `json:"userId"`
Name string `json:"name,omitempty"`
Username string `json:"username,omitempty"`
Status string `json:"status"`
LastSeen int `json:"lastSeen,omitempty"`
}
ContactStatusItem is a structured contact status entry for JSON results.
Name and Username mirror the shape every other peer-bearing JSON entry uses. They stay empty today because ContactsGetStatuses (MTProto) does not return a parallel Users[] array — a follow-up can wire a batched UsersGetUsers lookup to populate them without touching the schema again.
type ContactsAddParams ¶ added in v0.6.0
type ContactsAddParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
FirstName string `json:"firstName" jsonschema:"Contact first name"`
LastName *string `json:"lastName,omitempty" jsonschema:"Contact last name"`
Phone *string `json:"phone,omitempty" jsonschema:"Contact phone number"`
}
ContactsAddParams defines parameters for tg_contacts_add.
type ContactsAddResult ¶ added in v0.6.0
type ContactsAddResult struct {
Output string `json:"output"`
}
ContactsAddResult is the output of tg_contacts_add.
type ContactsDeleteParams ¶ added in v0.6.0
type ContactsDeleteParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
ContactsDeleteParams defines parameters for tg_contacts_delete.
type ContactsDeleteResult ¶ added in v0.6.0
type ContactsDeleteResult struct {
Peer string `json:"peer"`
Deleted bool `json:"deleted"`
Output string `json:"output"`
}
ContactsDeleteResult is the output of tg_contacts_delete.
type ContactsGetParams ¶
type ContactsGetParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
ContactsGetParams defines the parameters for the tg_contacts_get tool.
type ContactsGetResult ¶
type ContactsGetResult struct {
UserID int64 `json:"userId"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Username string `json:"username"`
Bio string `json:"bio"`
Output string `json:"output"`
}
ContactsGetResult is the output of the tg_contacts_get tool.
type ContactsGetStatusesParams ¶ added in v0.6.0
type ContactsGetStatusesParams struct{}
ContactsGetStatusesParams defines parameters for tg_contacts_get_statuses.
type ContactsGetStatusesResult ¶ added in v0.6.0
type ContactsGetStatusesResult struct {
Count int `json:"count"`
Statuses []ContactStatusItem `json:"statuses"`
Output string `json:"output"`
}
ContactsGetStatusesResult is the output of tg_contacts_get_statuses.
type ContactsListBlockedParams ¶ added in v0.6.0
type ContactsListBlockedParams struct {
Limit *int `json:"limit,omitempty" jsonschema:"Maximum results (default 100)"`
}
ContactsListBlockedParams defines parameters for tg_contacts_list_blocked.
type ContactsListBlockedResult ¶ added in v0.6.0
type ContactsListBlockedResult struct {
Count int `json:"count"`
HasMore bool `json:"hasMore"`
Users []UserItem `json:"users"`
Output string `json:"output"`
}
ContactsListBlockedResult is the output of tg_contacts_list_blocked.
type ContactsSearchParams ¶
type ContactsSearchParams struct {
Query string `json:"query" jsonschema:"Search query for contacts"`
Limit *int `json:"limit,omitempty" jsonschema:"Maximum number of results (default 50)"`
}
ContactsSearchParams defines the parameters for the tg_contacts_search tool.
type ContactsSearchResult ¶
type ContactsSearchResult struct {
Count int `json:"count"`
HasMore bool `json:"hasMore"`
Users []UserItem `json:"users"`
Output string `json:"output"`
}
ContactsSearchResult is the output of the tg_contacts_search tool.
type DialogItem ¶ added in v0.3.0
type DialogItem struct {
Peer string `json:"peer"`
Title string `json:"title"`
Username string `json:"username,omitempty"`
Type string `json:"type"`
UnreadCount int `json:"unreadCount,omitempty"`
}
DialogItem is a structured dialog entry for JSON results.
Peer is the bot-API numeric ID (signed: positive = user, negative = chat, -100xxx = channel), kept for backwards compatibility with the peer parameter every other tool accepts. Username is the @handle when the dialog is a public user/channel/supergroup — absent for private chats and basic groups. Type uses the same labels as ParticipantItem.Type / MessageItem.FromType so a consumer can pivot between the shapes uniformly.
type DialogsGetInfoParams ¶
type DialogsGetInfoParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
DialogsGetInfoParams defines the parameters for the tg_dialogs_get_info tool.
type DialogsGetInfoResult ¶
type DialogsGetInfoResult struct {
Title string `json:"title"`
Username string `json:"username"`
About string `json:"about"`
Type string `json:"type"`
Output string `json:"output"`
}
DialogsGetInfoResult is the output of the tg_dialogs_get_info tool.
type DialogsListParams ¶
type DialogsListParams struct {
Limit *int `json:"limit,omitempty" jsonschema:"Maximum number of dialogs to return (default 100)"`
OffsetDate *int `json:"offsetDate,omitempty" jsonschema:"Unix timestamp for pagination (pass last dialog date)"`
}
DialogsListParams defines the parameters for the tg_dialogs_list tool.
type DialogsListResult ¶
type DialogsListResult struct {
Count int `json:"count"`
HasMore bool `json:"hasMore"`
Dialogs []DialogItem `json:"dialogs"`
Output string `json:"output"`
}
DialogsListResult is the output of the tg_dialogs_list tool.
type DialogsMarkUnreadParams ¶ added in v0.6.0
type DialogsMarkUnreadParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Unread bool `json:"unread" jsonschema:"true to mark unread, false to mark read"`
}
DialogsMarkUnreadParams defines parameters for tg_dialogs_mark_unread.
type DialogsMarkUnreadResult ¶ added in v0.6.0
type DialogsMarkUnreadResult struct {
Output string `json:"output"`
}
DialogsMarkUnreadResult is the output of tg_dialogs_mark_unread.
type DialogsPinParams ¶ added in v0.6.0
type DialogsPinParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Pinned bool `json:"pinned" jsonschema:"true to pin, false to unpin"`
}
DialogsPinParams defines parameters for tg_dialogs_pin.
type DialogsPinResult ¶ added in v0.6.0
type DialogsPinResult struct {
Output string `json:"output"`
}
DialogsPinResult is the output of tg_dialogs_pin.
type DialogsSearchParams ¶
type DialogsSearchParams struct {
Query string `json:"query" jsonschema:"Search query"`
}
DialogsSearchParams defines the parameters for the tg_dialogs_search tool.
type DialogsSearchResult ¶
type DialogsSearchResult struct {
Count int `json:"count"`
Dialogs []DialogItem `json:"dialogs"`
Output string `json:"output"`
}
DialogsSearchResult is the output of the tg_dialogs_search tool.
type DraftsClearParams ¶
type DraftsClearParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
DraftsClearParams defines the parameters for the tg_drafts_clear tool.
type DraftsClearResult ¶
DraftsClearResult is the output of the tg_drafts_clear tool.
type DraftsSetParams ¶
type DraftsSetParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Text string `json:"text" jsonschema:"Draft message text"`
ReplyTo *int `json:"replyTo,omitempty" jsonschema:"Message ID to reply to"`
}
DraftsSetParams defines the parameters for the tg_drafts_set tool.
type DraftsSetResult ¶
DraftsSetResult is the output of the tg_drafts_set tool.
type FolderItem ¶ added in v0.3.0
type FolderItem struct {
ID int `json:"id"`
Title string `json:"title"`
Peers int `json:"peerCount"`
}
FolderItem is a structured folder entry for JSON results.
type FoldersCreateParams ¶
type FoldersCreateParams struct {
Title string `json:"title" jsonschema:"Title for the new folder"`
Peers []string `json:"peers,omitempty" jsonschema:"Chats: @usernames or numeric IDs"`
}
FoldersCreateParams defines the parameters for the tg_folders_create tool.
type FoldersCreateResult ¶
type FoldersCreateResult struct {
FolderID int `json:"folderId"`
Title string `json:"title"`
Output string `json:"output"`
}
FoldersCreateResult is the output of the tg_folders_create tool.
type FoldersDeleteParams ¶
type FoldersDeleteParams struct {
FolderID int `json:"folderId" jsonschema:"ID of the folder to delete"`
}
FoldersDeleteParams defines the parameters for the tg_folders_delete tool.
type FoldersDeleteResult ¶
FoldersDeleteResult is the output of the tg_folders_delete tool.
type FoldersEditParams ¶
type FoldersEditParams struct {
FolderID int `json:"folderId" jsonschema:"ID of the folder to edit"`
Title string `json:"title" jsonschema:"New title for the folder"`
Peers []string `json:"peers,omitempty" jsonschema:"Chats: @usernames or numeric IDs"`
}
FoldersEditParams defines the parameters for the tg_folders_edit tool.
type FoldersEditResult ¶
type FoldersEditResult struct {
FolderID int `json:"folderId"`
Title string `json:"title"`
Output string `json:"output"`
}
FoldersEditResult is the output of the tg_folders_edit tool.
type FoldersListParams ¶
type FoldersListParams struct{}
FoldersListParams defines the parameters for the tg_folders_list tool.
type FoldersListResult ¶
type FoldersListResult struct {
Count int `json:"count"`
Folders []FolderItem `json:"folders"`
Output string `json:"output"`
}
FoldersListResult is the output of the tg_folders_list tool.
type GroupsAdminSetParams ¶ added in v0.6.0
type GroupsAdminSetParams struct {
Group string `json:"group" jsonschema:"@username, t.me/ link, or numeric ID"`
User string `json:"user" jsonschema:"User ID or @username"`
Rank *string `json:"rank,omitempty" jsonschema:"Admin title/rank"`
ChangeInfo *bool `json:"changeInfo,omitempty" jsonschema:"Allow changing group info"`
PostMessages *bool `json:"postMessages,omitempty" jsonschema:"Allow posting in channels"`
EditMessages *bool `json:"editMessages,omitempty" jsonschema:"Allow editing others messages"`
DeleteMsgs *bool `json:"deleteMessages,omitempty" jsonschema:"Allow deleting messages"`
BanUsers *bool `json:"banUsers,omitempty" jsonschema:"Allow banning users"`
InviteUsers *bool `json:"inviteUsers,omitempty" jsonschema:"Allow inviting users"`
PinMessages *bool `json:"pinMessages,omitempty" jsonschema:"Allow pinning messages"`
ManageCall *bool `json:"manageCall,omitempty" jsonschema:"Allow managing calls"`
AddAdmins *bool `json:"addAdmins,omitempty" jsonschema:"Allow adding admins"`
ManageTopics *bool `json:"manageTopics,omitempty" jsonschema:"Allow managing topics"`
}
GroupsAdminSetParams defines parameters for tg_groups_admin_set.
type GroupsAdminSetResult ¶ added in v0.6.0
type GroupsAdminSetResult struct {
Output string `json:"output"`
}
GroupsAdminSetResult is the output of tg_groups_admin_set.
type GroupsInfoParams ¶
type GroupsInfoParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
GroupsInfoParams defines the parameters for the tg_groups_info tool.
type GroupsInfoResult ¶
type GroupsInfoResult struct {
Title string `json:"title"`
Username string `json:"username"`
About string `json:"about"`
MembersCount int `json:"membersCount"`
IsChannel bool `json:"isChannel"`
IsSupergroup bool `json:"isSupergroup"`
IsForum bool `json:"isForum"`
Output string `json:"output"`
}
GroupsInfoResult is the output of the tg_groups_info tool.
type GroupsInviteLinkGetParams ¶
type GroupsInviteLinkGetParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
GroupsInviteLinkGetParams defines the parameters for the tg_groups_invite_link_get tool.
type GroupsInviteLinkGetResult ¶
GroupsInviteLinkGetResult is the output of the tg_groups_invite_link_get tool.
type GroupsInviteLinkRevokeParams ¶
type GroupsInviteLinkRevokeParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Link string `json:"link" jsonschema:"Invite link to revoke"`
}
GroupsInviteLinkRevokeParams defines the parameters for the tg_groups_invite_link_revoke tool.
type GroupsInviteLinkRevokeResult ¶
type GroupsInviteLinkRevokeResult struct {
Peer string `json:"peer"`
Output string `json:"output"`
}
GroupsInviteLinkRevokeResult is the output of the tg_groups_invite_link_revoke tool.
type GroupsJoinParams ¶
type GroupsJoinParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
GroupsJoinParams defines the parameters for the tg_groups_join tool.
type GroupsJoinResult ¶
type GroupsJoinResult struct {
Output string `json:"output"`
}
GroupsJoinResult is the output of the tg_groups_join tool.
type GroupsLeaveParams ¶
type GroupsLeaveParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
GroupsLeaveParams defines the parameters for the tg_groups_leave tool.
type GroupsLeaveResult ¶
type GroupsLeaveResult struct {
Peer string `json:"peer"`
Success bool `json:"success"`
Output string `json:"output"`
}
GroupsLeaveResult is the output of the tg_groups_leave tool.
type GroupsListParams ¶
type GroupsListParams struct {
Limit *int `json:"limit,omitempty" jsonschema:"Maximum number of groups to return (default 100)"`
}
GroupsListParams defines the parameters for the tg_groups_list tool.
type GroupsListResult ¶
type GroupsListResult struct {
Count int `json:"count"`
HasMore bool `json:"hasMore"`
Groups []DialogItem `json:"groups"`
Output string `json:"output"`
}
GroupsListResult is the output of the tg_groups_list tool.
type GroupsMembersAddParams ¶
type GroupsMembersAddParams struct {
Group string `json:"group" jsonschema:"@username, t.me/ link, or numeric ID"`
User string `json:"user" jsonschema:"User ID or @username to add"`
}
GroupsMembersAddParams defines the parameters for the tg_groups_members_add tool.
type GroupsMembersAddResult ¶
type GroupsMembersAddResult struct {
Group string `json:"group"`
User string `json:"user"`
Output string `json:"output"`
}
GroupsMembersAddResult is the output of the tg_groups_members_add tool.
type GroupsMembersListParams ¶ added in v0.6.0
type GroupsMembersListParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Filter *string `json:"filter,omitempty" jsonschema:"recent, admins, banned, bots, or search query"`
Limit *int `json:"limit,omitempty" jsonschema:"Maximum results (default 100)"`
}
GroupsMembersListParams defines parameters for tg_groups_members_list.
type GroupsMembersListResult ¶ added in v0.6.0
type GroupsMembersListResult struct {
Count int `json:"count"`
HasMore bool `json:"hasMore"`
Users []UserItem `json:"users"`
Output string `json:"output"`
}
GroupsMembersListResult is the output of tg_groups_members_list.
type GroupsMembersRemoveParams ¶
type GroupsMembersRemoveParams struct {
Group string `json:"group" jsonschema:"@username, t.me/ link, or numeric ID"`
User string `json:"user" jsonschema:"User ID or @username to remove"`
}
GroupsMembersRemoveParams defines the parameters for the tg_groups_members_remove tool.
type GroupsMembersRemoveResult ¶
type GroupsMembersRemoveResult struct {
Output string `json:"output"`
}
GroupsMembersRemoveResult is the output of the tg_groups_members_remove tool.
type GroupsRenameParams ¶
type GroupsRenameParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Title string `json:"title" jsonschema:"New group title"`
}
GroupsRenameParams defines the parameters for the tg_groups_rename tool.
type GroupsRenameResult ¶
type GroupsRenameResult struct {
Peer string `json:"peer"`
OldTitle string `json:"oldTitle"`
NewTitle string `json:"newTitle"`
Output string `json:"output"`
}
GroupsRenameResult is the output of the tg_groups_rename tool.
type GroupsSlowmodeParams ¶ added in v0.6.0
type GroupsSlowmodeParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Seconds int `json:"seconds" jsonschema:"Slowmode delay in seconds (0 to disable)"`
}
GroupsSlowmodeParams defines parameters for tg_groups_slowmode.
type GroupsSlowmodeResult ¶ added in v0.6.0
type GroupsSlowmodeResult struct {
Output string `json:"output"`
}
GroupsSlowmodeResult is the output of tg_groups_slowmode.
type MediaDownloadParams ¶
type MediaDownloadParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
MessageID int `json:"messageId" jsonschema:"Message ID containing the media"`
OutputDir *string `json:"outputDir,omitempty" jsonschema:"Directory to save the downloaded file"`
}
MediaDownloadParams defines the parameters for the tg_media_download tool.
type MediaDownloadResult ¶
MediaDownloadResult is the output of the tg_media_download tool.
type MediaSendAlbumParams ¶
type MediaSendAlbumParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Paths []string `json:"paths" jsonschema:"Local file paths to send as album"`
Caption *string `json:"caption,omitempty" jsonschema:"Optional caption for the album"`
TopicID *int `json:"topicId,omitempty" jsonschema:"Forum topic ID to send into"`
ParseMode *string `json:"parseMode,omitempty" jsonschema:"Caption: '' plain; 'commonmark'/'markdown' subset"`
Silent *bool `json:"silent,omitempty" jsonschema:"Send without notification sound"`
ScheduleDate *int `json:"scheduleDate,omitempty" jsonschema:"Unix timestamp for scheduled delivery"`
}
MediaSendAlbumParams defines the parameters for the tg_media_send_album tool.
type MediaSendAlbumResult ¶
MediaSendAlbumResult is the output of the tg_media_send_album tool.
type MediaUploadParams ¶
type MediaUploadParams struct {
Path string `json:"path" jsonschema:"Local file path to upload"`
}
MediaUploadParams defines the parameters for the tg_media_upload tool.
type MediaUploadResult ¶
type MediaUploadResult struct {
Name string `json:"name"`
Size int64 `json:"size"`
Output string `json:"output"`
}
MediaUploadResult is the output of the tg_media_upload tool.
type MessageItem ¶ added in v0.3.0
type MessageItem struct {
ID int `json:"id"`
PeerID telegram.InputPeer `json:"peerId,omitzero"`
Date int `json:"date"`
Text string `json:"text"`
FromID int64 `json:"fromId"`
FromType string `json:"fromType,omitempty"`
FromName string `json:"fromName,omitempty"`
FromUsername string `json:"fromUsername,omitempty"`
TopicID int `json:"topicId,omitempty"`
MediaType string `json:"mediaType,omitempty"`
Entities []telegram.Entity `json:"entities,omitempty"`
ReplyTo *telegram.ReplyToInfo `json:"replyTo,omitempty"`
ReplyToMessage *ReplyToMessage `json:"replyToMessage,omitempty"`
Forward *telegram.ForwardInfo `json:"forward,omitempty"`
}
MessageItem is a structured message entry for JSON results.
FromType disambiguates the FromID peer kind ("user" / "group" / "channel"). The mapping mirrors MTProto's PeerClass: PeerUser → "user", PeerChat → "group" (legacy basic groups only), PeerChannel → "channel" (which covers both broadcast channels AND supergroups — gotd represents supergroups as PeerChannel). Knowing the kind lets a caller pick the right deep-link form instead of guessing — channel-on-behalf-of posts and anonymous channel posts would otherwise look indistinguishable from regular user senders. PeerID identifies the host peer (chat / channel / user) that contains the message. Carried in every MessageItem so a consumer of tg_messages_search_global — where results span arbitrary peers — can attribute each result to its source without an extra resolution call. The embedded InputPeer's AccessHash is omitted when zero (a zero hash looks valid to MTProto but raises PEER_ID_INVALID on round-trip; see the InputPeer godoc).
PeerID uses json:"peerId,omitzero" — when the upstream MTProto response carried no peer (e.g. tg.UpdateShortSentMessage from SendMessage, which only returns ID + Date), the field disappears from JSON rather than serializing a fake {type:0, id:0} that downstream code might misread as a real PeerUser ID 0. omitempty has no effect on nested structs in Go's encoding/json; omitzero (Go 1.24+) is what actually omits an all-zero InputPeer.
type MessagesClearAllDraftsParams ¶ added in v0.6.0
type MessagesClearAllDraftsParams struct{}
MessagesClearAllDraftsParams defines parameters for tg_messages_clear_all_drafts.
type MessagesClearAllDraftsResult ¶ added in v0.6.0
type MessagesClearAllDraftsResult struct {
Cleared bool `json:"cleared"`
Output string `json:"output"`
}
MessagesClearAllDraftsResult is the output of tg_messages_clear_all_drafts.
type MessagesContextParams ¶
type MessagesContextParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
MessageID int `json:"messageId" jsonschema:"Message ID to get context around"`
Radius *int `json:"radius,omitempty" jsonschema:"Number of messages before and after (default 10)"`
ResolveReplies *bool `json:"resolveReplies,omitempty" jsonschema:"Fetch parent message text for replies (default false, extra API call)"`
}
MessagesContextParams defines the parameters for the tg_messages_context tool.
type MessagesContextResult ¶
type MessagesContextResult struct {
Count int `json:"count"`
Participants []ParticipantItem `json:"participants,omitempty"`
Messages []MessageItem `json:"messages"`
Output string `json:"output"`
}
MessagesContextResult is the output of the tg_messages_context tool.
type MessagesDeleteHistoryParams ¶ added in v0.6.0
type MessagesDeleteHistoryParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Revoke *bool `json:"revoke,omitempty" jsonschema:"Delete for both sides (default false)"`
}
MessagesDeleteHistoryParams defines parameters for tg_messages_delete_history.
type MessagesDeleteHistoryResult ¶ added in v0.6.0
type MessagesDeleteHistoryResult struct {
Output string `json:"output"`
}
MessagesDeleteHistoryResult is the output of tg_messages_delete_history.
type MessagesDeleteParams ¶
type MessagesDeleteParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
IDs []int `json:"ids" jsonschema:"Message IDs to delete"`
Revoke *bool `json:"revoke,omitempty" jsonschema:"Delete for everyone (default true)"`
}
MessagesDeleteParams defines the parameters for the tg_messages_delete tool.
type MessagesDeleteResult ¶
MessagesDeleteResult is the output of the tg_messages_delete tool.
type MessagesEditParams ¶
type MessagesEditParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
MessageID int `json:"messageId" jsonschema:"ID of the message to edit"`
Text string `json:"text" jsonschema:"New message text"`
ParseMode *string `json:"parseMode,omitempty" jsonschema:"'' plain; 'commonmark' (CommonMark subset, see README); 'markdown' alias"`
}
MessagesEditParams defines the parameters for the tg_messages_edit tool.
type MessagesEditResult ¶
MessagesEditResult is the output of the tg_messages_edit tool.
type MessagesForwardParams ¶
type MessagesForwardParams struct {
FromPeer string `json:"fromPeer" jsonschema:"Source: @username, t.me/ link, or numeric ID"`
ToPeer string `json:"toPeer" jsonschema:"Destination: @username, t.me/ link, or numeric ID"`
IDs []int `json:"ids" jsonschema:"Message IDs to forward"`
}
MessagesForwardParams defines the parameters for the tg_messages_forward tool.
type MessagesForwardResult ¶
type MessagesForwardResult struct {
Forwarded int `json:"forwarded"`
Messages []MessageItem `json:"messages"`
Output string `json:"output"`
}
MessagesForwardResult is the output of the tg_messages_forward tool.
type MessagesGetParams ¶
type MessagesGetParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
IDs []int `json:"ids" jsonschema:"Message IDs to retrieve"`
ResolveReplies *bool `json:"resolveReplies,omitempty" jsonschema:"Fetch parent message text for replies (default false, extra API call)"`
}
MessagesGetParams defines the parameters for the tg_messages_get tool.
type MessagesGetReactionsParams ¶ added in v0.6.0
type MessagesGetReactionsParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
MessageID int `json:"messageId" jsonschema:"Message ID to get reactions for"`
Limit *int `json:"limit,omitempty" jsonschema:"Maximum results (default 100)"`
}
MessagesGetReactionsParams defines parameters for tg_messages_get_reactions.
type MessagesGetReactionsResult ¶ added in v0.6.0
type MessagesGetReactionsResult struct {
Count int `json:"count"`
HasMore bool `json:"hasMore"`
Reactions []ReactionUserItem `json:"reactions"`
Output string `json:"output"`
}
MessagesGetReactionsResult is the output of tg_messages_get_reactions.
type MessagesGetResult ¶
type MessagesGetResult struct {
Count int `json:"count"`
Participants []ParticipantItem `json:"participants,omitempty"`
Messages []MessageItem `json:"messages"`
Output string `json:"output"`
}
MessagesGetResult is the output of the tg_messages_get tool.
type MessagesGetScheduledParams ¶ added in v0.6.0
type MessagesGetScheduledParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
}
MessagesGetScheduledParams defines parameters for tg_messages_get_scheduled.
type MessagesGetScheduledResult ¶ added in v0.6.0
type MessagesGetScheduledResult struct {
Count int `json:"count"`
Messages []MessageItem `json:"messages"`
Output string `json:"output"`
}
MessagesGetScheduledResult is the output of tg_messages_get_scheduled.
type MessagesListParams ¶
type MessagesListParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
TopicID *int `json:"topicId,omitempty" jsonschema:"Forum topic ID to filter messages"`
Limit *int `json:"limit,omitempty" jsonschema:"Max messages to return (default 100)"`
OffsetID *int `json:"offsetId,omitempty" jsonschema:"Message ID to start from"`
ResolveReplies *bool `json:"resolveReplies,omitempty" jsonschema:"Fetch parent message text for replies (default false, extra API call)"`
}
MessagesListParams defines the parameters for the tg_messages_list tool.
type MessagesListResult ¶
type MessagesListResult struct {
Count int `json:"count"`
Total int `json:"total"`
HasMore bool `json:"hasMore"`
Participants []ParticipantItem `json:"participants,omitempty"`
Messages []MessageItem `json:"messages"`
Output string `json:"output"`
}
MessagesListResult is the output of the tg_messages_list tool.
type MessagesMarkReadParams ¶
type MessagesMarkReadParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
MaxID int `json:"maxId" jsonschema:"Mark all messages up to this ID as read"`
}
MessagesMarkReadParams defines the parameters for the tg_messages_mark_read tool.
type MessagesMarkReadResult ¶
type MessagesMarkReadResult struct {
Output string `json:"output"`
}
MessagesMarkReadResult is the output of the tg_messages_mark_read tool.
type MessagesPinParams ¶
type MessagesPinParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
MessageID int `json:"messageId" jsonschema:"ID of the message to pin/unpin"`
Unpin *bool `json:"unpin,omitempty" jsonschema:"Set to true to unpin instead of pin"`
}
MessagesPinParams defines the parameters for the tg_messages_pin tool.
type MessagesPinResult ¶
type MessagesPinResult struct {
Output string `json:"output"`
}
MessagesPinResult is the output of the tg_messages_pin tool.
type MessagesReactParams ¶
type MessagesReactParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
MessageID int `json:"messageId" jsonschema:"ID of the message to react to"`
Emoji string `json:"emoji" jsonschema:"Reaction emoji (e.g. 👍)"`
Remove *bool `json:"remove,omitempty" jsonschema:"Remove reaction instead of adding"`
}
MessagesReactParams defines the parameters for the tg_messages_react tool.
type MessagesReactResult ¶
type MessagesReactResult struct {
Output string `json:"output"`
}
MessagesReactResult is the output of the tg_messages_react tool.
type MessagesSearchGlobalParams ¶ added in v0.6.0
type MessagesSearchGlobalParams struct {
Query string `json:"query" jsonschema:"Search query"`
Limit *int `json:"limit,omitempty" jsonschema:"Maximum results (default 100)"`
}
MessagesSearchGlobalParams defines parameters for tg_messages_search_global.
Note: resolveReplies is intentionally not offered here. Global search returns messages from arbitrary peers, each needing its own access hash to fetch the parent; a single batched lookup is not possible. Structural replyTo metadata is still populated.
type MessagesSearchGlobalResult ¶ added in v0.6.0
type MessagesSearchGlobalResult struct {
Count int `json:"count"`
HasMore bool `json:"hasMore"`
Messages []MessageItem `json:"messages"`
Output string `json:"output"`
}
MessagesSearchGlobalResult is the output of tg_messages_search_global.
type MessagesSearchParams ¶
type MessagesSearchParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Query string `json:"query" jsonschema:"Search query"`
Limit *int `json:"limit,omitempty" jsonschema:"Max results (default 100)"`
OffsetID *int `json:"offsetId,omitempty" jsonschema:"Message ID to start search from (for pagination)"`
ResolveReplies *bool `json:"resolveReplies,omitempty" jsonschema:"Fetch parent message text for replies (default false, extra API call)"`
}
MessagesSearchParams defines the parameters for the tg_messages_search tool.
type MessagesSearchResult ¶
type MessagesSearchResult struct {
Count int `json:"count"`
HasMore bool `json:"hasMore"`
Participants []ParticipantItem `json:"participants,omitempty"`
Messages []MessageItem `json:"messages"`
Output string `json:"output"`
}
MessagesSearchResult is the output of the tg_messages_search tool.
type MessagesSendFileParams ¶
type MessagesSendFileParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Path string `json:"path" jsonschema:"Local file path to send"`
Caption *string `json:"caption,omitempty" jsonschema:"Optional caption for the file"`
TopicID *int `json:"topicId,omitempty" jsonschema:"Forum topic ID to send into"`
ParseMode *string `json:"parseMode,omitempty" jsonschema:"Caption format: '' plain; 'commonmark'/'markdown' (subset, see README)"`
Silent *bool `json:"silent,omitempty" jsonschema:"Send without notification sound"`
ScheduleDate *int `json:"scheduleDate,omitempty" jsonschema:"Unix timestamp for scheduled delivery"`
}
MessagesSendFileParams defines the parameters for the tg_messages_send_file tool.
type MessagesSendFileResult ¶
type MessagesSendFileResult struct {
MessageID int `json:"messageId"`
Output string `json:"output"`
}
MessagesSendFileResult is the output of the tg_messages_send_file tool.
type MessagesSendParams ¶
type MessagesSendParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Text string `json:"text" jsonschema:"Message text to send"`
TopicID *int `json:"topicId,omitempty" jsonschema:"Forum topic ID to send into"`
ReplyTo *int `json:"replyTo,omitempty" jsonschema:"Message ID to reply to"`
ParseMode *string `json:"parseMode,omitempty" jsonschema:"'' plain; 'commonmark' (CommonMark subset, see README); 'markdown' alias"`
Silent *bool `json:"silent,omitempty" jsonschema:"Send without notification sound"`
NoWebpage *bool `json:"noWebpage,omitempty" jsonschema:"Disable link preview generation"`
ScheduleDate *int `json:"scheduleDate,omitempty" jsonschema:"Unix timestamp to schedule message for later delivery"`
}
MessagesSendParams defines the parameters for the tg_messages_send tool.
type MessagesSendResult ¶
MessagesSendResult is the output of the tg_messages_send tool.
type OnlineStatusSetParams ¶
type OnlineStatusSetParams struct {
Online bool `json:"online" jsonschema:"True to appear online, false to go offline"`
}
OnlineStatusSetParams defines the parameters for the tg_online_status_set tool.
type OnlineStatusSetResult ¶
OnlineStatusSetResult is the output of the tg_online_status_set tool.
type ParticipantItem ¶ added in v0.5.0
type ParticipantItem struct {
ID int64 `json:"id"`
Type string `json:"type"`
Name string `json:"name"`
Username string `json:"username,omitempty"`
}
ParticipantItem identifies every peer that appears as a sender or as the original author of a forwarded message in a returned batch.
Type follows the same mapping as MessageItem.FromType ("user" / "group" / "channel"; "channel" covers both broadcast channels and supergroups, "group" is only legacy basic groups). The Type field also disambiguates the ID space — without it a user with ID N and a channel with ID N would collide in the seen-set and silently merge into one entry.
type PeerRefItem ¶ added in v0.13.0
type PeerRefItem = ParticipantItem
PeerRefItem is the canonical {id, type, name, username} shape used for every peer JSON-rendered across the tool surface — sender, forward-author, participant, dialog, channel/group reference, reactor, contact. Tools that historically used ad-hoc shapes (DialogItem, UserItem, ReactionUserItem, etc.) are converging on this struct so a consumer can treat any peer uniformly.
type ProfileGetParams ¶
type ProfileGetParams struct{}
ProfileGetParams defines the parameters for the tg_profile_get tool.
type ProfileGetResult ¶
type ProfileGetResult struct {
UserID int64 `json:"userId"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Username string `json:"username"`
Phone string `json:"phone"`
Bio string `json:"bio"`
Output string `json:"output"`
}
ProfileGetResult is the output of the tg_profile_get tool.
type ProfileSetBioParams ¶
type ProfileSetBioParams struct {
Bio string `json:"bio" jsonschema:"New bio text (max 70 characters)"`
}
ProfileSetBioParams defines the parameters for the tg_profile_set_bio tool.
type ProfileSetBioResult ¶
ProfileSetBioResult is the output of the tg_profile_set_bio tool.
type ProfileSetNameParams ¶
type ProfileSetNameParams struct {
FirstName string `json:"firstName" jsonschema:"New first name"`
LastName string `json:"lastName" jsonschema:"New last name"`
}
ProfileSetNameParams defines the parameters for the tg_profile_set_name tool.
type ProfileSetNameResult ¶
type ProfileSetNameResult struct {
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Output string `json:"output"`
}
ProfileSetNameResult is the output of the tg_profile_set_name tool.
type ProfileSetPhotoParams ¶
type ProfileSetPhotoParams struct {
Path string `json:"path" jsonschema:"Local file path of the new profile photo"`
}
ProfileSetPhotoParams defines the parameters for the tg_profile_set_photo tool.
type ProfileSetPhotoResult ¶
type ProfileSetPhotoResult struct {
Output string `json:"output"`
}
ProfileSetPhotoResult is the output of the tg_profile_set_photo tool.
type ReactionUserItem ¶ added in v0.6.0
type ReactionUserItem struct {
UserID int64 `json:"userId"`
Name string `json:"name,omitempty"`
Username string `json:"username,omitempty"`
Emoji string `json:"emoji"`
}
ReactionUserItem is a structured reaction entry for JSON results.
Name and Username mirror the shape used by every other peer-bearing JSON entry (sender, forward-author, participant) so a consumer can render a reactor with the same "Display Name [@username]" identifier.
type ReplyToMessage ¶ added in v0.8.0
type ReplyToMessage struct {
FromName string `json:"fromName,omitempty"`
FromUsername string `json:"fromUsername,omitempty"`
Text string `json:"text,omitempty"`
}
ReplyToMessage carries minimal parent-message context used to help callers reconstruct thread structure when the parent is outside the returned batch.
type ServerVersionParams ¶ added in v0.11.0
type ServerVersionParams struct{}
ServerVersionParams takes no arguments — version metadata is fixed at build time and supplied by the handler factory.
type ServerVersionResult ¶ added in v0.11.0
type ServerVersionResult struct {
Version string `json:"version"`
Revision string `json:"revision"`
GoVersion string `json:"goVersion"`
Output string `json:"output"`
}
ServerVersionResult is the output of the tg_server_version tool.
type StickerSetItem ¶ added in v0.3.0
type StickerSetItem struct {
Name string `json:"name"`
Title string `json:"title"`
Count int `json:"count"`
}
StickerSetItem is a structured sticker set entry for JSON results.
type StickersGetSetParams ¶
type StickersGetSetParams struct {
Name string `json:"name" jsonschema:"Short name of the sticker set"`
}
StickersGetSetParams defines the parameters for the tg_stickers_get_set tool.
type StickersGetSetResult ¶
type StickersGetSetResult struct {
Title string `json:"title"`
Count int `json:"count"`
Output string `json:"output"`
}
StickersGetSetResult is the output of the tg_stickers_get_set tool.
type StickersSearchParams ¶
type StickersSearchParams struct {
Query string `json:"query" jsonschema:"Search query for sticker sets"`
}
StickersSearchParams defines the parameters for the tg_stickers_search tool.
type StickersSearchResult ¶
type StickersSearchResult struct {
Count int `json:"count"`
Sets []StickerSetItem `json:"sets"`
Output string `json:"output"`
}
StickersSearchResult is the output of the tg_stickers_search tool.
type StickersSendParams ¶
type StickersSendParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
StickerFileID int64 `json:"stickerFileId" jsonschema:"File ID of the sticker to send"`
}
StickersSendParams defines the parameters for the tg_stickers_send tool.
type StickersSendResult ¶
StickersSendResult is the output of the tg_stickers_send tool.
type TopicsCreateParams ¶ added in v0.6.0
type TopicsCreateParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Title string `json:"title" jsonschema:"Topic title"`
}
TopicsCreateParams defines parameters for tg_topics_create.
type TopicsCreateResult ¶ added in v0.6.0
type TopicsCreateResult struct {
TopicID int `json:"topicId"`
Title string `json:"title"`
Output string `json:"output"`
}
TopicsCreateResult is the output of tg_topics_create.
type TopicsEditParams ¶ added in v0.6.0
type TopicsEditParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
TopicID int `json:"topicId" jsonschema:"Topic ID to edit"`
Title string `json:"title" jsonschema:"New topic title"`
}
TopicsEditParams defines parameters for tg_topics_edit.
type TopicsEditResult ¶ added in v0.6.0
type TopicsEditResult struct {
Output string `json:"output"`
}
TopicsEditResult is the output of tg_topics_edit.
type TopicsListParams ¶
type TopicsListParams struct {
Peer string `json:"peer" jsonschema:"Forum supergroup ID or @username"`
Limit *int `json:"limit,omitempty" jsonschema:"Maximum number of topics to return"`
Query *string `json:"query,omitempty" jsonschema:"Optional text to filter topics by title"`
}
TopicsListParams defines the parameters for the tg_topics_list tool.
type TopicsListResult ¶
type TopicsListResult struct {
Count int `json:"count"`
HasMore bool `json:"hasMore"`
Topics []TopicItem `json:"topics"`
Output string `json:"output"`
}
TopicsListResult is the output of the tg_topics_list tool.
type TopicsSearchParams ¶
type TopicsSearchParams struct {
Peer string `json:"peer" jsonschema:"Forum supergroup ID or @username"`
Query string `json:"query" jsonschema:"Search query to filter topics by title"`
}
TopicsSearchParams defines the parameters for the tg_topics_search tool.
type TopicsSearchResult ¶
type TopicsSearchResult struct {
Count int `json:"count"`
Topics []TopicItem `json:"topics"`
Output string `json:"output"`
}
TopicsSearchResult is the output of the tg_topics_search tool.
type TypingSendParams ¶
type TypingSendParams struct {
Peer string `json:"peer" jsonschema:"@username, t.me/ link, or numeric ID"`
Action *string `json:"action,omitempty" jsonschema:"Typing action type (default typing)"`
}
TypingSendParams defines the parameters for the tg_typing_send tool.
type TypingSendResult ¶
type TypingSendResult struct {
Output string `json:"output"`
}
TypingSendResult is the output of the tg_typing_send tool.
type UserItem ¶ added in v0.3.0
type UserItem struct {
ID int64 `json:"id"`
FirstName string `json:"firstName"`
LastName string `json:"lastName,omitempty"`
Username string `json:"username,omitempty"`
}
UserItem is a structured user entry for JSON results.
type UsersBlockParams ¶
type UsersBlockParams struct {
Peer string `json:"peer" jsonschema:"User ID or @username"`
Block bool `json:"block" jsonschema:"True to block, false to unblock"`
}
UsersBlockParams defines the parameters for the tg_users_block tool.
type UsersBlockResult ¶
type UsersBlockResult struct {
Output string `json:"output"`
}
UsersBlockResult is the output of the tg_users_block tool.
type UsersCommonChatsParams ¶
type UsersCommonChatsParams struct {
Peer string `json:"peer" jsonschema:"User ID or @username"`
}
UsersCommonChatsParams defines the parameters for the tg_users_get_common_chats tool.
type UsersCommonChatsResult ¶
type UsersCommonChatsResult struct {
Count int `json:"count"`
Chats []PeerRefItem `json:"chats"`
Output string `json:"output"`
}
UsersCommonChatsResult is the output of the tg_users_get_common_chats tool.
Chats carries one PeerRefItem per shared chat with {id, type, name, username}, same shape every other peer-listing tool exposes, so a caller doesn't need to regex-parse Output.
type UsersGetParams ¶
type UsersGetParams struct {
Peer string `json:"peer" jsonschema:"@username (preferred) or numeric user ID"`
}
UsersGetParams defines the parameters for the tg_users_get tool.
type UsersGetResult ¶
type UsersGetResult struct {
UserID int64 `json:"userId"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
Username string `json:"username"`
Bot bool `json:"bot"`
Bio string `json:"bio"`
Online bool `json:"online"`
Output string `json:"output"`
}
UsersGetResult is the output of the tg_users_get tool.
type UsersPhotosParams ¶
type UsersPhotosParams struct {
Peer string `json:"peer" jsonschema:"User ID or @username"`
Limit *int `json:"limit,omitempty" jsonschema:"Maximum number of photos to return (default 10)"`
}
UsersPhotosParams defines the parameters for the tg_users_get_photos tool.
Source Files
¶
- annotations.go
- chats_admins.go
- chats_create.go
- chats_manage.go
- chats_permissions.go
- chats_settings.go
- contacts_add.go
- contacts_delete.go
- contacts_get.go
- contacts_get_statuses.go
- contacts_list_blocked.go
- contacts_search.go
- dialogs_get_info.go
- dialogs_list.go
- dialogs_mark_unread.go
- dialogs_pin.go
- dialogs_search.go
- drafts.go
- errors.go
- folders_list.go
- folders_manage.go
- format.go
- groups_admin_set.go
- groups_info.go
- groups_invite_link.go
- groups_join.go
- groups_leave.go
- groups_list.go
- groups_members.go
- groups_members_list.go
- groups_rename.go
- groups_slowmode.go
- helpers.go
- media_download.go
- media_send_album.go
- media_upload.go
- messages_clear_all_drafts.go
- messages_context.go
- messages_delete.go
- messages_delete_history.go
- messages_edit.go
- messages_forward.go
- messages_get.go
- messages_get_reactions.go
- messages_get_scheduled.go
- messages_list.go
- messages_mark_read.go
- messages_pin.go
- messages_react.go
- messages_search.go
- messages_search_global.go
- messages_send.go
- messages_send_file.go
- online_status.go
- profile_get.go
- profile_set.go
- progress.go
- register.go
- resolve_replies.go
- result_types.go
- roots.go
- server_version.go
- stickers_get_set.go
- stickers_search.go
- stickers_send.go
- topics_create.go
- topics_edit.go
- topics_list.go
- topics_search.go
- typing_send.go
- users_block.go
- users_common_chats.go
- users_get.go
- users_photos.go