Skip to main content
Glama

max_mock_init_data

Read-only

Generate a correctly signed MAX mini-app initData string for backend tests, including the signing token, so you can validate your auth flow end to end.

Instructions

Produce a correctly signed MAX mini-app initData string (two-step HMAC with 'WebAppData') for backend tests, with the token used, so you can check your validator end to end.

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_mock_init_data"
  }
}

Input Schema

NameRequiredDescriptionDefault
langNoAnswer language: 'en' English, 'ru' Russian. Pick the user's language; default ru (or XONTA_MAX_LANG)
user_idNo
chat_typeNoWhere the mini-app was openedDIALOG
first_nameNo
age_secondsNoMake auth_date this many seconds old, to test expiry
start_paramNoValue from ?startapp=
test_bot_tokenNoA TEST token to sign with. Omit to generate a random one. Never pass a production token to a hosted server

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?

Beyond the annotations, the description discloses the signing algorithm (two-step HMAC with 'WebAppData') and that the token used is returned alongside the string, which is exactly what an agent needs to chain into a validator. It also implicitly explains why idempotentHint is false: an omitted token is randomly generated. It does not state the response envelope or error behavior, keeping it below 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?

A single front-loaded sentence with the artifact first and the purpose second; no filler. The trailing 'with the token used' clause is slightly awkwardly placed but earns its space by describing the return.

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 7-parameter, no-required-args generator with no output schema, the description covers what is produced, how it is signed, and that the token accompanies it. What is missing is the concrete return shape (field names/format) and any note that the other params shape the payload contents, but the essential calling information is present.

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 71%, so most parameters are already documented, and the description adds real meaning only for the token ('the token used' is returned). It says nothing about lang, age_seconds, start_param, or chat_type beyond what the schema already provides, so the baseline 3 is right.

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 names a specific verb and artifact: 'Produce a correctly signed MAX mini-app initData string', plus the signing scheme ('two-step HMAC with WebAppData'). It is clearly distinct from max_verify_signature in spirit (it generates rather than validates), but it never names a sibling, so it stops short of explicit differentiation.

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?

'for backend tests' and 'so you can check your validator end to end' give a usage context, implying it belongs in test setup paired with a verification step. There is no explicit when-not guidance and no named alternative tool, so the routing signal is only implied.

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