Skip to main content
Glama

studio_run_scenario

Runs interaction scenarios in an isolated Studio runtime session, asserting variables, panels, text, visibility, and datasets without changing design docs. Optional hitTest checks clicks in a browser.

Instructions

在隔离的交互运行态会话(StudioRuntimeSession)中执行业务交互剧本并断言变量、面板状态、文本、显隐与数据集,不污染设计态文档。默认走语义执行层,不做遮挡/hitTest校验:click只要求目标在当前运行态可见,通过≠真实可点。hitTest:true 先用真实浏览器指针重放校验每个点击目标(遮挡/命中按真实DOM结论),被遮挡返回E_SCENARIO_OCCLUDED(含nodeId/occludedBy遮挡者/stepIndex,语义层不执行该步);真实浏览器不可用返回E_SCENARIO_HITTEST_UNAVAILABLE(不静默降级);含navigate/dataset等浏览器层无法重放的步骤返回E_SCENARIO_HITTEST_UNSUPPORTED。步骤示例:{action:"click",target:"reveal",expect:{visible:{answer:true}}};未知步骤或零断言会拒绝。

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": {
      "steps": "<steps>"
    },
    "name": "studio_run_scenario"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
portNo
resetNo
stepsYes
hitTestNo默认false走语义层(不校验遮挡,通过≠真实可点);true用真实浏览器指针校验点击目标,被遮挡返回E_SCENARIO_OCCLUDED(含nodeId/遮挡者),不可用返回E_SCENARIO_HITTEST_UNAVAILABLE,不静默降级
verboseNotrue返回完整运行场景与轨迹
projectDirNo
startPageIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.4.5

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false, so the safety profile is partly covered. The description adds substantial behavioral context beyond that: the semantic layer does not validate occlusion, hitTest:true replays real browser pointers, occluded targets return E_SCENARIO_OCCLUDED with nodeId/occludedBy/stepIndex, unavailable browsers return E_SCENARIO_HITTEST_UNAVAILABLE without silent degradation, and unsupported steps return E_SCENARIO_HITTEST_UNSUPPORTED. It also notes that unknown steps or zero assertions are rejected. This is rich disclosure, though it does not describe the return payload or runtime session lifecycle.

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 front-loaded with the core purpose and then layers on execution-mode behavior and error codes. It is dense but every sentence carries information about behavior or failure modes. It is somewhat run-on and could be broken into clearer sections, but there is little pure filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a complex tool with 8 parameters, a nested steps array, no output schema, and only 25% schema description coverage. The description covers execution semantics and error behavior well, but it does not explain most parameters or the step object's many fields, and it does not describe what a successful run returns. It is adequate for understanding the tool's mode of operation but incomplete for correct invocation across all parameters.

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

Parameters2/5

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

Schema description coverage is only 25% across 8 parameters. The description explains hitTest behavior (which is also in the schema) and provides one example step showing action, target, and expect, but it leaves url, port, reset, projectDir, startPageId, and the many step properties (op enum values, row, fill, goto, page, text, click, field, order, patch, query, rowId, value, dataset, operator, repeater, clearOthers, onEmptyShow, requireNonEmpty, onEmptySelectionShow) undocumented. The single example does not compensate for the large coverage gap.

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 states a specific verb and resource: execute business interaction scenarios in an isolated StudioRuntimeSession and assert variables, panel state, text, visibility, and dataset without polluting the design-time document. This clearly distinguishes it from design-time mutation tools. It does not explicitly name or differentiate from the sibling studio_run_acceptance_scenarios, which sounds closely related, so it falls short of a 5.

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 description explains the default semantic execution mode and when to enable hitTest:true for real browser pointer validation, including the error codes returned. However, it gives no guidance on when to choose this tool over studio_run_acceptance_scenarios or other siblings, and no prerequisites or exclusions are stated. Usage is implied rather than fully directed.

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

Deploy Server

Other Tools