Skip to main content
Glama

Check a Bot API call

check_bot_api_call
Read-onlyIdempotent

Validate Telegram Bot API method calls against the official schema before running or shipping code; get errors and warnings for parameters, types, values, and retired fields.

Instructions

Check a Bot API request against the current official schema before running or shipping code.

Reports errors (unknown method or parameter with suggestions, missing required parameters, wrong types, values outside the documented list, a wrong type in union objects such as InputMedia) and warnings (lengths outside documented limits, parameters retired in an older Bot API version with the changelog entry that replaced them, numbers or booleans sent as strings). It does not call Telegram and cannot check permissions, chat state or file contents. Returns valid (true when there are no errors), errors and warnings as lists of {path, message} where path points into params (for example reply_markup.inline_keyboard[0][0].style), plus url, bot_api_version and freshness. An unknown method returns valid: false with suggestions. Use get_bot_api_definition to read the definitions it checks against.

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": {
      "method": "<method>",
      "params": "<params>"
    },
    "name": "check_bot_api_call"
  }
}

Input Schema

NameRequiredDescriptionDefault
methodYesBot API method name, e.g. 'sendMessage'.
paramsYesThe request parameters exactly as your code sends them, as a JSON object. Nested objects such as reply_markup may be objects or JSON strings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive/openWorld, and the description adds real value on top: it enumerates the error and warning classes produced (unknown method/parameter, missing required, wrong type, retired parameters with changelog entry, numbers as strings) and states explicitly that no network call is made so permissions and chat state are out of scope. The main omission is rate limits or performance characteristics, which is minor for a validator.

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?

Purpose and trigger come first, then the error taxonomy, then the negative scope, then the return shape and the sibling pointer — a logical front-loaded order. It is a single dense paragraph with no wasted sentences, though a couple of the parenthetical lists are long enough to warrant bullet-style separation.

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?

There is no output schema, so describing the return object (valid, errors, warnings, path, url, bot_api_version, freshness) was mandatory and is done thoroughly, including the edge case that an unknown method yields valid:false with suggestions. Nothing an agent needs in order to call it correctly 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.

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, and the description goes further by explaining that params must be 'the request parameters exactly as your code sends them' and that nested objects such as reply_markup may be objects or JSON strings. It also clarifies how the returned path indexes into params (e.g. reply_markup.inline_keyboard[0][0].style), giving the caller a mental model of the param tree.

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 description opens with a specific verb and resource — 'check a Bot API request against the current official schema' — and immediately circumscribes it ('does not call Telegram and cannot check permissions, chat state or file contents'). An agent can distinguish it from siblings like get_bot_api_definition or search_telegram_docs without opening a schema.

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

Usage Guidelines4/5

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

It gives a clear trigger ('before running or shipping code') and names the companion tool get_bot_api_definition for reading the definitions being checked. It does not spell out an explicit 'use X instead when…' exclusion for the other siblings, but the scope statement about not calling Telegram effectively rules out runtime use cases.

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