Skip to main content
Glama

Playwright IA: Midscene.js

Proyecto de automation con Playwright e inteligencia artificial (Midscene).

  1. Instala dependencias, ejecuta tests y visualiza el reporte para tener un primer vistazo del modo en que opera Midscene.

  2. Configura el MCP Server de Midscene para que automatize lo que le pidas desde un prompt.


📥 Instalación

Instalar dependencias:

npm install
# o
yarn install

Related MCP server: Cloudflare Playwright MCP

▶️ Ejecución de pruebas

Primero exporta tu API_KEY:

#linux
export OPENAI_API_KEY="tu_api_key"

Ejecuta los tests con Playwright y genera un reporte en HTML:

npx playwright test

Si deseas ver el proceso de ejecución:

npx playwright test --headed

📂 Abrir el reporte

Para visualizar el reporte generado, usa el comando:

open midscene_run/report/tu_reporte.html

Se abrirá automáticamente una ventana del navegador con el dashboard de resultados (flujos de MidSceneJS, capturas y trazas).


📂 MidScene: APIs básicas de operación de IA

Usa estas APIs en tus steps para que la IA haga el trabajo.

  • ai o aiAction – Interacción general con IA

  • aiTap – Operación de clic

  • aiHover – Operación de hover (pasar el cursor)

  • aiInput – Operación de entrada de texto

  • aiKeyboardPress – Operación de teclado

  • aiScroll – Operación de desplazamiento

  • aiQuery – Consulta a IA

  • aiAssert – Aserción de IA

  • aiWaitFor – Espera basada en IA

Puedes encontrar más detalles en midscenejs.com/api



🧠 MidScene: MCP Server

Permite usar lenguaje natural para automatizar flujos y generar pruebas con Playwright, utilizando el agente de inteligencia artificial MidScene a través de su MCP Server.


✅ Requisitos

  1. Instala Cursor.

  2. Abre este proyecto con Cursor.

  3. Configura el MCP en Cursor.


⚙️ Configuración del MCP en Cursor

  1. Abre Cursor

  2. Ve a: File > Preferences > Settings

  3. Agrega la siguiente configuración en el apartado MCP:

{
  "mcpServers": {
    "mcp-midscene": {
      "command": "npx",
      "args": ["-y", "@midscene/mcp"],
      "env": {
        "MIDSCENE_MODEL_NAME": "gpt-4o-mini",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "MCP_SERVER_REQUEST_TIMEOUT": "800000"
      }
    }
  }
}
  1. No olvides ingresar tu OPENAI_API_KEY en el json.


🤖 Enviar prompt en Cursor

Abre un chat en Cursor (Ctrl + N) y escribe tu prompt. Por ejemplo:

Usa el MCP de Midscene para:
1. Open page https://practicetestautomation.com/practice-test-login/ 
2. Type username incorrectUser into Username field
3. Type password Password123 into Password field
4. Push Submit button
5. Verify error message is displayed
6. Verify error message text is Your username is invalid!

Al finalizar:
Crea el test case en Playwright con midscene, en la carpeta e2e con nombre login, usa de ejemplo @sauce-demo.spec.ts 
Exporta OPENAI_API_KEY que esta en @mcp.json 
Ejecuta el test npx playwright test e2e/login.spec.ts --headed

Nota: En el prompt, brinda contexto (ej: "@mcp.json"). De esta manera, Midscene encuentra la información necesaria para cumplir tu solicitud con éxito (templates, API_KEYS, etc).

Available Tools

12 tools
midscene_aiAssertA

Asserts that a specified condition, described in natural language, is true on the page. Polls the condition using AI.

ParametersJSON Schema
NameRequiredDescriptionDefault
assertionYesCondition to monitor on the page, described in natural language.

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'polls the condition using AI', which hints at a monitoring action, but lacks details on polling frequency, timeout behavior, success/failure criteria, or whether it modifies page state. This leaves significant gaps for a tool that likely involves waiting or validation.

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 front-loaded and concise, consisting of two sentences that directly explain the tool's function without unnecessary details. Every word contributes to understanding the purpose and method, making it efficient and well-structured.

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

