Skip to main content
Glama
prem-research

Telegram MCP Server

get_entity_by_id

Retrieve entity details from a Telegram session by specifying its ID to access relevant information for interaction and management within the platform.

Instructions

Get an entity from the current session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo

Implementation Reference

  • The handler function decorated with @mcp.tool, which registers and implements the get_entity_by_id tool. It performs an HTTP GET request to retrieve the entity by ID from the HTTP server endpoint.
    @mcp.tool(name="get_entity_by_id", description="Get an entity from the current session") async def get_entity_by_id(id=int | str) -> dict: return get(f"{api_endpoint}get_entity/{id}").json()
  • The @mcp.tool decorator registers the get_entity_by_id tool with the MCP server.
    @mcp.tool(name="get_entity_by_id", description="Get an entity from the current session")

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prem-research/telegram-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server