Skip to main content
Glama

max_bridge_mock

Read-only

Generates a window.WebApp emulator for developing and testing MAX mini-apps in a normal browser on localhost, with signed initData and logged Bridge API calls.

Instructions

Generate max-bridge-mock.js: a window.WebApp emulator to develop MAX mini-apps in a normal browser on localhost.

Emulates initData/initDataUnsafe (signed if a test token is given), BackButton (Esc), DeviceStorage and SecureStorage (localStorage, 10-key cap), BiometricManager, HapticFeedback, NfcManager, ScreenCapture, requestContact with a valid hash, openLink/downloadFile/shareMaxContent click requirements and per-platform restrictions. Logs every call. Use only on localhost.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "max_bridge_mock"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoAnswer language: 'en' English, 'ru' Russian. Pick the user's language; default ru (or XONTA_MAX_LANG)
phoneNo79990000000
user_idNo
platformNoPlatform to emulate: limits which Bridge features workandroid
first_nameNo
entry_pointNodefault
start_paramNoEmulated ?startapp= value
test_bot_tokenNoTEST token: initData and requestContact hash will be validly signed with it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, but the description adds substantial behavioral detail beyond them: which bridge surfaces are emulated, that signed initData/requestContact hashes require a test token, a 10-key storage cap, per-platform feature restrictions, and that every call is logged. The localhost-only constraint is also a meaningful operational caveat. It stops short of describing output format or how the generated file is delivered.

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 core purpose is front-loaded in the first clause, and the long feature list is compressed into a single dense paragraph with no filler sentences. The middle enumeration of emulated surfaces is a bit run-on, but every item conveys information an agent would otherwise have to guess.

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 an 8-parameter, no-output-schema generator, the description gives a solid picture of what the produced artifact contains and the safety profile of calling it. The main gap is that four identity/context parameters receive no explanation, leaving some ambiguity about how the emulated user is configured.

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 50% across 8 parameters, so the description must compensate but only partially does: it explains the effect of test_bot_token (valid signing) and platform (limits which Bridge features work), which reinforces the schema's own notes. The remaining parameters (phone, user_id, first_name, entry_point) are left to their bare schema titles with no added meaning.

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 opens with a concrete verb and artifact ('Generate max-bridge-mock.js') and immediately defines it as a window.WebApp emulator for developing MAX mini-apps in a normal browser. It is clearly distinct from sibling utilities like max_mock_init_data or max_mock_update, though it never explicitly names those siblings to sharpen the distinction.

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?

Usage context is present but framed as a constraint rather than a routing rule: 'Use only on localhost' and 'to develop MAX mini-apps in a normal browser' tell the agent the setting, but there is no explicit when-to-use-this-vs-alternative guidance. An agent must infer that this is the full-emulator option versus the narrower mock tools in the sibling set.

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