Completeness3/5

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

Given the tool's complexity (AI-based polling for page conditions) and lack of annotations or output schema, the description is minimally adequate. It covers the basic action but omits behavioral details like response format, error handling, or interaction with other tools, leaving room for improvement in completeness.

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 has 100% description coverage, with the single parameter 'assertion' documented as 'Condition to monitor on the page, described in natural language.' The description adds no additional meaning beyond this, such as examples or constraints, so it meets the baseline for high schema coverage.

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 purpose with specific verbs ('asserts', 'polls') and resource ('on the page'), distinguishing it from siblings like midscene_aiHover or midscene_aiTap by focusing on condition verification rather than interaction. It specifies that the condition is described in natural language and uses AI for polling.

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

Usage Guidelines3/5

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

The description implies usage for verifying page conditions via AI polling, but does not explicitly state when to use this tool versus alternatives like midscene_aiWaitFor or midscene_screenshot. No exclusions or prerequisites are mentioned, leaving the context somewhat open-ended.

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

midscene_aiHoverA

Moves the mouse cursor to hover over an element identified by a natural language selector.

ParametersJSON Schema
NameRequiredDescriptionDefault
locateYesUse natural language describe the element to hover over

TDQS

A3.5/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits like whether this requires a visible element, if it waits for the element to appear, what happens on failure, or if it interacts with browser state. For a UI automation tool with zero annotation coverage, this leaves significant gaps.

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 a single, well-structured sentence that efficiently conveys the core functionality without any wasted words. It's appropriately sized and front-loaded with the essential action.

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

Completeness3/5

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

For a single-parameter tool with 100% schema coverage but no annotations or output schema, the description provides the minimum viable explanation of purpose. However, as a UI interaction tool with potential behavioral complexity (e.g., timing, visibility requirements), it should ideally include more context about how the hover operation works.

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?

Schema description coverage is 100%, so the schema already documents the single 'locate' parameter. The description adds no additional meaning beyond what's in the schema (natural language selector for element identification), meeting the baseline for high schema coverage.

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 specific action ('Moves the mouse cursor to hover over') and target ('an element identified by a natural language selector'), distinguishing it from siblings like midscene_aiTap (click) or midscene_aiInput (text entry). It uses precise verb+resource language without tautology.

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

Usage Guidelines3/5

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

The description implies usage for hovering over elements via natural language selectors, but provides no explicit guidance on when to use this tool versus alternatives like midscene_aiTap for clicking or midscene_aiWaitFor for waiting. No exclusions or prerequisites are mentioned.

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

midscene_aiInputC

Inputs text into a specified form field or element identified by a natural language selector.

