Skip to main content
Glama
grammy-mcp
by louietyj

savePreparedKeyboardButton

Stores a keyboard button for a specific user to use within a Mini App, returning a PreparedKeyboardButton object. Use it to prepare request_users, request_chat, or request_managed_bot buttons.

Instructions

Stores a keyboard button that can be used by a user within a Mini App. Returns a PreparedKeyboardButton object.

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>",
      "button": "<button>"
    },
    "name": "savePreparedKeyboardButton"
  }
}

Input Schema

NameRequiredDescriptionDefault
buttonYesAn object describing the button to be saved. The button must be of the type request_users, request_chat, or request_managed_bot
user_idYesUnique identifier of the target user that can use the button

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=true, so the write/scope profile is covered structurally. The description usefully adds that a PreparedKeyboardButton object is returned (no output schema exists) and that the button is conceptually reusable by the user, but it says nothing about lifetime, expiry, or whether saving overwrites a previously saved button.

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, with no filler. The return-type sentence earns its place because no output schema exists.

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 mutation with full schema coverage and annotations covering the safety profile, the description supplies the essential missing piece: the return type. Remaining gaps (persistence semantics, how the prepared button is later consumed) are minor but keep it short of a 5.

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%, so both parameters are already documented, including the three allowed button types. The phrase 'used by a user within a Mini App' adds only marginal context about what user_id means in practice; baseline 3 is appropriate when the schema carries the detail.

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 concrete verb and resource ('Stores a keyboard button') plus a scope restriction ('used by a user within a Mini App'), which is clearer than the bare tool name. It does not differentiate from the similarly named sibling savePreparedInlineMessage, so an agent cannot tell from this text alone which of the two preparation tools to pick.

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?

The Mini App context implies when the tool is relevant, but there is no explicit when-to-use, when-not-to-use, or named alternative. An agent must infer that this is for persistent per-user button preparation rather than one-off inline message preparation.

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