Skip to main content
Glama

max_convert_formatting

Read-onlyIdempotent

Converts Telegram MarkdownV2/HTML or LLM Markdown into MAX markup and reports unsupported elements like spoilers, tables, lists, or inline images.

Instructions

Convert formatted text to MAX markup: Telegram MarkdownV2 (underline x → ++x++, unescape), Telegram HTML (tg://user → max://user, spoilers dropped) or ordinary Markdown from an LLM (lists → bullets, rules removed). Reports what MAX cannot show (spoilers, tables, lists, inline images). Use the returned format value 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": {
      "text": "<text>",
      "source": "<source>"
    },
    "name": "max_convert_formatting"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoAnswer language: 'en' English, 'ru' Russian. Pick the user's language; default ru (or XONTA_MAX_LANG)
textYesFormatted text
sourceYesWhere the text comes from; 'markdown' = ordinary Markdown (e.g. LLM output)
targetNoMAX format to producemax_markdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and non-destructive, so safety is covered; the description adds genuinely new behavior: the conversion is lossy and it reports what MAX cannot show (spoilers, tables, lists, inline images), and it discloses that a 'format' value comes back for downstream use. It stops short of describing error behavior on malformed input or the shape of the report.

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 dense sentences, front-loaded with the core action and followed by per-source specifics and the lossy-output caveat; no filler. The mid-sentence line break and packed parentheticals make it slightly harder to scan than an ideal version.

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, idempotent conversion tool with full schema coverage, the description covers inputs, per-source behavior, lossy-output reporting, and the returned format value despite there being no output schema. Minor gaps remain around failure modes and the exact contents of the 'cannot show' report.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description goes further by attaching transformation semantics to specific source values (MarkdownV2 underline conversion and unescaping, HTML link rewriting with spoilers dropped), which the schema text does not convey. The target and lang parameters get no added meaning beyond their schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — convert formatted text to MAX markup — and immediately enumerates the three accepted source dialects with concrete transformation examples (__x__ → ++x++, tg://user → max://user). This clearly separates it from sibling tools like max_validate_message or max_build_message, which check or assemble messages rather than transcode them.

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 source enum values are explained ('markdown' = ordinary Markdown, e.g. LLM output), which implies when each applies, and the closing line says to use the returned format value in the body. However, there is no explicit when-to-use/when-not guidance against alternatives such as max_validate_message or max_lint_code, leaving routing to inference.

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