Skip to main content
Glama

OpenFactory

run_app_scenario

Run a saved scenario in a VM and record the result as an app test run.

First run = hardening (resolves each element via OmniParser, slow). Later runs replay from cache (fast) and only re-resolve steps whose UI changed. The response reports, per step, whether it was served from cache or parsed. Secrets (password, 2FA TOTP seed) are normally stored when the scenario is created and pulled from the key store automatically; pass variables only to override a value for this single run (substituted into ${VAR}/${totp:VAR}, never persisted).

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": {
      "scenario_id": "<scenario_id>"
    },
    "name": "run_app_scenario"
  }
}

Input Schema

NameRequiredDescriptionDefault
api_keyNoMCP API key
vm_nameNoTester/desktop VM to run in (of-tester-* or of-desktop-*). Omit to auto-lease one from the app's tester VM pool (queues if all the app's VMs are busy) and release it when the run finishes.
variablesNoOptional run-time overrides for ${VAR}/${totp:VAR} in the scenario's steps. Secrets are normally saved when the scenario is created (create_app_scenario.secrets) and pulled from your key store automatically; use this only to override a value for a single run. Merged over the stored values and NOT persisted. e.g. {"PASSWORD":"hunter2","OTP_SECRET":"JBSWY3DPEHPK3PXP"}
scenario_idYesScenario id to run
on_behalf_ofNoRun as THIS OpenFactory user (id or email) instead of the caller, so the run uses their tester-VM pool and stored secrets (e.g. a staging protection-bypass token + app login). Only honored for the system agent or a super-admin.
record_videoNoRecord a video of the run (per-step seek markers added; watchable live in the VNC console).
public_reportNoWhether the standalone HTML report URL for this scenario run should be public. Default false keeps report artifacts private.
session_tokenNoSession token

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses the first-run hardening cost, cached replay behavior, per-step cache/parse reporting, and the secrets handling model (key-store defaults, non-persisted overrides). It omits failure/error behavior and any permission or concurrency expectations for the run itself.

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 action is front-loaded in the first sentence, followed by progressively finer detail on caching and secrets. Four sentences with little waste, though the secrets sentence partly duplicates the variables parameter description.

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?

An output schema exists, so return values needn't be explained, and the description still usefully notes the per-step cache/parse reporting. For an 8-parameter run tool with no annotations, the behavioral coverage is strong; only failure handling and explicit sibling routing are missing.

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 description coverage is 100%, so the schema already documents vm_name auto-leasing, variables substitution, and on_behalf_of. The description restates the variables override semantics (${VAR}/${totp:VAR}, never persisted) without adding format or validation detail beyond what the schema provides, so baseline 3 applies.

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 opening sentence names a specific verb and resource ('run a saved scenario in a VM') and adds the outcome ('record the result as an app test run'). It is unambiguous what the tool does, though it never explicitly distinguishes itself from siblings like run_all_app_scenarios or run_app_test_group.

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 implied through the cache model (first run = slow hardening, later runs = fast replay) and the guidance to pass `variables` only for single-run overrides. However, there is no explicit statement of when to choose this tool over run_all_app_scenarios or run_app_test_group, and no when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.