Skip to main content
Glama

max_validate_message

Read-onlyIdempotent

Validate a MAX message body before sending to catch text, format, keyboard, attachment, and comment rule violations and fix errors early.

Instructions

Validate a message body before sending to MAX: 4000-char text, format, keyboard limits (210/30/7, 3 per row with link/open_app/request_*), button fields and lengths, attachment combinations (≤12 media, file only with a keyboard, audio/sticker/contact alone), comment restrictions, Telegram fields left in the body.

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": {
      "body": "<body>"
    },
    "name": "max_validate_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesNewMessageBody JSON: {text, format, attachments, link, notify}
langNoAnswer language: 'en' English, 'ru' Russian. Pick the user's language; default ru (or XONTA_MAX_LANG)
targetNomessage — POST /messages, comment — POST /messages/{id}/commentsmessage
chat_typeNoWhere it goes, for channel-specific rules

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, idempotentHint and non-destructive, so the safety profile is covered. The description adds genuine behavioral value by enumerating the rules enforced (4000 chars, 210/30/7 keyboard limits, attachment combinations, comment restrictions), which tells the agent this is a rule-checking dry run rather than a send. However, with no output schema there is no statement of what the check returns (error list? boolean? per-rule messages), which is the key behavioral gap for a validator.

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?

Front-loaded with the core purpose, and every clause carries rule information rather than filler. The single run-on sentence with stacked parentheticals makes it dense and slightly hard to scan, which keeps it from a 5.

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 read-only validator with a fully documented 4-parameter schema and no output schema, the description covers purpose, the rule set, and the comment/channel distinctions well. The one missing piece is what a successful versus failing validation looks like, which an agent needs in order to interpret the result.

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 each of body, lang, target and chat_type is already documented, giving a baseline of 3. The description does add some cross-mapping — 'comment restrictions' corresponds to target=comment and 'channel-specific rules' to chat_type — but it adds no format or syntax detail for the body object itself.

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 and resource: 'Validate a message body before sending to MAX'. The parenthetical rule lists clarify scope (text length, keyboards, attachments, comments), so it is clearly distinct from siblings like max_build_message or max_convert_formatting. It stops short of naming a sibling explicitly, so 4 rather than 5.

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 phrase 'before sending' implies pre-flight usage, which is real but implicit guidance. There is no explicit when-not, no named alternative (e.g., build the body with max_build_message first), and no statement about what to do with the result.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.