Skip to main content

MCP API Reference

Full specification with all parameters

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​

  1. Log into Boozang at https://ai.boozang.com
  2. Open your project and go to Edit Project
  3. Check Enable MCP API (LLM access)
  4. Under API Tokens, enter a token name and select the access level (Read or Write)
  5. 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:

ScopeAccess
readThe tools marked read in the tables below
writeAll 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​

ToolScopeDescriptionParameters
getModulesreadRetrieve list of modules in the current project/versionprojectId, versionId, includeTests
createModulewriteCreate a new module in the current project/versionname, projectId, versionId*, parentModule, comment
editModulewriteUpdate an existing module's propertiesmoduleCode, projectId, versionId*, name, comment, tag
deleteModulewriteDelete an existing module from the project/versionmoduleCode, projectId, versionId*

Model Tools​

ToolScopeDescriptionParameters
getModelFieldsreadList 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
editModelFieldwriteChange 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
editModelFormwriteReplace 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
getModelTemplatesreadList 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
editModelTemplatewriteChange a model template's path or preSteps/endSteps, which every model item using it takes (getModelTemplates lists them).projectId, versionId, templateCode*, path, preSteps, endSteps
editModelScenariowriteReplace 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​

ToolScopeDescriptionParameters
getStoredScreenshotreadFetch a failure screenshot stored by a test run, by the id the runner logs ("Screenshot:<id>" in Jenkins/worker logs).projectId, name*
getStoredReportreadRead 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​

ToolScopeDescriptionParameters
getEnvironmentsreadRetrieve list of environments in the current project/versionprojectId, versionId
createEnvironmentwriteCreate a new environment.name, projectId, versionId*, index, overwrite, items
editEnvironmentwriteUpdate an existing environment's propertiesenvironmentIndex, projectId, versionId*, name, items
deleteEnvironmentwriteDelete an existing environment from the project/versionenvironmentIndex, projectId, versionId*
provisionEnvironmentswriteProvision environments and app interfaces from configurationprojectId, versionId, config

IDE Control Tools​

ToolScopeDescriptionParameters
getIDEStatereadGet the current state of the IDE (open project, module, test)—
navigateTowriteNavigate the IDE to a specific module or testmoduleId*, testId, actionIndex
runTestwriteRun a test in the IDE and return the result.moduleId, testId, fromAction, waitSeconds
getPageInforeadGet current AUT (Application Under Test) page URL, title, and readyState—
getPageElementsreadExtract interactive elements from the AUT page (inputs, buttons, links, etc.)selector, types, maxElements
getScreenshotreadCapture the visible AUT viewport (or one element) as an image.selector, format, quality, maxWidth
setBreakpointwriteSet or clear a breakpoint on a specific action in the IDEmoduleId, testId, actionIndex*, enabled
getAppUrlwriteGet the current URL of the AUT (Application Under Test) page—
openAppWindowwriteOpen the AUT (Application Under Test) window, same as the IDE's "Open App Window" button.—
refreshPagewriteReload the AUT (Application Under Test) page in the browser—
navigateUrlwriteNavigate the AUT (Application Under Test) to a specific URLurl*
clearBreakpointswriteClear all breakpoints in the IDE—
waitForPageReadywriteWait for the AUT page to finish loading (document.readyState === "complete")timeout
stopTestwriteStop the currently running test in the IDE—
getTestResultswriteGet the results from the last test run (passed, failed, total, actions, duration).—
getConsoleLogwriteGet console log messages from the IDE (last N entries, optionally filtered).limit, filter, since, until
getBreakpointswriteList all breakpoints currently set in the IDE—
pauseTestwritePause the currently running test in the IDE—
resumeTestwriteResume a paused test (e.g. after hitting a breakpoint).—
getTestStatuswriteCheck if a test is currently running, paused, or idle, and get current module/test info.—
getIDEUrlwriteGet the current IDE URL including query parameters (token, env, group, filter, scope, etc.) and hash—
setIDEUrlwriteNavigate the IDE to a new URL (triggers full page reload — socket will disconnect and reconnect)url, params
getIDETestActionsreadGet the actions of a test as currently loaded in the IDE (what the runner will execute), including group loopData/groupType/conditionAction.moduleCode, testCode
getRuntimeContextreadSnapshot of the test runner variables ($parameter, $loop, $group, $action, $test) and current test key, as seen by loopData/scripts.—

Test Tools​

ToolScopeDescriptionParameters
getTestsreadRetrieve list of tests in a moduleprojectId, versionId, moduleCode*
createTestwriteCreate a new test in a moduleprojectId, versionId, moduleCode, name, type, subtype, description, tag, comment, url
editTestwriteUpdate an existing test's propertiesprojectId, versionId, moduleCode, testCode, name, type, subtype, description, tag, comment
deleteTestwriteDelete a test and its associated documentprojectId, versionId, moduleCode, testCode
plugTestwritePlug 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​

ToolScopeDescriptionParameters
getActionsreadRetrieve actions for a testprojectId, versionId, moduleCode, testCode
createActionwriteAdd a new action to a testprojectId, versionId, moduleCode, testCode, type*, element, event, method, content, compareMark, expectation, description, position, groupKey, failedReaction, refOfSuccess, refOfFailed, refOfError, groupType, conditionAction, loopData, withEntry, withSubmit, max, min
editActionwriteUpdate an existing action in a testprojectId, versionId, moduleCode, testCode, actionKey*, type, element, event, description, disable, preScript, resultscript, failedReaction, refOfSuccess, refOfFailed, refOfError, groupType, conditionAction, loopData, withEntry, withSubmit, max, min
deleteActionwriteRemove an action from a testprojectId, versionId, moduleCode, testCode, actionKey*
moveActionwriteMove an action (with all its fields) into a group, out to the top level, or to another positionprojectId, versionId, moduleCode, testCode, actionKey*, groupKey, position

Auth Config Tools​

ToolScopeDescriptionParameters
getAuthConfigreadGet auth configuration for all hosts in a project versionprojectId, versionId
configureAuthwriteEnable/disable auth for a host and set auth module referenceprojectId, versionId, hostIndex*, enabled, module, tokenKey, token

Settings Tools​

ToolScopeDescriptionParameters
getSettingsreadGet 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*
editSettingswriteChange the version's IDE settings.projectId, versionId*, content, advanced

Page Inspection and Authoring Tools​

ToolScopeDescriptionParameters
resolveSelectorreadTest an NLP selector path against the live AUT page.selector*
getPageDOMreadGet a structured DOM tree of the AUT page.rootSelector, maxDepth, includeHidden
clickElementwriteClick an element in the AUT using an NLP selector.selector*, waitAfter
fillElementwriteSet a value on an input/select/textarea in the AUT using an NLP selector.selector, value, append
evaluateInAppwriteExecute a JavaScript expression in the AUT (Application Under Test) window and return the result.expression*, timeout
scanPagereadDiscover 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​

CodeMeaningResolution
-32700Parse errorCheck JSON syntax
-32600Invalid requestVerify request format
-32601Method not foundCheck tool name
-32602Invalid paramsVerify parameters
-32603Internal errorContact support
-32000Auth/execution errorCheck 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.