VisualQ

MCP Tools

Tools exposed by @visualq/mcp, the hosted gateway, and POST /api/mcp/v1/invoke.

Reference for all tools in @visualq/mcp and the hosted gateway. Install and configure the server in MCP integration.

Health / discovery

GET /api/mcp/v1/health
GET /api/mcp
GET /api/mcp/v1/openapi.json

No authentication required for health and OpenAPI. The hosted gateway (GET /api/mcp) returns the full tool catalog for remote agents.

{
  "ok": true,
  "service": "visualq-mcp",
  "version": "v2",
  "invokeTools": ["list_scenarios", "get_run_failures", "..."]
}

Invoke endpoint

POST /api/mcp/v1/invoke
X-API-Key: vq_org_live_…   # org agent key (IDE)
X-API-Key: vq_live_…       # project key (CI or single-project MCP)
Content-Type: application/json

{ "tool": "get_run_failures", "args": { "project": "my-client", "environment": "staging" } }

With an org agent key, pass "project": "slug" on most tools unless the key has a defaultProject or you set VISUALQ_DEFAULT_PROJECT in the MCP env. See Agent API keys.

Remote-first clients may also call POST https://visualq.ai/api/mcp with the same body and X-API-Key header.

Responses follow the MCP response contract.

Error codes

HTTPerror.codeMeaning
400validation_errorInvalid arguments
400confirm_requiredWrite tool called without confirm: true
403scope_deniedAPI key scope too narrow
403plan_gateTool not allowed on current plan
404not_foundUnknown tool name
422tool_errorTool ran but business logic failed
429rate_limitRate limit exceeded; see retryAfterMs

