Skip to main content
Glama
prem-research

Telegram MCP Server

get_entity_by_id

Retrieve Telegram user or chat details by providing their unique identifier to access profile information within the current session.

Instructions

Get an entity from the current session

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo

Implementation Reference

  • Registers the 'get_entity_by_id' tool with the MCP server using the @mcp.tool decorator, specifying its name and description.
    @mcp.tool(name="get_entity_by_id", description="Get an entity from the current session")
  • The handler function for the 'get_entity_by_id' tool. It performs an HTTP GET request to retrieve the entity data by ID from the HTTP server and returns it as a dictionary.
    async def get_entity_by_id(id=int | str) -> dict:
        return get(f"{api_endpoint}get_entity/{id}").json()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a 'Get' operation but doesn't clarify if this is a read-only operation, what permissions are required, whether it's cached or real-time, what happens if the entity doesn't exist, or what format the response takes. The description provides minimal behavioral context beyond the basic action.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point. It's appropriately sized for a simple retrieval tool, though it could potentially benefit from slightly more detail given the lack of annotations and schema documentation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, 0% schema description coverage, and no output schema, the description is insufficient. It doesn't explain what constitutes an 'entity', what data is returned, error conditions, or how this differs from sibling tools. The description leaves too many open questions for effective tool selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage for its single 'id' parameter, and the tool description provides no information about what the 'id' parameter represents, its format, or where to obtain valid IDs. The description doesn't compensate for the complete lack of parameter documentation in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the action ('Get') and resource ('entity'), but lacks specificity about what an 'entity' represents in this context. It mentions 'from the current session' which provides some scope, but doesn't distinguish this tool from sibling tools like 'get_entities' or 'get_unread_entities' that likely retrieve similar data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives like 'get_entities' or 'get_unread_entities'. The phrase 'from the current session' implies some contextual limitation, but doesn't provide clear when/when-not criteria or mention sibling tools as alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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