MCP004 Get test by IDΒΆ

mcp | tools mcp | query

I would like to retrieve the full details of a functional test when I know its ID. This helps me understand test procedures, what requirements they validate, and what steps are involved before suggesting modifications or creating similar tests.

The user shall be able to query a test by its unique identifier.

The MCP server shall expose a tool named get_test that accepts a test ID as a string parameter and returns the full test details.

The response shall include all available fields:

  • id: The unique identifier

  • short: The short description (if present)

  • long: The full description

  • ref: List of requirement IDs this test validates

  • source_file: Path to the specification file this test was loaded from

  • initial: Initial state description (if present)

  • prereq: List of prerequisite test IDs (if present)

  • steps: List of test steps, each containing:

    • action: The action description

    • run: Shell command to execute (if present)

    • expected: Expected output (if present)

    • sample: Sample data (if present)

    • sample_lang: Language of sample data (if present)

  • comments: List of comments about this test (if any)

  • code_references: List of code locations tagged with this test ID (if any), each with file, line, symbol (or null for free references), and is_test (whether the tagged symbol is an automated test implementation)

If the test ID does not exist, the tool shall return an error message.

Properties

author: Claude

since: 0.2.0

Tested by
Source

Source file: specs/mcp/query.yaml

Loaded from: speky_mcp

Implemented in: handle_get_test