Skip to main content
Glama

OpenFactory

create_app_scenario

Create a reusable GUI test scenario stored on OpenFactory.

Tests any URL the tester VM can reach — a local dev server, a deployed app, or a public site — on a vanilla Ubuntu+Firefox tester VM. No build and no image are required. Define the flow once in plain language; run it later (and repeatedly) with run_app_scenario. The first run hardens it (caches where each element is) so re-runs are fast and self-healing.

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": {
      "app_name": "<app_name>",
      "scenario": "<scenario>",
      "steps": "<steps>"
    },
    "name": "create_app_scenario"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsYesJSON array of semantic steps, run in order. Each step: {"action": "open_url"|"click"|"type"|"key"|"assert_text"|"assert_no_error"|"wait"|"email_otp"|"assert_visual"|"drag"|"assert_stable"|"assert_progress"|"network"|"login"|"goal", "target"?: str, "value"?: str, "expect"?: str, "visual_threshold"?: int, "monitor_duration_secs"?: int, "monitor_region"?: [x,y,w,h], "sample_interval_ms"?: int, "stability_threshold"?: int, "min_changes"?: int, "min_stream_secs"?: int}. Use plain language for `target` (e.g. "Sign In button", "email field") — it is matched on screen by OmniParser (verbose descriptions are fine; they resolve to the on-screen label). `value` is the URL (open_url), the text to type (type), the key to press (key, e.g. "Return"), or seconds (wait). `drag` drag-and-drops `target`: `value` is either a pixel delta "dx,dy" (e.g. "120,-40" to move it right 120 / up 40) or "to:<other target>" to drop it onto another element — e.g. reorder a list, move a graph node, drag a slider. `expect` optionally asserts text is visible after the step. An `assert_text` step requires a non-empty `expect` (legacy `value` is also accepted); `target` does not supply the assertion text. `assert_no_error` is a NEGATIVE assertion — it FAILS if an error bubble/toast is on screen (built-in phrases like 'Something went wrong', 'Internal server error', 'Failed to load', 'Rate limit'); add custom phrases via `expect` (comma/newline-separated, e.g. "Payment declined, Card expired"). Place it after a submit/send to assert no failure popped up. NOTE: by default the runner ALSO sweeps every step for these error bubbles and fails the run automatically, so you only need an explicit `assert_no_error` for CUSTOM error text or a specific checkpoint. `assert_visual` is a visual-regression check: the first run captures a perceptual-hash baseline of the full page; later runs FAIL if the page drifts beyond `visual_threshold` (perceptual-hash Hamming distance 0-64, default 8) — catches layout/render regressions that text checks miss. `assert_stable` is a TEMPORAL/SOAK check: it watches a screen region over time and FAILS on visual INSTABILITY — flicker (an element repeatedly appears/disappears) or disappearance (present at the start, gone by the end). Fields: `monitor_duration_secs` (1-120, default 15), `monitor_region` [x,y,w,h] in screen pixels (omit = full screen), `sample_interval_ms` (200-2000, default 500), `stability_threshold` (phash distance 0-64, default 6), and optional `target` = an element (by label) that must REMAIN present the whole time. Catches 'after a while the UI flickers/vanishes' bugs that point-in-time checks miss, e.g. {"action":"assert_stable","target":"VM node","monitor_region":[260,140,760,520],"monitor_duration_secs":20,"description":"VM nodes stay stable for 20s"}. `assert_progress` is the INVERSE temporal check — for STREAMING UIs (a chat reply, a build-log tail). It FAILS if a region stops changing too early: NO_OUTPUT (never rendered) or FROZE (last change before `min_stream_secs`, or fewer than `min_changes` changing samples) — i.e. the reply 'stops after a second'. Same monitor fields as assert_stable plus `min_changes` (default 3) and `min_stream_secs` (default 4); scope `monitor_region` to the reply text area so a spinner can't read as progress. E.g. {"action":"assert_progress","monitor_region":[480,180,760,520],"monitor_duration_secs":20,"min_stream_secs":4,"description":"reply keeps streaming, does not stall"}. `network` is FAULT INJECTION — drop/restore the tester VM's connection to reproduce a mid-stream disconnect and test recovery: `value` = "down" | "up" | "drop:<secs>" (drop cuts the connection, holds ≤ secs, then ALWAYS restores). With `expect` it asserts that text (e.g. a 'connection dropped' recovery toast) appears on the OFFLINE screen. E.g. {"action":"network","value":"drop:12","expect":"connection dropped","description":"cut the connection mid-stream; the recovery toast must appear"}. Reference variables as ${VAR}. Enter a TOTP 2FA code with ${totp:VAR} (VAR holds a base32 secret). For an EMAILED code, use the `email_otp` action: `target` is the code input field, optional `value` filters the email (e.g. "from:no-reply@app.com" or "subject:verification"); it reads the scenario owner's Composio-connected Gmail and fills the code (the owner must have an ACTIVE Composio Gmail connection). It does NOT submit the verification form; follow it with an explicit `click` on Continue/Verify or a `key` Return step, then assert content inside the product. Example login with an emailed 2FA code: [{"action":"open_url","value":"${APP_URL}"},{"action":"type","target":"email field","value":"${EMAIL}"},{"action":"type","target":"password field","value":"${PASSWORD}"},{"action":"click","target":"Sign In button"},{"action":"email_otp","target":"verification code field","value":"subject:verification"},{"action":"click","target":"Verify","expect":"Dashboard"}]
