Skip to main content
Glama

Bot API method or type definition

get_bot_api_definition
Read-onlyIdempotent

Retrieve a Telegram Bot API method or type definition as structured data to inspect parameters, fields, required values, limits, and changelog entries without reading the full API page.

Instructions

Return the current definition of one Bot API method or type as structured data.

Use it instead of reading the whole Bot API page when you need a method's parameters or a type's fields: each entry has its type, whether it is required, the description and any allowed values or length limits stated by Telegram, plus the changelog entries that mention it. For behaviour explained in prose elsewhere (formatting, payments, limits pages) use search_telegram_docs and get_telegram_document. Returns kind (method or type), name, url, description, then params (methods; with returns) or fields (types; or one_of for union types), plus changes, bot_api_version, source, checked_at and freshness. An unknown name returns kind: null with close-match suggestions. Built from the cached official page, refreshed when stale.

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": {
      "name": "<name>"
    },
    "name": "get_bot_api_definition"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesExact Bot API method or type name, e.g. 'sendMessage', 'InlineKeyboardButton', 'ReplyParameters'. Case-insensitive; close matches are suggested.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly, idempotent, non-destructive), and the description adds substantially beyond that: it discloses the cached/stale refresh model, the exact return envelope, and failure behavior for unknown names (kind null plus close-match suggestions). The case-insensitivity and suggestion fallback are behavioral traits an agent needs before calling.

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?

Front-loaded with purpose and the sibling routing before the long field inventory, and every sentence carries information. The return-field enumeration is dense and slightly list-like, but since no output schema exists it is not wasted.

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 must describe the return shape, and it does so completely: kind, name, url, description, params with returns, fields or one_of, changes, bot_api_version, source, checked_at, freshness, plus the null-kind edge case. Nothing an agent needs to call or interpret the result is missing.

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

Parameters3/5

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

Schema coverage is 100% and the parameter already documents exact-name matching, case-insensitivity and close-match suggestions, so the description's note about unknown names returning `kind: null` with suggestions largely restates the schema. The example names are useful but already present as schema examples, so this sits at the baseline where the schema does the heavy lifting.

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?

States a specific verb and resource ('Return the current definition of one Bot API method or type as structured data') and immediately distinguishes the scope from reading the whole Bot API page. An agent can tell it apart from the documentation siblings without opening any schema.

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?

Gives explicit when-to-use ('when you need a method's parameters or a type's fields') and explicit when-not-to-use, routing prose-covered topics (formatting, payments, limits) to `search_telegram_docs` and `get_telegram_document`. Both the alternative and the condition that selects it are named.

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