MCP API Reference
This page is an overview. For the complete API reference with parameters, request/response examples, retry policies, and concurrency guidelines, see the full MCP API specification.
Or run npx bz-agent init to generate it locally in your project.
The Model Context Protocol (MCP) API enables AI agents to programmatically interact with Boozang for automated test management.
Authentication
Getting an API Token
- Log into Boozang at https://ai.boozang.com
- Open your project and go to Edit Project
- Check Enable MCP API (LLM access)
- Under API Tokens, enter a token name and select the access level (Read or Write)
- Click Generate and copy the token (tokens cannot be retrieved after creation)
Tokens are prefixed with bzmcp_ and scoped to a project, so projectId can be left out of every call. Two permission scopes are available:
| Scope | Access |
|---|---|
read | The tools marked read in the tables below |
write | All tools, including create, edit and delete operations, running tests and controlling the IDE |
Using the Token
Include the token in all API requests:
curl -X POST https://ai.boozang.com/api/mcp \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "tools/call", ...}'
Protocol
The MCP API uses JSON-RPC 2.0 over HTTPS.
Request Format
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "tool_name",
"arguments": {
"param1": "value1"
}
}
}
Response Format
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "Result data here"
}
]
}
}
Available Tools
The IDE control and page tools work through the Boozang IDE, so they need it open in a browser and logged into the project. Most of them also need the application window open; openAppWindow opens it.
For the end-to-end recipe on building a test with these tools (ground, validate, persist, run), see Authoring Actions over MCP.
Module Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
getModules | read | Retrieve list of modules in the current project/version | projectId, versionId, includeTests |
createModule | write | Create a new module in the current project/version | name, projectId, versionId*, parentModule, comment |
editModule | write | Update an existing module's properties | moduleCode, projectId, versionId*, name, comment, tag |
deleteModule | write | Delete an existing module from the project/version | moduleCode, projectId, versionId* |
Model Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
getModelFields | read | List the data-model fields of a model module — the element paths its generated tests use — plus per-form path overrides, the operations and validation forms (testVE) that generate tests, and the scenarios (given/when/then steps naming the tests they call) | projectId, versionId, moduleCode*, raw |
editModelField | write | Change the element path or input mode of a model-module field (path: the field default or one form's override), the value a form fills it with by default (defValue), or the steps run before/after it is filled (preSteps/endSteps). | projectId, versionId, moduleCode, fieldCode, formCode, path, view, defValue, preSteps, endSteps, inputMode |
editModelForm | write | Replace a model form's own steps (preSteps/mainStep/endSteps) — the actions every generated test runs at that form around its field fills, e.g. a details entry's search + wait + row click — its path (the element clicked to open it), or a panel's validScript. formCode may also be an operation code, to change the path or steps that open that operation, or a form button's code, to set steps around its click (they run even when $ignoreSubmit skips it). | projectId, versionId, moduleCode, formCode, path, preSteps, mainStep, endSteps, validScript, handleParameter, handleData, testCode |
getModelTemplates | read | List the version's model templates (shared path/steps/options several model items use, e.g. one bulk-action button path for Shift/Lock/Unlock). | projectId, versionId, templateCode |
editModelTemplate | write | Change a model template's path or preSteps/endSteps, which every model item using it takes (getModelTemplates lists them). | projectId, versionId, templateCode*, path, preSteps, endSteps |
editModelScenario | write | Replace a model scenario's given/when/then steps — e.g. point a "then" step at the validation test it means to call — or the data rows it loops over (dataCsv). | projectId, versionId, moduleCode, scenarioCode, given, when, then, dataCsv |
Report Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
getStoredScreenshot | read | Fetch a failure screenshot stored by a test run, by the id the runner logs ("Screenshot:<id>" in Jenkins/worker logs). | projectId, name* |
getStoredReport | read | Read a CI run's stored report as text — every worker's results, where the Jenkins console only has worker 1's. | projectId, name*, kind, match, maxChars |
Environment Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
getEnvironments | read | Retrieve list of environments in the current project/version | projectId, versionId |
createEnvironment | write | Create a new environment. | name, projectId, versionId*, index, overwrite, items |
editEnvironment | write | Update an existing environment's properties | environmentIndex, projectId, versionId*, name, items |
deleteEnvironment | write | Delete an existing environment from the project/version | environmentIndex, projectId, versionId* |
provisionEnvironments | write | Provision environments and app interfaces from configuration | projectId, versionId, config |
IDE Control Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
getIDEState | read | Get the current state of the IDE (open project, module, test) | — |
navigateTo | write | Navigate the IDE to a specific module or test | moduleId*, testId, actionIndex |
runTest | write | Run a test in the IDE and return the result. | moduleId, testId, fromAction, waitSeconds |
getPageInfo | read | Get current AUT (Application Under Test) page URL, title, and readyState | — |
getPageElements | read | Extract interactive elements from the AUT page (inputs, buttons, links, etc.) | selector, types, maxElements |
getScreenshot | read | Capture the visible AUT viewport (or one element) as an image. | selector, format, quality, maxWidth |
setBreakpoint | write | Set or clear a breakpoint on a specific action in the IDE | moduleId, testId, actionIndex*, enabled |
getAppUrl | write | Get the current URL of the AUT (Application Under Test) page | — |
openAppWindow | write | Open the AUT (Application Under Test) window, same as the IDE's "Open App Window" button. | — |
refreshPage | write | Reload the AUT (Application Under Test) page in the browser | — |
navigateUrl | write | Navigate the AUT (Application Under Test) to a specific URL | url* |
clearBreakpoints | write | Clear all breakpoints in the IDE | — |
waitForPageReady | write | Wait for the AUT page to finish loading (document.readyState === "complete") | timeout |
stopTest | write | Stop the currently running test in the IDE | — |
getTestResults | write | Get the results from the last test run (passed, failed, total, actions, duration). | — |
getConsoleLog | write | Get console log messages from the IDE (last N entries, optionally filtered). | limit, filter, since, until |
getBreakpoints | write | List all breakpoints currently set in the IDE | — |
pauseTest | write | Pause the currently running test in the IDE | — |
resumeTest | write | Resume a paused test (e.g. after hitting a breakpoint). | — |
getTestStatus | write | Check if a test is currently running, paused, or idle, and get current module/test info. | — |
getIDEUrl | write | Get the current IDE URL including query parameters (token, env, group, filter, scope, etc.) and hash | — |
setIDEUrl | write | Navigate the IDE to a new URL (triggers full page reload — socket will disconnect and reconnect) | url, params |
getIDETestActions | read | Get the actions of a test as currently loaded in the IDE (what the runner will execute), including group loopData/groupType/conditionAction. | moduleCode, testCode |
getRuntimeContext | read | Snapshot of the test runner variables ($parameter, $loop, $group, $action, $test) and current test key, as seen by loopData/scripts. | — |
Test Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
getTests | read | Retrieve list of tests in a module | projectId, versionId, moduleCode* |
createTest | write | Create a new test in a module | projectId, versionId, moduleCode, name, type, subtype, description, tag, comment, url |
editTest | write | Update an existing test's properties | projectId, versionId, moduleCode, testCode, name, type, subtype, description, tag, comment |
deleteTest | write | Delete a test and its associated document | projectId, versionId, moduleCode, testCode |
plugTest | write | Plug a test into another test or suite as a reference (type-4 ref action) | projectId, versionId, targetModuleCode, targetTestCode, refModuleCode, refTestCode, description, position, groupKey |
Action Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
getActions | read | Retrieve actions for a test | projectId, versionId, moduleCode, testCode |
createAction | write | Add a new action to a test | projectId, versionId, moduleCode, testCode, type*, element, event, method, content, compareMark, expectation, description, position, groupKey, failedReaction, refOfSuccess, refOfFailed, refOfError, groupType, conditionAction, loopData, withEntry, withSubmit, max, min |
editAction | write | Update an existing action in a test | projectId, versionId, moduleCode, testCode, actionKey*, type, element, event, description, disable, preScript, resultscript, failedReaction, refOfSuccess, refOfFailed, refOfError, groupType, conditionAction, loopData, withEntry, withSubmit, max, min |
deleteAction | write | Remove an action from a test | projectId, versionId, moduleCode, testCode, actionKey* |
moveAction | write | Move an action (with all its fields) into a group, out to the top level, or to another position | projectId, versionId, moduleCode, testCode, actionKey*, groupKey, position |
Auth Config Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
getAuthConfig | read | Get auth configuration for all hosts in a project version | projectId, versionId |
configureAuth | write | Enable/disable auth for a host and set auth module reference | projectId, versionId, hostIndex*, enabled, module, tokenKey, token |
Settings Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
getSettings | read | Get the version's IDE settings: content policy flags (e.g. aiControlActionRetry = smart retry on element missing, aiControlAction = wait on API requests) and per-environment timings. | projectId, versionId* |
editSettings | write | Change the version's IDE settings. | projectId, versionId*, content, advanced |
Page Inspection and Authoring Tools
| Tool | Scope | Description | Parameters |
|---|---|---|---|
resolveSelector | read | Test an NLP selector path against the live AUT page. | selector* |
getPageDOM | read | Get a structured DOM tree of the AUT page. | rootSelector, maxDepth, includeHidden |
clickElement | write | Click an element in the AUT using an NLP selector. | selector*, waitAfter |
fillElement | write | Set a value on an input/select/textarea in the AUT using an NLP selector. | selector, value, append |
evaluateInApp | write | Execute a JavaScript expression in the AUT (Application Under Test) window and return the result. | expression*, timeout |
scanPage | read | Discover all interactive regions on the current AUT page: forms (with field labels), tables (with headers), buttons, navigation links, modals. | includeSelectors, scope |
* = required.
Quick Example
import requests
def call_mcp_tool(tool_name, arguments, token):
response = requests.post(
"https://ai.boozang.com/api/mcp",
headers={
"Authorization": f"Bearer {token}",
"Content-Type": "application/json"
},
json={
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": tool_name,
"arguments": arguments
}
}
)
return response.json()
# List all modules with tests
result = call_mcp_tool("getModules", {
"projectId": "p123",
"versionId": "master",
"includeTests": True
}, "bzmcp_your_token_here")
Error Handling
| Code | Meaning | Resolution |
|---|---|---|
| -32700 | Parse error | Check JSON syntax |
| -32600 | Invalid request | Verify request format |
| -32601 | Method not found | Check tool name |
| -32602 | Invalid params | Verify parameters |
| -32603 | Internal error | Contact support |
| -32000 | Auth/execution error | Check token and permissions |
Full Specification
For complete details including:
- All parameter types and descriptions
- Request/response examples for every tool
- Retry policies and exponential backoff
- Concurrency guidelines
See the full MCP API specification or run npx bz-agent init to generate it locally.