Rate limits

  • 60 invoke calls per minute per API key
  • HTTP 429 with retryAfterMs and Retry-After header when exceeded
  • CI endpoints (/api/ci/*) use separate limits — see CI endpoints

Phase 1 — Core VRT & health

ToolViaDescription
list_projectsCI APIProjects accessible with the API key
list_scenariosinvokeScenario labels, URLs, and viewports
run_vrtCI APIStart VRT comparison against baselines
run_baselineCI APICapture new baselines
run_perf / run_seo / run_a11y / run_security / run_trackingCI APIPillar audits
get_run_statusCI APIRun status and summary (runId required)
wait_for_runMCP clientPoll get_run_status until complete
get_run_failuresinvokeBatch failures with mismatch %
get_diff_statsinvokeDrill-down for one scenario + viewport
get_quality_scoreinvokeComposite score from rolling page health
get_site_healthinvokeSite rollup with coverage and pillar scores
get_page_healthinvokeRolling health for one page/scenario
get_job_statusinvokePoll async jobs
list_my_toolsinvokeMCP catalog for this key and plan

Org agent tools

Available with org agent keys (vq_org_live_…) — require project unless a default is configured:

ToolMutatingDescription
create_projectyesCreate a project + default Production environment
get_projectnoProject metadata, modules, scenario count
list_environmentsnoEnvironments for the project

create_project requires scope mcp_full and confirm: true.

Common parameters

ParameterUsed byDescription
projectmostProject slug or ID (required with org agent keys unless default is set)
environmentrun/failure toolsEnvironment slug or ID
runIdstatus, failures, approveDefaults to latest completed run when omitted
scenarioLabeldiff, explain, rulesHuman-readable scenario label
viewportdiff, explainphone, tablet, or desktop
scenariosrun_vrt, approveFilter to specific scenario labels
browsersrun_vrt, run_baselineBrowser filter
maxWaitMswait_for_runClient poll timeout
confirmwrite toolsMust be true for mutating invoke tools

Phase 2 — Analysis & platform (invoke)

ToolDescription
get_run_historyRecent VRT and audit runs
get_scenario_detailsFull configuration for one scenario
compare_runsDelta between two runs
check_setup_healthSetup blockers before audits
explain_vrt_failureStructured failure analysis
inspect_page_domDOM map from baseline or Firecrawl
find_element_on_pageResolve selector from description
get_run_reportSlim run report for agents
perf_get_latest_report / perf_list_historyPerformance reports and history
seo_get_report / seo_list_historySEO reports and history
a11y_get_report / a11y_list_historyAccessibility reports and history
security_get_report / security_list_historySecurity reports and history
tracking_get_planFull analytics tracking plan + FRT linking hints
tracking_get_pageOne plan page with datalayer attributes + VRT scenarios
tracking_get_eventOne plan event with event attributes + FRT links
tracking_list_pagesPage list with scenario/attribute counts
tracking_list_eventsEvent list with FRT coverage flags
tracking_list_page_attributesDatalayer variable matrix (pageId optional filter)
tracking_list_event_attributesEvent-variable matrix (eventId optional filter)
tracking_get_audit_reportLatest tracking audit bilan
tracking_get_audit_event_proofPer-event proof: report link, FRT scenario, variable table (plan / Piano / expected / received)
tracking_prove_jira_ticketJIRA ticket → semantic intent, async tracking audit, proofVerdict + jiraMarkdown (poll get_job_status)
tracking_export_audit_reportExport audit report (xlsx/html/pdf)
recommend_next_actionHighest-value next action
prioritize_issuesRank open issues by impact
generate_action_planStructured remediation plan
identify_blockers_for_releaseRelease blockers from health and runs
analyze_user_intentClassify user intent for routing
suggest_quick_scenariosQuick scenario suggestions
suggest_scenarioSuggest VRT scenario from URL
get_page_groupsPage group organization
frt_get_feature_groupsFRT feature folder organization (includes step summaries)
frt_find_scenariosSearch existing FRT features by ticket, name, or step text — call before create_frt_scenario
crawl_siteCrawl URLs via Firecrawl (asyncget_job_status)
generate_scenariosGenerate scenarios from URLs (async)
analyze_resultsAI analysis of VRT diff results
frt_search_step_libraryfrt_explore_siteFRT authoring (28 tools)
agent_start_recording / agent_recording_turn / agent_finish_recordingHeadless NL recorder

Rolling health: use get_site_health / get_quality_score for project KPIs. Never treat a single latest run as the site score.

Phase 3 — Write (invoke)

All phase 3 tools are mutating. They require:

  1. API key scope mcp_full
  2. Organization plan Hobby or above
  3. confirm: true in arguments
ToolRequired argsDescription
approve_vrt_resultsscenarios, confirmPromote failed results to baselines
create_scenariolabel, url, confirmPersist a VRT scenario (counts toward plan create_scenario quota)
create_comparison_rulescenarioLabel, selector, mode, confirmIgnore/dynamic/layout rule
create_content_rulescenarioLabel, selector, normalize, confirmContent normalization rule
run_frt_featurefeatureId, confirmRun an FRT feature suite
create_frt_scenariogoal, confirmCreate FRT scenario from NL goal (resolve-first; Gherkin always EN)
frt_organize_feature_groupsgroups, confirmOrganize FRT features into folders
frt_save_feature_draftfeatureId, confirmPersist FRT feature draft
frt_create_step_deffrt_set_gherkin_bulkvaries + confirmFRT step/scenario authoring
post_pr_commentprNumber, confirmPost VisualQ summary on a GitHub PR
tracking_set_page_attributepageId, name, expected, confirmSet datalayer attribute on a page
tracking_delete_page_attributepageId, name, confirmRemove datalayer attribute from a page
tracking_set_event_attributeeventId, name, expected, confirmSet event-variable on an event
tracking_delete_event_attributeeventId, name, confirmRemove event-variable from an event
tracking_upsert_pageid, label, pageType, confirmCreate or update a plan page
tracking_delete_pagepageId, confirmDelete a plan page
tracking_upsert_eventid, label, eventType, confirmCreate or update a plan event
tracking_delete_eventeventId, confirmDelete a plan event
tracking_link_page_scenariopageId, scenarioId, confirmLink page to VRT scenario id
tracking_unlink_page_scenariopageId, scenarioId, confirmUnlink VRT scenario from page
tracking_link_event_frteventId, featureId, stepIndex, stepText, confirmLink event to FRT step
tracking_unlink_event_frteventId, featureId, confirmRemove FRT link from event
tracking_update_planfields, reason, confirmBulk replace plan sections
agent_start_recording / agent_finish_recordingconfirmHeadless recorder session

create_comparison_rule modes

modeEffect
fullStandard pixel comparison
layout_onlyLayout only
ignoreExclude region
dynamicTolerate changes in region

Example — create VRT scenario (after suggest_scenario)

{
  "tool": "create_scenario",
  "args": {
    "label": "Homepage",
    "url": "https://example.com/",
    "selectors": ["document"],
    "delay": 6000,
    "misMatchThreshold": 2,
    "captureBaseline": true,
    "confirm": true
  }
}

Typical agent flow: suggest_scenariocreate_scenariowait_for_run (if baselineRunId returned) or run_baseline.

Example — approve failures

{
  "tool": "approve_vrt_results",
  "args": {
    "environment": "staging",
    "runId": "abc123",
    "scenarios": ["Homepage", "Checkout"],
    "viewports": ["desktop"],
    "confirm": true
  }
}

Async jobs

Long-running tools return { jobId, status: "queued" }. Poll with:

{ "tool": "get_job_status", "args": { "jobId": "…" } }

Async tools include crawl_site, generate_scenarios, frt_propose_journey, and frt_explore_site.

MCP resources

Registered on @visualq/mcp (stdio/HTTP) and readable without explicit invoke:

URIBacking tool
visualq://latest-failuresget_run_failures
visualq://quality-scoreget_quality_score
visualq://site-healthget_site_health
visualq://scenarioslist_scenarios

MCP prompts

NamePurpose
diagnose-vrt-failureGuided failure diagnosis
pre-merge-checkVRT pre-merge and blockers
setup-health-reviewSetup + rolling health review

Tool manifest

Authoritative schema: tools-manifest.json in visualq-mcp (98 tools as of @visualq/mcp@0.6.1). Regenerate from the backend:

cd visualq && npm run mcp:export-manifest

Install

See MCP integration.

On this page