ParametersJSON Schema
NameRequiredDescriptionDefault
valueYesThe text to input
locateYesDescribe the element to input text into, use natural language

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the action ('inputs text') but lacks critical details: whether this requires a pre-existing active browser session, what happens on failure (e.g., if the element isn't found), or any side effects like page navigation. This is inadequate for a mutation tool with zero annotation coverage.

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 a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part of the sentence contributes directly to understanding the tool's function, making it highly concise and well-structured.

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

Completeness2/5

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

Given the complexity of a UI automation tool with no annotations and no output schema, the description is incomplete. It doesn't address key contextual aspects like error handling, dependencies on other tools (e.g., navigation or tab selection), or what the tool returns upon success. This leaves significant gaps for an agent to operate 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?

Schema description coverage is 100%, so the schema already fully documents both parameters ('value' and 'locate'). The description adds no additional semantic context beyond what's in the schema, such as examples of natural language selectors or formatting tips. Baseline 3 is appropriate when the schema does all the work.

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

Purpose4/5

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

The description clearly states the tool's purpose with a specific verb ('inputs') and resource ('text into a specified form field or element'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'midscene_aiTap' or 'midscene_aiKeyboardPress', which might have overlapping UI interaction purposes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context (e.g., web automation scenarios), or exclusions, leaving the agent to infer usage from the tool name and sibling list alone.

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

midscene_aiKeyboardPressC

Presses a specific key on the keyboard.

ParametersJSON Schema
NameRequiredDescriptionDefault
keyYesThe web key to press, e.g. 'Enter', 'Tab', 'Escape', etc.
locateNoOptional: natural language description of the element to press the key on
deepThinkNoIf true, uses a two-step AI call to precisely locate the element

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('presses') but doesn't clarify if this simulates a physical key press, triggers browser events, requires focus on an element, or has side effects like page navigation. For a tool with potential UI interactions, this is a significant gap in transparency.

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 a single, clear sentence with zero wasted words. It's front-loaded with the core action, making it easy to parse quickly. Every word earns its place by directly conveying the tool's purpose.

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

Completeness2/5

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

Given the complexity of a keyboard interaction tool with no annotations and no output schema, the description is insufficient. It doesn't explain return values, error conditions, or behavioral nuances like whether key presses are simulated in a browser context. For a tool that could affect UI state, more context is needed to ensure safe and effective use.

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?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no additional meaning beyond what's in the schema, such as examples of key combinations or clarification on how 'locate' and 'deepThink' interact. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the action ('presses') and resource ('a specific key on the keyboard'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'midscene_aiTap' or 'midscene_aiInput', which might have overlapping keyboard-related functionality.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'midscene_aiInput' (likely for text input) and 'midscene_aiTap' (likely for clicking), there's no indication of whether this tool is for navigation keys, modifier keys, or general key presses, leaving usage context ambiguous.

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

midscene_aiScrollC

Scrolls the page or a specified element. Can scroll by a fixed amount or until an edge is reached.

ParametersJSON Schema
NameRequiredDescriptionDefault
directionYesThe direction to scroll.
scrollTypeNoType of scroll: 'once' for a fixed distance, or until reaching an edge.once
distanceNoThe distance to scroll in pixels (used with scrollType 'once').
locateNoOptional natural language description of the element to scroll. If not provided, scrolls based on current mouse position.
deepThinkNoIf true and 'locate' is provided, uses a two-step AI call to precisely locate the element.

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions scrolling behavior but lacks critical details: it doesn't specify what happens if scrolling fails, whether it waits for page loads, if it's idempotent, or any performance/rate limit considerations. This is inadequate for a tool with 5 parameters and potential side effects.

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 perfectly concise - two sentences that efficiently cover the core functionality without any redundant information. It's front-loaded with the primary purpose and follows with the key behavioral distinction.

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

Completeness2/5

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

For a tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, or how it interacts with the page state. Given the complexity and lack of structured metadata, more behavioral context is needed.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema - it mentions 'page or a specified element' which relates to the 'locate' parameter, but doesn't provide additional context about parameter interactions or edge cases.

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

Purpose4/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 ('Scrolls the page or a specified element') and distinguishes between two scrolling modes ('by a fixed amount or until an edge is reached'). It uses specific verbs and identifies the resource, though it doesn't explicitly differentiate from sibling tools like navigation or tab management.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'midscene_navigate' for page navigation or 'midscene_aiHover' for element interaction, leaving the agent without context for tool selection.

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

midscene_aiTapC

Locates and clicks an element on the current page based on a natural language description (selector).

ParametersJSON Schema
NameRequiredDescriptionDefault
locateYesUse natural language describe the element to click

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'locates and clicks' an element, implying a mutation action (clicking changes page state), but doesn't disclose potential side effects (e.g., navigation, form submission), error handling (e.g., if element not found), or performance aspects (e.g., timeouts). This is a significant gap for a mutation tool with zero annotation coverage.

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 a single, efficient sentence: 'Locates and clicks an element on the current page based on a natural language description (selector).' It is front-loaded with the core action and includes essential details without waste. Every word earns its place, making it highly concise and well-structured.

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

Completeness2/5

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

Given the tool's complexity (a mutation action on a web page), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral traits like error conditions, side effects, or return values. While the schema covers the parameter well, the overall context for safe and effective use is insufficient, especially compared to siblings that might have overlapping functionalities.

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 has 100% description coverage, with one parameter 'locate' described as 'Use natural language describe the element to click.' The description adds minimal value beyond this, reiterating 'natural language description (selector)' but not providing examples, formatting tips, or constraints. With high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Locates and clicks an element on the current page based on a natural language description (selector).' It specifies the verb ('locates and clicks'), resource ('element on the current page'), and method ('natural language description'). However, it doesn't explicitly differentiate from sibling tools like 'midscene_aiHover' or 'midscene_aiInput', which likely perform similar element interactions but with different actions.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., requires an active page or tab), exclusions (e.g., not for non-clickable elements), or comparisons to siblings like 'midscene_aiHover' for hovering or 'midscene_aiInput' for text input. Usage is implied by the action 'clicks,' but no explicit context is given.

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

