Skip to main content
Glama

max_lint_code

Read-onlyIdempotent

Statically checks MAX bot and mini-app code for known API mistakes, reporting line numbers and fixes without executing the code.

Instructions

Check MAX bot or mini-app code for known mistakes, with line numbers and fixes.

Finds: old host platform-api.max.ru, token in query string, 'Bearer' prefix, disabled TLS verification, removed GET /chats, restricted member adding, type=photo uploads, wrong webhook setup (port, HTTP, /webhook), disable_link_preview in body, plain == comparison of the webhook secret, initData signed directly with the token, trusting initDataUnsafe, hardcoded upload hosts, Telegram leftovers. Static, never runs the code.

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": {
      "code": "<code>"
    },
    "name": "max_lint_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesSource code of a MAX bot or mini-app (any language), or a config / curl snippet
langNoAnswer language: 'en' English, 'ru' Russian. Pick the user's language; default ru (or XONTA_MAX_LANG)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description still adds genuine value: it guarantees the code is never executed and that findings include line numbers and suggested fixes. It does not discuss severity levels or result limits, which keeps it from 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.

Conciseness4/5

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

The purpose sentence is front-loaded and the rule list is a scannable enumeration rather than prose. The list is long, but each item delimits real detection scope, so it largely earns its place.

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?

With no output schema, the description usefully states what a result contains (line numbers and fixes) and what the tool does and does not do (static, never executes). An agent has enough to invoke it correctly; only result formatting details are absent.

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% and both parameters (code, lang) are fully documented in the schema, so the schema carries the burden. The description adds only the implicit hint that input can be source code or a config/curl snippet, which the schema already states. Baseline 3 applies.

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 ('Check MAX bot or mini-app code for known mistakes') plus the shape of the result ('line numbers and fixes'). The enumerated rule list makes it clearly a static linter, distinguishable from validation siblings like max_validate_message or max_check_webhook_secret.

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 rule list implies when the tool is relevant (legacy platform-api.max.ru hosts, Telegram leftovers, initData misuse), and 'Static, never runs the code' sets expectations. However, no sibling is named and there is no explicit when-to-use vs when-not guidance, e.g. versus max_migrate_from_telegram or max_check_webhook_secret, which overlap with several listed checks.

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