Skip to main content
Glama

Read an official documentation page

get_telegram_document
Read-onlyIdempotent

Reads a specific official Telegram, TON, or bot documentation page in character windows, so you can inspect requirements, parameters, and limits after a search finds the page.

Instructions

Read the text of an official Telegram, TON or bot-library documentation page, one window at a time.

Use it to read requirements, parameters and limits in full after search_telegram_docs found the page, or to load an entry page from list_telegram_sources into an empty cache. Do not use it to find which page answers a question: search first. Pages missing from the cache or older than the freshness limit (6 hours by default) are fetched first. Returns title, URL, Markdown body for the requested window, next_offset (null at the end), total_characters, content hash and freshness. If the live source fails, the cached text is returned with freshness.stale and refresh_error set. The observation date is when this installation read the page, not when Telegram changed it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "get_telegram_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesOfficial page URL from search results or list_telegram_sources, e.g. https://core.telegram.org/bots/api or https://docs.ton.org/applications/ton-connect/overview. Pages outside the official sources are rejected.
lengthNoNumber of characters to return.
offsetNoCharacter offset to start from; use a search result's document_offset or the previous next_offset.
refreshNoForce a live check of the source even if the cached copy is fresh.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.7.0
    • changedInput schema / properties / url / description
      Previous value: -"Official page URL from search results or telegram_sources, e.g. https://core.telegram.org/bots/api or https://docs.ton.org/applications/ton-connect/overview. Pages outside the official sources are rejected."New value: +"Official page URL from search results or list_telegram_sources, e.g. https://core.telegram.org/bots/api or https://docs.ton.org/applications/ton-connect/overview. Pages outside the official sources are rejected."
  2. Changed7 schema fields changedv0.6.1
    • addedInput schema / properties / length / description
      Added value: +"Number of characters to return."
    • addedInput schema / properties / length / maximum
      Added value: +40000
    • addedInput schema / properties / length / minimum
      Added value: +100
    • addedInput schema / properties / offset / description
      Added value: +"Character offset to start from; use a search result's document_offset or the previous next_offset."
    • addedInput schema / properties / offset / minimum
      Added value: +0
    • addedInput schema / properties / refresh / description
      Added value: +"Force a live check of the source even if the cached copy is fresh."
    • addedInput schema / properties / url / description
      Added value: +"Official page URL from search results or telegram_sources, e.g. https://core.telegram.org/bots/api or https://docs.ton.org/applications/ton-connect/overview. Pages outside the official sources are rejected."
  3. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond readOnly/idempotent annotations, it discloses cache-first fetching, the 6-hour default freshness limit, the failure fallback that returns cached text with `freshness.stale` and `refresh_error`, and that the observation date reflects local read time rather than upstream change time. These are non-obvious behaviors an agent must know to interpret results.

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

Conciseness5/5

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

Purpose is front-loaded in sentence one, followed by usage routing, then behavior, then return shape. No sentence is filler; the detail about the observation date is short and prevents a real misinterpretation.

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

Completeness5/5

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

With no output schema, the description responsibly enumerates the return payload (title, URL, body window, `next_offset`, `total_characters`, hash, freshness) and explains the degraded-cache path. Nothing material for correct invocation or result interpretation appears missing.

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

Parameters4/5

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

Schema coverage is 100%, so the per-field descriptions already carry the basics and the baseline is 3. The description adds value by framing the call as a windowed read and tying `next_offset` (null at the end) and `refresh` to the cache/freshness model, which the schema fields alone do not connect.

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

Purpose5/5

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

The first sentence names a specific verb (read) and resource (official Telegram/TON/bot-library documentation page) and immediately flags the paginated-window behavior. It is clearly separable from `search_telegram_docs` and `list_telegram_sources` because it is the only tool described as returning page text.

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

Usage Guidelines5/5

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

It gives explicit positive triggers (after `search_telegram_docs` found the page, or to warm an empty cache from `list_telegram_sources`) and an explicit exclusion ('Do not use it to find which page answers a question: search first'). The alternative tool is named with the condition that selects it.

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