Skip to main content
Glama

mp_generateScenarioReport

Executes scenario steps and generates a markdown regression report with pass/fail results for human review.

Instructions

执行一个 scenario(步骤定义与执行语义完全同 mp_runScenario:同样的 12 种 step、断言/动作 pass 规则、stopOnFailure 默认 true、selector 不穿透自定义组件等 — 先看 mp_runScenario 了解如何写 steps[]),并额外生成一份人可复核的 markdown 回归报告。只需要机器可读的 pass/fail 结果、不要报告时,用 mp_runScenario。

markdown 始终通过返回值的 report 字段回传(无论是否写盘);传 outputPath 时同时写入该路径(父目录自动 mkdir -p 创建)。

报告内容开关:includePassedSteps=false 只保留失败步(适合失败聚焦报告);includeSnapshots=false 从各步结果剥掉 data/elements/snapshot;includeLogs=false 剥掉 logs。title 为报告大标题(默认 'Scenario Report')。

返回 {ok, outputPath, title, totalSteps, executedSteps, passedSteps, failedSteps, report}。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYes
titleNo
maxBytesNo
connectionNo可选连接覆盖(不传则用默认会话)。可用字段:mode(launch|connect)、cliPath、projectPath、wsEndpoint、timeout、port(【自动化端口】→ cli auto --auto-port,默认 9420;不是 IDE HTTP 服务端口,别把 IDE 服务端口传进来)、account、ticket、trustProject、args、cwd、autoClose、autoLaunch、launchTimeout、connectTimeout。
outputPathNo
includeLogsNo
stopOnFailureNo
includeSnapshotsNo
scenarioTimeoutMsNo
includePassedStepsNo
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses that the tool runs actual scenario steps (with side effects like navigation and input), that stopOnFailure defaults true, that markdown is always returned in the 'report' field, and specifies the return object fields. However, it does not explicitly state that the tool is destructive or that it requires an active connection, though these are implied. Slight gap but still transparent.

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 description is well-structured, front-loading the main purpose and sibling distinction, then explaining output mechanics, report content switches, and return format. Each sentence adds value, though it is relatively long. It could be slightly more concise but is clear and logically organized.

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?

Given the tool's complexity (10 parameters, nested objects, no output schema), the description is fairly complete. It covers purpose, usage, parameter semantics, and return format. It lacks explicit error handling or details about the 'ok' field, but the essential context for correct invocation is present. High completeness for a complex tool.

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 description coverage is only 10% (only connection described in schema). The description compensates by explaining the meaning of steps (reference to mp_runScenario), title, outputPath, includePassedSteps, includeSnapshots, includeLogs, and stopOnFailure default. It does not detail maxBytes or scenarioTimeoutMs, but overall adds significant value beyond the schema.

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?

The description clearly states that the tool executes a scenario (same steps as mp_runScenario) and additionally generates a Markdown regression report. It explicitly distinguishes from mp_runScenario by stating when to use each, e.g., '只需要机器可读的 pass/fail 结果、不要报告时,用 mp_runScenario.' This provides clear purpose and sibling differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use and when-not-to-use guidance by comparing with mp_runScenario. It explains the meaning of report content parameters (includePassedSteps, includeSnapshots, includeLogs) and output behavior (report always returned in 'report' field, optional file write with parent directory creation). This covers usage context comprehensively.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Chaixueyuan/weapp-agent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server