Skip to main content
Glama
mcpland
by mcpland

execute_test_step

Execute JavaScript/TypeScript in a live test environment to inspect updated DOM state and console logs, enabling interactive debugging of integration tests.

Instructions

Execute code directly in the connected test client and get back the updated DOM state and console logs. IMPORTANT: Before using this tool, call get_current_test_state first to check the 'availableContext' field, which lists all available APIs/variables you can use in your code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe JavaScript/TypeScript code to execute in the test environment. You can use any APIs/variables listed in the 'availableContext' field from get_current_test_state (e.g., screen, fireEvent, waitFor, userEvent, etc.). The code should only reference variables that are available in availableContext.
testFileNoOptional: specific test file (uses current if not provided)
testNameNoOptional: specific test name (uses current if not provided)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the return values (updated DOM state and console logs) and the dependency on availableContext, but it does not mention potential side effects of executing arbitrary code, error handling, or whether the tool requires specific permissions. This is moderate transparency for an execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured. The first sentence states the core action and outputs; the second sentence delivers a critical usage caution. No redundancy or filler, and the most important operational detail (checking availableContext) is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a code execution tool with no output schema, the description summarizes key outputs (DOM state, console logs) and the essential prerequisite. It lacks detailed return formatting or failure behavior, but the provided context is sufficient for a competent agent to begin using the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema provides 100% coverage, describing the code parameter and its dependency on availableContext, plus optional testFile and testName. The description adds little beyond the schema, only reiterating the availableContext requirement. Baseline 3 applies because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Execute code directly in the connected test client and get back the updated DOM state and console logs.' This is a specific verb+resource pairing that distinguishes it from siblings like get_current_test_state (which retrieves state) and finalize_test (which likely closes or completes a test).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides an explicit usage prerequisite: 'Before using this tool, call get_current_test_state first to check the availableContext field.' It gives clear context on when to use the tool and what to do first, though it does not explicitly contrast it with alternative tools or state when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcpland/testing-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server