This document provides a comprehensive reference guide to all tools currently available in the AutoSpectra MCP server.
Tool |
Description |
Parameters |
navigate |
Navigate to a URL |
url (string, required): The URL to navigate to
visible (boolean, optional): Whether to use a visible browser |
click |
Click on an element |
selector (string, required): CSS selector of the element
visible (boolean, optional): Whether to use a visible browser |
type |
Type text into an input field |
selector (string, required): CSS selector of the input field
text (string, required): Text to type
clearFirst (boolean, optional): Clear the field before typing
visible (boolean, optional): Whether to use a visible browser |
extract |
Extract data from an element |
selector (string, required): CSS selector of the element
attribute (string, optional): Attribute to extract (default: textContent)
visible (boolean, optional): Whether to use a visible browser |
screenshot |
Take a screenshot |
fullPage (boolean, optional): Whether to take a full page screenshot
visible (boolean, optional): Whether to use a visible browser |
check_accessibility |
Run accessibility tests |
rules (array, optional): Specific accessibility rules to check
includeHidden (boolean, optional): Whether to include hidden elements
visible (boolean, optional): Whether to use a visible browser |
Tool |
Description |
Parameters |
generate_tests |
Generate test cases for an application |
url (string, required): URL of the application to analyze
framework (string, optional): Test framework to use (e.g., playwright, mocha, jest)
style (string, optional): Test style (e.g., bdd, tdd)
format (string, optional): Output format (e.g., javascript, typescript)
prompt (string, required): Description of the test scenarios to generate |
ai_process |
Process a task with AI to generate automation steps |
task (string, required): Task description
url (string, optional): URL context |
self_healing_record |
Record a test session with self-healing selectors |
url (string, required): URL to start recording at
outputFormat (string, optional): Output format (e.g., playwright, cypress) |
visual_comparison |
Compare visual snapshots of a web page |
url (string, required): URL to compare
baselinePath (string, optional): Path to baseline image
threshold (number, optional): Comparison threshold (0-1) |
list_frameworks |
Get a list of supported test frameworks, styles, and formats |
(No parameters) |
run_test |
Run a generated test file |
testPath (string, required): Path to the test file to run
installDeps (boolean, optional): Whether to install dependencies if needed |
Tool |
Description |
Parameters |
debug_test |
Create or update a debug test session |
testName (string, required): Name of the debug test
testScript (string, optional): JavaScript test script containing step definitions
runImmediately (boolean, optional): Whether to run the test immediately
breakAt (array, optional): Step IDs to break execution at
clearPrevious (boolean, optional): Whether to clear any previous debug session with the same name |
run_debug_test |
Run a debug test |
testName (string, required): Name of the debug test to run
fromStep (number, optional): Index of the step to start execution from
toStep (number, optional): Index of the step to end execution at
runToBreakpoint (boolean, optional): Whether to pause execution at breakpoints |
continue_debug_test |
Continue execution of a paused debug test |
steps (number, optional): Number of steps to execute before pausing
runToBreakpoint (boolean, optional): Whether to pause execution at breakpoints |
modify_debug_step |
Add or modify a step in a debug test |
stepId (string, required): ID of the step to modify
type (string, required): Type of step (navigate, click, type, etc.)
args (object, required): Arguments for the step
index (number, optional): Index to insert the step at
runAfter (boolean, optional): Whether to run the step immediately after modification |
get_debug_state |
Get the current debug state |
includeStepResults (boolean, optional): Whether to include step results in the response |
cleanup_debug_session |
Clean up debug session resources |
(No parameters) |
Tool |
Description |
Parameters |
api_request |
Make an HTTP request to an API endpoint |
method (string, required): HTTP method (GET, POST, PUT, DELETE)
url (string, required): API endpoint URL
headers (object, optional): Request headers
data (any, optional): Request body
params (object, optional): URL parameters
auth (object, optional): Authentication details
validateStatus (boolean, optional): Whether to validate status code
timeout (number, optional): Request timeout
baseURL (string, optional): Base URL for relative paths
ignoreHTTPSErrors (boolean, optional): Whether to ignore HTTPS errors |
validate_schema |
Validate an API response against a schema |
response (any, required): API response to validate
schema (any, optional): JSON schema to validate against
schemaPath (string, optional): Path to schema file |
create_mock |
Create a mock API endpoint for testing |
endpoint (string, required): Endpoint path to mock
method (string, required): HTTP method
response (any, required): Mock response
statusCode (number, optional): Response status code |
graphql_request |
Make a GraphQL request |
endpoint (string, required): GraphQL API endpoint
query (string, required): GraphQL query
variables (object, optional): Query variables
headers (object, optional): Request headers
auth (object, optional): Authentication details |
Tool |
Description |
Parameters |
initialize_computer |
Initialize a computer use provider |
type (string, required): Provider type (“api” or “container”)
apiKey (string, optional): Anthropic API key
containerImage (string, optional): Container image to use
width (number, optional): Screen width for container provider
height (number, optional): Screen height for container provider |
use_computer |
Use Claude computer capabilities |
prompt (string, required): Description of the computer task to perform
model (string, optional): Claude model to use |
smart_computer_use |
Use computer capabilities with fallback to automation tools |
prompt (string, required): Description of the computer task to perform
useAutomation (boolean, optional): Whether to fall back to automation tools
model (string, optional): Claude model to use |
cleanup_computer |
Clean up computer use provider resources |
(No parameters) |
Usage Examples
Browser Automation
// Navigate to a URL with visible browser
use_mcp_tool({
server_name: "autospectra",
tool_name: "navigate",
arguments: {
url: "https://example.com",
visible: true
}
});
// Click on an element
use_mcp_tool({
server_name: "autospectra",
tool_name: "click",
arguments: {
selector: "#login-button",
visible: true
}
});
// Type text into a field
use_mcp_tool({
server_name: "autospectra",
tool_name: "type",
arguments: {
selector: "#username",
text: "testuser",
clearFirst: true,
visible: true
}
});
Testing
// Generate tests for a login page
use_mcp_tool({
server_name: "autospectra",
tool_name: "generate_tests",
arguments: {
url: "https://example.com/login",
framework: "playwright",
format: "javascript",
prompt: "Create tests for login functionality, including valid and invalid credentials"
}
});
// Run the generated test
use_mcp_tool({
server_name: "autospectra",
tool_name: "run_test",
arguments: {
testPath: "./output/login-tests.js",
installDeps: true
}
});
Debugging
// Create a debug test session
use_mcp_tool({
server_name: "autospectra",
tool_name: "debug_test",
arguments: {
testName: "login-flow",
testScript: `
// Simple login flow test
step('step1', 'navigate', { url: 'https://example.com/login' });
step('step2', 'type', { selector: '#username', text: 'testuser', clearFirst: true });
step('step3', 'type', { selector: '#password', text: 'password123', clearFirst: true });
step('step4', 'click', { selector: '#login-button' });
step('step5', 'extract', { selector: '.welcome-message' });
`,
breakAt: ['step4'],
runImmediately: false
}
});
// Run the debug test
use_mcp_tool({
server_name: "autospectra",
tool_name: "run_debug_test",
arguments: {
testName: "login-flow",
runToBreakpoint: true
}
});
API Testing
// Make a GET request
use_mcp_tool({
server_name: "autospectra",
tool_name: "api_request",
arguments: {
method: "GET",
url: "https://api.example.com/users",
headers: {
"Accept": "application/json"
}
}
});
// Make a POST request with JSON data
use_mcp_tool({
server_name: "autospectra",
tool_name: "api_request",
arguments: {
method: "POST",
url: "https://api.example.com/users",
headers: {
"Content-Type": "application/json"
},
data: {
"name": "John Doe",
"email": "john@example.com"
}
}
});
// Validate response against schema
use_mcp_tool({
server_name: "autospectra",
tool_name: "validate_schema",
arguments: {
response: {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
},
schema: {
"type": "object",
"required": ["id", "name", "email"],
"properties": {
"id": { "type": "number" },
"name": { "type": "string" },
"email": { "type": "string", "format": "email" }
}
}
}
});
Computer Use
// Initialize computer use
use_mcp_tool({
server_name: "autospectra",
tool_name: "initialize_computer",
arguments: {
type: "api"
}
});
// Use computer capabilities
use_mcp_tool({
server_name: "autospectra",
tool_name: "use_computer",
arguments: {
prompt: "Open a web browser, navigate to example.com, and take a screenshot"
}
});
Integration with CI/CD
The AutoSpectra MCP server can be integrated into CI/CD pipelines to provide automated testing capabilities. For more information, see the CLOUD_DEPLOYMENT.md guide.
Next Steps
For more detailed information about specific tools and capabilities, refer to: