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
| Name | Required | Description | Default |
|---|---|---|---|
| id | No |
Implementation Reference
- mcp-server/mcp-server.py:41-43 (handler)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()
- mcp-server/mcp-server.py:41-41 (registration)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")