Skip to main content
Glama
grammy-mcp
by louietyj

answerWebAppQuery

Sets the result of a Web App interaction and sends the corresponding message to the originating chat, returning a SentWebAppMessage on success.

Instructions

Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object 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": {
      "web_app_query_id": "<web_app_query_id>",
      "result": "<result>"
    },
    "name": "answerWebAppQuery"
  }
}

Input Schema

NameRequiredDescriptionDefault
resultYesAn object describing the message to be sent
web_app_query_idYesUnique identifier for the query to be answered

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true; the description adds genuinely new behavior — the message is sent on behalf of the user, is delivered to the chat the query came from, and a SentWebAppMessage is returned. It omits that the query is single-use and what happens on a stale/duplicate id, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, action first, return value second, with no filler or redundant restatement of the tool name.

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 two-parameter tool with full schema coverage, annotations, and a named return type, the description supplies what is needed to invoke it correctly. Only the one-shot nature of answering a Web App query is left unstated.

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 web_app_query_id and result are already documented, including the nested InlineQueryResult object. The description adds no constraint or format detail beyond the schema, so the baseline 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?

States a specific verb+resource: setting the result of a Web App interaction and sending a message back to the originating chat. This clearly distinguishes it from generic query-answering siblings like answerInlineQuery or answerCallbackQuery, since the Web App origin is named explicitly.

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 implied by the phrase 'interaction with a Web App' and the required web_app_query_id, but there is no explicit when-to-use vs. siblings, no note that the query must be answered only once, and no mention of expiry or prerequisites.

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