api_keyNoMCP API key
app_urlNoApp base URL as the VM reaches it — a dev server, a deployed app, or any public URL. No build/deploy is required; the vanilla tester VM just opens this URL.
secretsNoJSON object of SECRET values the steps reference via ${VAR}/${totp:VAR} — password, base32 TOTP seed, etc., e.g. {"PASSWORD":"hunter2","OTP_SECRET":"JBSWY3DPEHPK3PXP"}. Saved (encrypted) in your key store, scoped per app, so the scenario can be re-run later — including bulk re-runs that can't prompt for input. Every ${VAR} a step uses must resolve on re-run: put NON-SECRET values in `variables` and SECRET ones here (or have them already stored for this app), otherwise the create is rejected.
app_nameYesStable app key, e.g. 'knostra' — groups history
build_idNoOptional EXISTING variant/build id to associate (metadata only — reuses a build already present, never triggers a new build). Requires project_id.
scenarioYesStable scenario name, e.g. 'smoke-login'
variablesNoOptional JSON object of NON-SECRET default variables for ${VAR} substitution, e.g. {"APP_URL":"http://10.0.2.2:3000","EMAIL":"a@b.com"}. Put passwords / TOTP seeds in `secrets` (they're saved to your key store), not here.
project_idNoProject to file this scenario under (proj-… id from your projects). Makes it show up under that project in the cto-gui graphs / right test panel. Must be a project you own. If omitted, the scenario is filed under your auto-created default 'App Tests' project (every test belongs to a project).
descriptionNoALWAYS provide this: a concise, human 'what this test verifies' sentence describing the test's GOAL — not a list of steps. Shown at the top of the test panel when the test is opened. E.g. 'Signs in and verifies the Usherpa integration's tool catalog loads.' or 'Sends a long prompt and confirms the reply streams without freezing.' If omitted, a readable summary is auto-generated from the step semantics, but an authored one is better.
browser_authNoRun this test SIGNED IN: restores the owner's prepared, encrypted browser profile (stored once per app origin + Composio account) before the first open_url — no login steps or password secrets needed. Shape: {provider:'composio', connection_id:str}. Requires app_url. Prepare the profile once in the dashboard (the test's Sign-in section, or a Walk's 'With login' — same store); creating without a prepared profile fails with browser_profile_not_ready. Mutually exclusive with incognito steps. Re-calling create_app_scenario for an existing test (upsert) attaches it.
session_tokenNoSession token
fail_on_error_toastNoDefault True: automatically FAIL the run if a known error bubble/toast appears on any step. Set False only for apps that legitimately render error-like copy.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden, and it does disclose genuinely non-obvious behavior: the scenario is persisted and re-runnable, and the first run hardens it by caching element locations so later runs are fast and self-healing. It omits equally important traits: that re-calling create for an existing app_name/scenario upserts rather than creating a duplicate, that secret/variable resolution must succeed or creation is rejected, and that a prepared browser profile is required for signed-in runs.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five short sentences, front-loaded with the action and resource, then scope, then the execution relationship to run_app_scenario. The parenthetical '(and repeatedly)' and 'Define the flow once' reinforce reuse rather than pad, and nothing is wasted.

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 13 parameters, a present output schema, and exhaustive schema-level docs, the description needs only to explain what the tool produces and how it fits with running scenarios, and it does that. The remaining gap is operational preconditions (required secrets/variables, browser profile readiness, upsert-on-existing-name), which live in the schema and would make the top-level description fully self-sufficient.

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 100% and each of the 13 parameters is documented in depth in the schema, so the baseline would be 3. The description still adds framing that the schema doesn't: the flow is authored in plain language and is environment-independent because the target is whatever URL the tester VM can reach, which tells the agent how to think about app_url, steps, and reuse together.

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?

Opens with a specific verb+resource ('Create a reusable GUI test scenario stored on OpenFactory') and immediately scopes it: any URL the tester VM can reach, vanilla Ubuntu+Firefox VM, no build or image needed. It also names the sibling that consumes the artifact ('run it later (and repeatedly) with run_app_scenario'), so an agent can tell it apart from the create_* siblings without opening a schema.

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

Usage Guidelines4/5

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

Sets a clear create-here / run-there split with run_app_scenario and rules out the build/image path that sibling tools like create_build represent. It stops short of saying when to prefer this over other test-authoring entry points (e.g. prompt-based creation or scenario assignment), but the primary usage context is unambiguous.

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.