Skip to main content
Glama
Telegram Ads MCP

Telegram Ads MCP

Get advertising stats

tg_get_stats
Read-only

Retrieve account or per-ad Telegram Ads statistics for a specified time range. Returns totals plus derived CTR, CPM, and CPC, with an option to include raw interval series.

Instructions

Get account or per-ad statistics for a time range. from/to accept Unix seconds, milliseconds, or ISO 8601. interval is 86400 (daily, default) or 300 (5 minutes). Ranges above 1000 intervals are split automatically. Always returns totals and derived CTR/CPM/CPC; set include_series for the raw time series. Timestamps are inclusive for from and exclusive for to.

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": {
      "scope": "<scope>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "tg_get_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYes
fromYes
scopeYes
ad_idsNo
intervalNo
account_idNo
include_seriesNoInclude raw per-interval rows (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the readOnly/openWorld annotations, the description discloses genuinely useful behavior: automatic splitting of ranges above 1000 intervals, the always-present totals and derived CTR/CPM/CPC, and the inclusive-from/exclusive-to boundary. It does not mention rate limits, auth requirements, or the cost of large auto-split queries, which is why it falls short of 5.

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?

Five tight sentences, front-loaded with purpose and then ordered by parameter importance, with no filler. The density is high but readable; only the return-format and boundary sentences could plausibly be reordered for better flow.

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

Completeness4/5

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

For a 7-parameter tool with no output schema, the description explains both the input formats and the shape of the response (totals plus derived metrics, optional series), which is what an agent needs to call it correctly. The gap is the interaction between scope, account_id, and ad_ids, and the ad_ids maximum, none of which are explained anywhere.

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 only 14%, so the description carries real weight here: it specifies the three accepted timestamp formats for from/to, the two allowed interval values with 86400 as default, and the meaning of include_series. It leaves scope, ad_ids (including the 100-item cap), and account_id to the schema, which prevents a 5.

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

Purpose4/5

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

States a specific verb and resource ('Get account or per-ad statistics') with the time-range qualifier, so the agent knows exactly what data comes back and at what scoping level. It does not name a sibling such as tg_get_report to distinguish itself from other reporting tools, which keeps it short of a 5.

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

Usage Guidelines3/5

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

Usage is only implied: the scope enum alternatives and the interval choice suggest when to use daily vs 5-minute granularity, and include_series clarifies when to pull raw rows. There is no explicit when-to-use/when-not guidance or routing to alternative tools for aggregate reports, so the agent must infer the choice from parameters.

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