Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

Generate Test Recording Report

test-record-report
Idempotent

Turn recorded test steps into a formatted markdown report with screenshots, assertions, and summary totals. Use it to document and share test results.

Instructions

test-record-report

Generate a markdown report from a recorded test session created by test-record-step.

What it does

Reads the session's steps.json and produces a structured report.md file:

  • Header with test name, date, step count, and duration

  • Per-step sections with screenshot image links, assertions, metadata, and element counts

  • Summary section with totals

The report is written to <recordingsRoot>/<sessionName>/report.md and also returned in the response for immediate consumption.

Parameters

  • sessionName (string, required): Session name matching prior test-record-step calls

  • testName (string, optional): Title for the report (defaults to sessionName)

Returns

JSON with { sessionName, testName, reportPath, stepCount, markdown } plus guidance. Throws McpError InvalidRequest if session or steps are missing.

Examples

Basic report

await testRecordReportTool({ sessionName: "login-flow" })

Named report

await testRecordReportTool({
  sessionName: "login-flow",
  testName: "Login Flow — Happy Path"
})

Typical Workflow

  1. test-record-step({ sessionName: "my-test", label: "App launched" })

  2. test-record-step({ sessionName: "my-test", label: "Login tapped", assertion: "Login form visible" })

  3. test-record-step({ sessionName: "my-test", label: "Logged in", metadata: { user: "test@example.com" } })

  4. test-record-report({ sessionName: "my-test", testName: "Login Flow" })

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
testNameNoReport title (defaults to sessionName)
sessionNameYesRecording session name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses key behavioral traits: it reads steps.json, writes report.md to a specific path, returns structured JSON, and throws McpError InvalidRequest for missing sessions/steps. This adds real operational context without contradicting the idempotentHint or readOnlyHint annotations.

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

Conciseness4/5

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

The description is well-structured with clear sections: what it does, parameters, returns, examples, and workflow. It is longer than necessary but each section serves a purpose. Some redundancy exists between the examples and typical workflow, but overall the organization is helpful and front-loaded.

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

Completeness5/5

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

There is no output schema, but the description compensates by explicitly listing the return JSON fields and error behavior. It also covers the write side effect and target path, making the tool fully callable without external documentation. Given only two simple parameters, nothing essential is missing.

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%, so the baseline is 3, but the description adds meaningful semantics: sessionName must match a prior test-record-step call, and testName defaults to sessionName. The named examples with concrete values further clarify both parameters beyond the schema's brief descriptions.

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 states a specific verb and resource: 'Generate a markdown report from a recorded test session created by test-record-step.' It clearly distinguishes the tool from its sibling test-record-step by positioning it as the final report-generation step in a recording workflow.

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 clearly establishes when to use the tool: after test-record-step calls, using a sessionName that matches prior calls. It provides a 'Typical Workflow' sequence and examples. However, it does not explicitly name alternatives or when-not-to-use scenarios, though no direct alternative report tool is apparent among siblings.

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