midscene_aiWaitForA

Waits until a specified condition, described in natural language, becomes true on the page. Polls the condition using AI.

ParametersJSON Schema
NameRequiredDescriptionDefault
assertionYesCondition to monitor on the page, described in natural language.
timeoutMsNoMaximum time to wait (ms). Default: 15000
checkIntervalMsNoHow often to check the condition (ms). Default: 3000

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: waiting until a condition becomes true, polling with AI, and the tool's reactive nature. However, it does not mention error handling (e.g., what happens if timeout is reached), performance impact of polling, or specific AI model details, leaving some gaps in behavioral understanding.

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 extremely concise (two sentences) and front-loaded with the core purpose. Every sentence earns its place: the first defines the action and condition, the second adds critical behavioral context (AI polling). There is no wasted text or redundancy.

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

Completeness3/5

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

Given no annotations, no output schema, and a tool that performs AI-based polling (moderate complexity), the description is minimally adequate. It covers the purpose and basic behavior but lacks details on return values, error cases, or integration with sibling tools. It meets the minimum viable threshold but has clear gaps for a tool with dynamic behavior.

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?

Schema description coverage is 100%, providing full documentation for all parameters (assertion, timeoutMs, checkIntervalMs). The description adds no additional parameter semantics beyond what the schema already states (e.g., natural language condition, polling intervals). Baseline 3 is appropriate as 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 purpose with specific verbs ('waits until', 'polls') and resource ('condition on the page'), distinguishing it from siblings like midscene_aiAssert (which likely asserts immediately) or midscene_navigate (which changes page location). It explicitly mentions AI-based polling, which is unique among the listed tools.

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 implies usage for waiting on dynamic page conditions, but does not explicitly state when to use it versus alternatives like midscene_aiAssert (for immediate checks) or other waiting mechanisms. It provides clear context (monitoring page conditions) but lacks explicit exclusions or named alternatives.

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

midscene_get_tabsA

Retrieves a list of all open browser tabs, including their ID, title, and URL.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool retrieves tab data, which implies a read-only operation, but doesn't disclose behavioral traits like whether it requires specific browser permissions, if it works across all browser windows, potential rate limits, or what happens if no tabs are open. The description is minimal and lacks important operational context.

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 a single, efficient sentence that front-loads the core purpose ('Retrieves a list of all open browser tabs') and adds valuable specifics ('including their ID, title, and URL'). Every word earns its place with no redundancy or unnecessary elaboration.

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

Completeness3/5

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

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but could be more complete. It explains what the tool does but lacks details on return format (e.g., list structure, error handling) and operational constraints. For a read-only tool with no complex schema, this is minimally viable but leaves gaps.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on what the tool returns. This meets the baseline of 4 for zero-parameter tools.

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 specific action ('Retrieves a list') and resource ('all open browser tabs'), with details on what information is included ('ID, title, and URL'). It distinguishes this read-only listing tool from siblings like 'midscene_set_active_tab' (which modifies tabs) and 'midscene_navigate' (which changes URLs).

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

