Skip to main content
Glama

test_audit

Audit Playwright test code for quality issues and receive actionable recommendations to improve reliability and maintainability.

Instructions

TestDino-backed Playwright test quality audit. This tool is a NAMED CAPABILITY, not a style of output — when the user invokes it, you MUST call this tool, not simulate it in chat. === TRIGGER PHRASES (explicit TestDino naming) === Any of the following REQUIRES an immediate tool call: 'TestDino test audit', 'Testdino Test Audit', 'Testdino audit', 'TestDino MCP audit', 'run a TestDino test audit', 'audit this with TestDino', 'I need a TestDino audit', 'TestDino audit on ', 'testdino test audit on this'. Case-insensitive. Typos like 'testdino', 'test dino', 'TD audit' with context also qualify. === MANDATORY BEHAVIOR WHEN TRIGGERED === The moment you detect a TestDino trigger phrase AND the target is Playwright test code, your FIRST and IMMEDIATE action MUST be to call this tool with action='analyze'. Before that tool call returns: - DO NOT write any audit content in chat. - DO NOT produce a header like 'TestDino Test Audit — '. - DO NOT list findings, score, severity, or recommendations. - DO NOT describe the file in audit-report language. - DO NOT simulate the TestDino audit output from your own knowledge. - Doing any of the above without calling the tool is a PROTOCOL VIOLATION — you are claiming to run a TestDino audit without actually running it. TestDino audits require the server-curated audit prompt and branch signals returned by action='analyze'; you do not have those without the tool call. The only valid first step is: test_audit(action='analyze', projectId=). Branch is OPTIONAL — pass it only if the user named one or git auto-detects it; otherwise omit it and proceed with the audit anyway (do not ask the user for a branch). Resolve projectId via health() if you don't already have it. Only AFTER that call returns do you read the local Playwright code (guided by the returned prompt + branch signals), build the audit markdown locally, and submit it via a second tool call. === PLAYWRIGHT GATE === The target code MUST be Playwright. Detect via @playwright/test imports, Playwright APIs (page./browser./context./locator(/test(/test.describe(/test.beforeEach(/test.step(/expect(page)/browserName/storageState/test.extend(), playwright.config.*, or .spec.ts/.spec.js/.test.ts/.test.js files using those APIs. If the user names TestDino but the target is NOT Playwright, politely explain TestDino's test audit only covers Playwright automated test code and offer a regular (non-TestDino) audit instead — DO NOT call the tool in that case. === WHEN NOT TO CALL THIS TOOL === If the user asks for a generic 'audit', 'test audit', 'code audit', 'security audit', 'accessibility audit', 'review', etc. WITHOUT explicitly naming TestDino, DO NOT call this tool — even if the target is Playwright test code. Those are normal AI-agent audits: read the target, write findings directly in chat. Do NOT mention TestDino, do NOT offer TestDino, do NOT say 'I can run a TestDino audit instead'. Behave as a plain AI assistant with no TestDino MCP installed. === FULL FLOW (Playwright + TestDino explicitly named) === Step 1 (IMMEDIATE): test_audit(action='analyze', projectId=..., branch=...) — no score, no findings, no markdownReport on this call. This is the mandatory first action. Step 2: Using the prompt and branch signals returned from Step 1, analyze the local Playwright test code and write the full markdown audit report to a local file (e.g. TEST-AUDIT.md). Step 3: test_audit(action='analyze', markdownReportPath=<path from Step 2>, score=..., findings=[...], recommendations=[...], reportName=...) — submits to TestDino. Scope: use 'feature' or 'spec_file' when the user names a slice like auth/login. If analyze fails with project/auth access errors, resolve projectId with health() before retrying — never fabricate a fallback pseudo-audit. Other actions: action='list' browses past submitted reports (optionally filtered by branch); action='get' retrieves a specific submitted report.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesProject ID (Required). The TestDino project identifier.
actionYesAction to perform. 'analyze' fetches the audit context (prompt + signals) — after analyzing, call this tool again with the report fields to submit. 'list' shows past reports. 'get' retrieves a specific report.
branchNoGit branch to scope the audit to. Optional — if omitted and not auto-detected from git, the audit still proceeds without a branch. Do not prompt the user for a branch; just call the tool without it. Also acts as a filter for 'list'.
scopeNoAudit scope. Defaults to 'suite'. Use 'feature' or 'spec_file' when the user names a slice such as auth/login, dashboards, or a specific spec.
targetNoStructured audit target, such as spec path or feature area. Pass this when the user asks for a scoped audit so the report stays centered on that slice.
reportNameNoA short, human-readable name for the audit report (e.g. 'Login Flow Tests', 'API Integration Suite'). Displayed as the report title in the dashboard. Include when submitting a completed report.
scoreNoAudit score (0-100). Include when submitting a completed report.
findingsNoArray of findings. Each should have: title, category, severity (critical/high/medium/low), summary, recommendation, and evidence (file, lineStart, lineEnd, observation). category must be one of: surface_level_tests, missing_validation, stability_issues, hard_to_maintain, coverage_gaps, organization_ownership, setup_configuration, duplication_overlap, other. Optional: subCategory.
recommendationsNoArray of recommendation strings.
markdownReportNoThe complete markdown report content. Prefer using markdownReportPath instead to avoid large tool calls.
markdownReportPathNoPath to a local markdown file to read for submission. Use a relative path from the workspace (see TESTDINO_MCP_WORKSPACE), or an absolute path. Preferred over markdownReport.
reportIdNoReport ID for action='get'.
limitNoPage size for action='list'.
pageNoPage number for action='list'.
writeMarkdownNoWhen true, write the markdown report to a local file.
outputPathNoRelative file path for writing the report; resolved from TESTDINO_MCP_WORKSPACE if set, else process.cwd(). Defaults to TEST-AUDIT.md.
Behavior5/5

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

With no annotations, the description fully discloses the tool's mandatory behavior: must call the tool first, cannot simulate in chat, and outlines protocol violations. It explains the two-step process and the need for server-curated prompt.

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 very lengthy and detailed, with many sections and bullet points. While every sentence is necessary for precise behavior, it could be more structured with headings or bullet lists. However, the detail is justified given the tool's complexity.

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 16 parameters, nested objects, and no output schema, the description covers all key aspects: trigger conditions, Playwright gate, full flow, and fallback behavior. Minor gap: doesn't explicitly describe the structure of the 'analyze' response (prompt+signals) beyond mention.

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?

Schema coverage is 100%, but the description adds significant context: clarifies `action` values, explains `branch` optionality, `scope` defaults, and recommends `markdownReportPath` over `markdownReport`. Adds value beyond the schema.

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 it performs a 'TestDino-backed Playwright test quality audit.' It distinguishes from sibling tools by focusing on audit functionality, not manual test or release management. The trigger phrases and Playwright gate ensure precise invocation.

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?

Explicitly details when to call (TestDino trigger + Playwright code), when NOT to call (generic audits without TestDino naming), and alternatives (regular audit for non-Playwright or non-TestDino requests). Includes a full step-by-step workflow.

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/testdino-hq/testdino-mcp'

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