Skip to main content
Glama
grammy-mcp
by louietyj

refundStarPayment

Destructive

Refunds a successful Telegram Stars payment by user ID and payment charge ID, enabling bot developers to reverse star transactions when needed.

Instructions

Refunds a successful payment in Telegram Stars.

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": {
      "user_id": "<user_id>",
      "telegram_payment_charge_id": "<telegram_payment_charge_id>"
    },
    "name": "refundStarPayment"
  }
}

Input Schema

NameRequiredDescriptionDefault
user_idYesIdentifier of the user whose payment will be refunded
telegram_payment_charge_idYesTelegram payment identifier

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the agent knows this mutates external financial state. The description adds the precondition that the payment must be successful, but omits irreversibility, whether the refund is full or partial, and what happens on failure.

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?

A single front-loaded sentence with no wasted words. It is efficient, though its brevity borders on under-specification for a destructive financial operation.

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 destructive, real-money mutation with no output schema, the definition leaves key call-time concerns unaddressed: whether the refund is complete, error conditions, and permission requirements. Annotations cover the safety profile and the schema covers both params, but the description is thinner than the operation's risk warrants.

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 description coverage is 100%, so both parameters are documented in structured fields and the description adds no syntax, format, or sourcing hints beyond them. Baseline 3 applies when the schema does the heavy lifting.

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 (refunds) and resource (a payment in Telegram Stars), plus a qualifying condition that only successful payments can be refunded. It does not, however, name or contrast itself with related siblings such as getStarTransactions or editUserStarSubscription.

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?

There is no explicit guidance on when to use this versus alternatives, and no stated prerequisites (bot must be the payment recipient, refund window limits). The phrase 'successful payment' is the only implicit scoping signal.

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

Deploy Server

Other Tools