Skip to main content
Glama
grammy-mcp
by louietyj

answerShippingQuery

Confirm or reject a Telegram shipping query by returning available shipping options or a user-facing error message.

Instructions

If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True 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": {
      "shipping_query_id": "<shipping_query_id>",
      "ok": "<ok>"
    },
    "name": "answerShippingQuery"
  }
}

Input Schema

NameRequiredDescriptionDefault
okYesPass True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
error_messageNoRequired if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. “Sorry, delivery to your desired address is unavailable”). Telegram will display this message to the user.
shipping_optionsNoRequired if ok is True. An Array of available shipping options.
shipping_query_idYesUnique identifier for the query to be answered

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already flag this as a non-read-only, open-world, non-destructive action, so safety framing is partly covered. The description adds only that True is returned on success; it omits that this is a required one-shot reply to an incoming update and says nothing about what happens if a query id is stale or already answered. Adequate but shallow given the annotations carry most of the burden.

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?

Three short sentences, front-loaded with the trigger scenario before the action statement. Nothing is redundant, though the invoice context sentence is longer than strictly needed to identify the tool.

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

Completeness3/5

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

For a four-parameter mutation with no output schema, the definition covers the trigger and the return value, and the schema covers parameter meaning. It leaves out timing/one-shot semantics and what the Bot API does with the answer, which an agent needs to avoid duplicate or missing replies.

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 each parameter carries its own description, including the ok/error_message and ok/shipping_options dependencies. The description adds no semantics beyond the schema, so the baseline of 3 applies.

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?

Uses a specific verb and resource ("reply to shipping queries") and explains the triggering condition (an invoice with is_flexible producing a shipping_query Update). It does not distinguish itself from look-alike siblings such as answerPreCheckoutQuery, so the agent must infer the boundary.

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?

The first sentence gives a clear precondition for invocation: the bot receives a shipping_query update after sending an invoice that requested a shipping address with is_flexible set. No exclusions or named alternatives are given, and it does not state that each query must be answered exactly once.

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