Skip to main content
Glama
grammy-mcp
by louietyj

sendInvoice

Sends a Telegram payment invoice to a chat, collecting product details, prices, and currency so bot users can pay for goods or services directly in the conversation.

Instructions

Use this method to send invoices. On success, the sent Message is returned.

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": {
      "chat_id": "<chat_id>",
      "title": "<title>",
      "description": "<description>",
      "payload": "<payload>",
      "currency": "<currency>",
      "prices": "<prices>"
    },
    "name": "sendInvoice"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesProduct name, 1-32 characters
pricesYesPrice breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.)
chat_idYesUnique identifier for the target chat or username of the target bot, supergroup or channel in the format `@username`
payloadYesBot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.
currencyYesThree-letter ISO 4217 currency code, see more on currencies
need_nameNoPass True if you require the user's full name to complete the order. Ignored for payments in Telegram Stars.
photo_urlNoURL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for.
need_emailNoPass True if you require the user's email address to complete the order. Ignored for payments in Telegram Stars.
photo_sizeNoPhoto size in bytes
descriptionYesProduct description, 1-255 characters
is_flexibleNoPass True if the final price depends on the shipping method. Ignored for payments in Telegram Stars.
photo_widthNoPhoto width
photo_heightNoPhoto height
reply_markupNoAn object for an inline keyboard. If empty, one 'Pay total price' button will be shown. If not empty, the first button must be a Pay button.
provider_dataNoData about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider.
max_tip_amountNoThe maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a maximum tip of US$ 1.45 pass max_tip_amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). Defaults to 0. Not supported for payments in Telegram Stars.
provider_tokenNoPayment provider token, obtained via BotFather. Pass an empty string for payments in Telegram Stars.
protect_contentNoProtects the contents of the sent message from forwarding and saving
start_parameterNoUnique deep-linking parameter. If left empty, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. If non-empty, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter.
reply_parametersNoDescription of the message to reply to
message_effect_idNoUnique identifier of the message effect to be added to the message; for private chats only
message_thread_idNoUnique identifier for the target message thread (topic) of a forum; for forum supergroups and private chats of bots with forum topic mode enabled only
need_phone_numberNoPass True if you require the user's phone number to complete the order. Ignored for payments in Telegram Stars.
reply_to_message_idNoUse `reply_parameters` instead.
allow_paid_broadcastNoPass True to allow up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot's balance.
disable_notificationNoSends the message silently. Users will receive a notification with no sound.
need_shipping_addressNoPass True if you require the user's shipping address to complete the order. Ignored for payments in Telegram Stars.
suggested_tip_amountsNoAn Array of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount.
send_email_to_providerNoPass True if the user's email address should be sent to provider. Ignored for payments in Telegram Stars.
direct_messages_topic_idNoIdentifier of the direct messages topic to which the message will be sent; required if the message is sent to a direct messages chat
suggested_post_parametersNoAn object containing the parameters of the suggested post to send; for direct messages chats only. If the message is sent as a reply to another suggested post, then that suggested post is automatically declined.
send_phone_number_to_providerNoPass True if the user's phone number should be sent to provider. Ignored for payments in Telegram Stars.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true and destructiveHint=false, so the write/external-facing nature is covered structurally. The description only mentions that a Message is returned on success, omitting meaningful behavior: the invoice is publicly delivered to the target chat, payment-provider setup is required, and several parameters are silently ignored for Telegram Stars payments.

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?

Two short sentences, front-loaded with the action and its result, with no filler. It is efficient, though efficiency here comes at the cost of almost no substantive content.

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 32-parameter, nested-object payment tool with no output schema, the description is far too thin: it explains neither the payment flow, the Stars-vs-provider distinction, nor the consequences of the required payload/currency/prices combination. Only the return type is covered, which is the single thing it does address.

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% across all 32 parameters, including detailed semantics for prices, payload and provider_token, so the schema carries the load. The description adds no parameter meaning of its own, which is the baseline-3 case.

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?

The description states a specific verb and resource ('send invoices') and adds the success outcome ('the sent Message is returned'), so the action is unambiguous. It does not, however, distinguish this from the sibling createInvoiceLink, which an agent could easily confuse with actually delivering an invoice to a chat.

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 guidance on when to use this versus createInvoiceLink, nor any prerequisite information such as needing a provider_token from BotFather or the bot having payments enabled. The agent is left to infer that this actually delivers a payable invoice message into a chat.

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