Usage Guidelines3/5

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

The description implies usage for getting tab information, but doesn't explicitly state when to use this tool versus alternatives. For example, it doesn't clarify if this should be used before 'midscene_set_active_tab' to identify target tabs, or if there are other ways to get tab data. No exclusions or specific contexts are mentioned.

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

midscene_navigateA

Navigates the browser to the specified URL. Always opens in the current tab.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL to navigate to

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the behavioral trait of opening in the current tab, which is useful beyond the basic action. However, it lacks details on error handling, timeouts, or what happens if the URL is invalid, leaving gaps in behavioral context for a navigation 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 extremely concise with two sentences that are front-loaded and waste no words. Every sentence earns its place by stating the core action and a key behavioral constraint, making it efficient and easy to parse.

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

Completeness3/5

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

Given the tool's moderate complexity (navigation with one parameter) and no annotations or output schema, the description is minimally adequate. It covers the basic action and a behavioral trait but lacks details on return values, error cases, or integration with sibling tools, leaving room for improvement in completeness.

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?

Schema description coverage is 100%, with the parameter 'url' fully documented in the schema as 'URL to navigate to.' The description adds no additional meaning or context beyond this, such as URL format requirements or examples, so it meets the baseline for high schema coverage without compensating value.

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 specific action ('navigates') and target resource ('browser to the specified URL'), distinguishing it from sibling tools that perform other browser interactions like clicking, scrolling, or taking screenshots. It explicitly defines the tool's scope as URL navigation.

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 clear context by specifying 'Always opens in the current tab,' which helps differentiate it from tools that might open new tabs or windows. However, it does not explicitly state when to use this versus alternatives like other navigation methods or sibling tools, nor does it mention any prerequisites or exclusions.

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

midscene_playwright_exampleC

Provides Playwright code examples for Midscene. If users need to generate Midscene test cases, they can call this method to get sample Midscene Playwright test cases for generating end-user test cases. Each step must first be verified using the mcp method, and then the final test case is generated based on the playwright example according to the steps executed by mcp

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions a process of verification and generation, but doesn't disclose key behavioral traits such as whether this is a read-only operation, if it requires authentication, rate limits, or what the output format looks like (e.g., code snippets, structured data). This leaves significant gaps in understanding how the tool behaves.

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

Conciseness3/5

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

The description is two sentences but includes some redundancy (e.g., repeating 'Midscene test cases') and could be more front-loaded; the second sentence elaborates on process details that might be better integrated. It's not overly verbose, but the structure could be tighter to improve clarity without losing essential information.

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

Completeness2/5

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

Given no annotations, no output schema, and a tool that involves code generation and verification processes, the description is incomplete. It lacks details on return values (e.g., what the examples look like), error handling, or prerequisites, making it insufficient for an AI agent to fully understand how to invoke and use this tool effectively.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add param info, which is appropriate here. Baseline is 4 since no parameters exist, and the description doesn't contradict or confuse this aspect.

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

Purpose3/5

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

The description states the tool 'Provides Playwright code examples for Midscene' and mentions generating test cases, which gives a general purpose. However, it doesn't specify what kind of examples (e.g., UI interactions, navigation) or how they differ from the sibling tools like midscene_aiAssert or midscene_aiInput, making it somewhat vague rather than clearly distinct.

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

Usage Guidelines3/5

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

The description implies usage when 'users need to generate Midscene test cases' and mentions a process involving verification with 'mcp method' and generating based on steps. However, it doesn't explicitly state when to use this tool versus alternatives like the sibling AI tools (e.g., midscene_aiAssert for assertions) or provide clear exclusions, leaving usage context implied rather than explicit.

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

midscene_screenshotB

