Skip to main content
Glama
grammy-mcp
by louietyj

sendMessageDraft

Stream a partial message to a private chat while the bot generates the full text. Use draft IDs to animate updates and optionally let users stop generation.

Instructions

Use this method to stream a partial message to a user while the message is being generated. Returns True on success.

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>",
      "draft_id": "<draft_id>",
      "text": "<text>"
    },
    "name": "sendMessageDraft"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText of the message to be sent, 1-4096 characters after entities parsing
chat_idYesUnique identifier for the target private chat
can_stopNoPass True to show the user a button to stop further drafts. The bot will receive an Update “stopped_message_generation” if the user presses the button.
draft_idYesUnique identifier of the message draft; must be non-zero. Changes to drafts with the same identifier are animated.
entitiesNoA list of special entities that appear in message text, which can be specified instead of parse_mode
parse_modeNoMode for parsing entities in the message text. See formatting options for more details.
keep_on_stopNoPass True to keep the draft in the chat when the button is pressed. The draft will still disappear after a short time or if the bot sends a message. To fully preserve the partial draft, the bot should send it as a new message.
message_thread_idNoUnique identifier for the target message thread

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare openWorldHint=true and destructiveHint=false, so safety is largely covered. The description adds the return value ('Returns True on success'), which matters because there is no output schema, but it says nothing about drafts being transient, animated on repeated draft_id updates, or needing to be sent as a real message to persist — behaviors only discoverable by reading the parameter descriptions.

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 purpose and ending with the return value; no filler. The only minor waste is the boilerplate opener 'Use this method to', which could be dropped.

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 an eight-parameter streaming tool with no output schema, the description covers purpose and return value but omits the draft lifecycle — that drafts vanish after a short time or when a real message is sent, and that repeated calls with the same draft_id animate. Those facts exist in the schema but not in the description an agent scans first.

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 all eight parameters are already documented in detail, including draft_id animation semantics and the stop-button flags. The description adds no parameter-level meaning beyond the schema, which is the expected baseline when the schema carries the load.

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 gives a specific verb and resource: stream a partial message while it is being generated, which is concretely different from a normal send. It does not, however, distinguish itself from the nearby sendRichMessageDraft sibling, so an agent must infer the split from names alone.

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?

It supplies a clear usage context ('while the message is being generated'), which is more than nothing. It offers no when-not guidance, no mention of when to fall back to sendMessage or sendRichMessageDraft, and no note about the draft lifecycle that would tell an agent when this tool stops being appropriate.

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