The Swagger Functional Testing client provides tools for discovering, creating, and executing API tests and test Suites. Tools for Swagger Functional Testing require a SWAGGER_FUNCTIONAL_TESTING_API_TOKEN.
Available Tools
All tools listed below are only available through the Local MCP Server. They are not available on the Remote MCP Server.
Tests
swagger_list_tests
swagger_list_tests- Purpose: Lists all API tests available in your Swagger Functional Testing account. Use this tool to discover available tests before running them or checking their status. Do not use this tool to retrieve test execution results or history.
- Returns: A list of tests with their IDs and names. When no tests exist, the list is empty. Test IDs can be passed to
swagger_run_testor used to build a Suite viaswagger_create_suite. - Use case: Discover available tests.
swagger_create_test
swagger_create_testPurpose: Creates a new API test in your Swagger Functional Testing workspace. Use this tool to create an end-to-end API test, either from an existing API spec or by directly providing the request steps. Each step requires a URL and may specify:
- HTTP method (defaults to
GET) - Request body and headers
- Whether to follow redirects
- Assertions: expected HTTP status code ranges, and body assertions evaluated against the response body (exact match, or field-level rules matched by path using operators:
eq,lt,gt,lte,gte,contains)
Every step must set
baseUrlto the endpoint's server/common URL (extracted into a shared parameter), and should setapiNameto the name of the API it belongs to. A step's URL may include OAS-style{pathParam}placeholders — if the same placeholder appears in more than one step, it must be defined in the top-levelparametersarray so its value is shared. The top-levelparametersarray only accepts path and base-URL parameters, not request body parameters.- HTTP method (defaults to
Returns: The created test
idand aurlto the test definition. Theidcan be passed toswagger_run_testto execute it, or included in a Suite viaswagger_create_suite.Use case: Create an API test with request steps, optional response assertions, and shared path/base-URL parameters.
swagger_run_test
swagger_run_test- Purpose: Runs a specific API test in your Swagger Functional Testing workspace. Execution is asynchronous — the tool returns an
executionId, not the result directly. Useswagger_get_test_statuswith thatexecutionIdto poll for progress and retrieve the final result. Requires atestId, which can be obtained fromswagger_list_tests. - Returns: Run details including an
executionIdused to poll for the result. - Use case: Trigger a test run against your API.
swagger_get_test_status
swagger_get_test_status- Purpose: Retrieves the status and result of a previously triggered test execution. Use this tool to check whether a test run has completed and whether it passed or failed. Requires an
executionIdreturned byswagger_run_test. Poll until status ispassedorfailed; a status ofrunningmeans the execution is still in progress. - Returns: Execution status (
running,passed, orfailed), run time, and a per-step breakdown of results. - Use case: Poll for the outcome of a test run after calling
swagger_run_test.
swagger_get_test_history
swagger_get_test_history- Purpose: Retrieves the execution history for a given test in your Swagger Functional Testing workspace. Use this tool to check past run results, identify failures, or assess test reliability over time. Do not use this tool to run a test or retrieve suite-level execution results. Requires a
testId. Supports pagination vialimit(1–100, default 25) andoffset(default 0). - Returns: Total run count and a list of past runs, each including pass/fail status, run time, creation timestamp, and — for failed runs — a per-step breakdown of failure details.
- Use case: Review past run results and assess test reliability over time.
Suites
swagger_list_suites
swagger_list_suites- Purpose: Lists all test Suites available in your Swagger Functional Testing workspace. Use this tool to discover available Suites before running them or checking their execution history. Do not use this tool to retrieve individual tests or Suite execution results.
- Returns: An object with a
suitesarray. Each Suite includes itsslug, which identifies it for other Suite tools (e.g.swagger_run_suite). When no Suites exist, thesuitesarray is empty ({ "suites": [] }). - Use case: Discover available test Suites.
swagger_create_suite
swagger_create_suitePurpose: Creates a new test Suite in your Swagger Functional Testing workspace by grouping existing tests into ordered blocks for collective execution. Requires a
nameand one or morerunApiTestsblocks, each with a non-emptytestIdsarray (fromswagger_list_tests). Blocks always run one after another; within a block, tests run sequentially by default. Each block may optionally set:parallel— run the block's tests in parallel instead of sequentially (defaultfalse)maxRetryAttempts— retry a block's failed tests before they count as failed, 0–3 (default: no retry)title— a label that must be unique across the Suite's blocks
Optionally accepts
agentNameto save a tunnel agent override for future runs of the Suite.Returns: The created Suite's
slugandurl. Theslugidentifies the Suite for other Suite tools (e.g.swagger_run_suite).Use case: Group existing tests into a Suite, optionally with parallel/sequential blocks and retry behavior, for collective execution.
swagger_run_suite
swagger_run_suite- Purpose: Runs a specific test Suite in your Swagger Functional Testing workspace. Execution is asynchronous — the tool returns an
executionId, not results directly. Useswagger_get_suite_statuswith the Suite'sslugand theexecutionIdto poll for progress and retrieve per-test results. Requires the Suite'sslug(fromswagger_create_suiteorswagger_list_suites). Optionally acceptstunnelAgentNameto override the Suite's saved tunnel for this run; when omitted, the Suite's saved tunnel is used. Do not use this tool to run a single test — useswagger_run_testinstead. - Returns: Run details including
executionIdand current status. Use bothslugandexecutionIdwithswagger_get_suite_statusto poll the result. - Use case: Trigger a Suite run that exercises every test it contains.
swagger_get_suite_status
swagger_get_suite_status- Purpose: Retrieves the status and per-test result of a triggered Suite execution. Requires the
slugof your test Suite and theexecutionIdreturned byswagger_run_suite.pendingmeans the execution has not started yet. Poll untilfinishedistrue. - Returns: Execution details including
executionId, overall status (pending,canceled,passed, orfailed), whether the run is finished, and a per-test breakdown with status, runtime, and number of steps. - Use case: Poll for the outcome of a Suite run after calling
swagger_run_suite.
swagger_list_suite_executions
swagger_list_suite_executions- Purpose: Lists all executions for a given test Suite in your Swagger Functional Testing workspace. Use this tool to review execution history and timings for a specific Suite. Do not use this tool to retrieve the status of a single execution or individual test results. Requires the Suite's
slug. - Returns: Complete list of executions for the given Suite. An empty list is returned when no executions exist.
- Use case: Review the execution history and timings of a test Suite.
swagger_cancel_suite_execution
swagger_cancel_suite_execution- Purpose: Cancels an ongoing test Suite execution in your Swagger Functional Testing workspace. Use this tool to stop a long-running or accidentally triggered Suite run. The canceled execution is preserved in run history with status
canceled. Do not use this tool to cancel individual test runs. Requires the Suite'sslugand anexecutionId. - Returns: Confirmation of the cancellation with the updated execution record.
- Use case: Stop a long-running or accidentally triggered Suite run.
Additional Notes
- The
SWAGGER_FUNCTIONAL_TESTING_API_TOKENenvironment variable is required to authenticate with the Swagger Functional Testing API. - The optional
SWAGGER_FUNCTIONAL_TESTING_BASE_PATHenvironment variable allows overriding the Swagger Functional Testing API base URL. Defaults tohttps://api.reflect.run/v1.