Captures a screenshot of the currently active browser tab and saves it with the given name.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName for the screenshot

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the action ('Captures') and outcome ('saves it'), but lacks details on permissions needed, file format, save location, error handling, or whether it's a read-only or destructive operation. This leaves significant gaps for an agent to understand the tool's behavior.

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 a single, well-structured sentence that efficiently conveys the core functionality without unnecessary words. It's front-loaded with the main action and resource, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that performs a capture and save operation. It doesn't address behavioral aspects like what happens on failure, where the screenshot is saved, or what the return value is. For a tool with potential side effects, this leaves too many unknowns.

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 description adds minimal semantics beyond the input schema, which has 100% coverage for the single parameter 'name'. It clarifies that the name is used for saving the screenshot, but doesn't provide format constraints or examples. With high schema coverage, the baseline score of 3 is appropriate as the schema does most of the work.

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 specific action ('Captures a screenshot') and resource ('currently active browser tab'), distinguishing it from sibling tools like navigation or interaction tools. It precisely communicates what the tool does without ambiguity.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active browser tab), exclusions, or comparisons to other screenshot-related tools that might exist. Usage context is implied but not explicitly stated.

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

midscene_set_active_tabA

Switches the browser's focus to the tab specified by its ID. Use midscene_get_tabs first to find the correct tab ID.

ParametersJSON Schema
NameRequiredDescriptionDefault
tabIdYesThe ID of the tab to set as active.

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It describes the core behavior (switching focus to a tab) but lacks details about potential side effects (e.g., whether this triggers page reloads, visibility changes, or requires specific browser states), error conditions, or response format. It adds basic context but misses deeper behavioral traits.

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 two sentences with zero waste: the first states the purpose, and the second provides essential usage guidance. It's appropriately sized and front-loaded with the core functionality.

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?

Given the tool's moderate complexity (single parameter, no output schema, no annotations), the description is reasonably complete: it explains what the tool does, how to use it with a sibling tool, and the parameter purpose indirectly. However, it lacks details on behavioral aspects like error handling or effects, leaving some gaps for a mutation tool.

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?

Schema description coverage is 100%, so the schema already fully documents the single parameter (tabId). The description doesn't add any additional meaning about the parameter beyond what the schema provides (e.g., format examples, validation rules, or source context beyond the sibling tool reference). Baseline 3 is appropriate when 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 specific action ('Switches the browser's focus') and resource ('to the tab specified by its ID'), distinguishing it from sibling tools like midscene_get_tabs (which finds tabs) and midscene_navigate (which navigates pages). It provides a precise verb+resource combination.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('Use midscene_get_tabs first to find the correct tab ID'), providing a clear prerequisite and alternative tool reference. This gives the agent direct guidance on the workflow sequence.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 12 tool updates
    • First observedmidscene_aiAssert
    • First observedmidscene_aiHover
    • First observedmidscene_aiInput
    • First observedmidscene_aiKeyboardPress
    • First observedmidscene_aiScroll
    • First observedmidscene_aiTap
    • First observedmidscene_aiWaitFor
    • First observedmidscene_get_tabs
    • First observedmidscene_navigate
    • First observedmidscene_playwright_example
    • First observedmidscene_screenshot
    • First observedmidscene_set_active_tab

TDQS

A3.7/5.0

Scored across 12 tools

Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap. For example, midscene_aiAssert checks conditions, midscene_aiHover hovers over elements, and midscene_aiInput inputs text, all targeting different actions in browser automation. The tools are well-defined and unlikely to cause misselection.

Naming Consistency5/5

All tools follow a consistent 'midscene_' prefix and snake_case pattern, with clear verb_noun combinations like aiAssert, aiHover, and get_tabs. This predictability makes it easy for agents to understand and use the toolset without confusion.

Tool Count5/5

With 12 tools, the count is well-scoped for browser automation and testing. It covers core actions like navigation, interaction, waiting, and tab management, with each tool earning its place without being excessive or insufficient for the domain.

Completeness4/5

The toolset provides comprehensive coverage for browser automation, including navigation, element interaction, condition checking, and tab management. A minor gap is the lack of tools for handling browser contexts or windows, but core workflows are fully supported, allowing agents to perform most common tasks effectively.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers