Server & Tools

MCP server entry point and tool implementations.

curate_ipsum.server.build_server()[source]
Return type:

mcp.server.fastmcp.FastMCP

curate_ipsum.server.main()[source]
Return type:

None

class curate_ipsum.tools.CommandResult(exit_code: 'int', stdout: 'str', stderr: 'str', duration_ms: 'int', timed_out: 'bool' = False)[source]

Bases: object

Parameters:
exit_code: int
stdout: str
stderr: str
duration_ms: int
timed_out: bool = False
async curate_ipsum.tools.run_command(command, working_directory, timeout=None)[source]

Run a shell command and capture stdout, stderr, exit code, and duration.

Parameters:
  • command (str)

  • working_directory (str)

  • timeout (float | None)

Return type:

CommandResult

curate_ipsum.tools.append_run(run)[source]

Append a run result to storage.

Primary: JSONL file (runs.jsonl) Secondary: BRS CASStore (if enabled and py-brs installed)

Parameters:

run (TestRunResult | MutationRunResult)

Return type:

None

curate_ipsum.tools.get_run_history(project_id, region_id, limit)[source]
Parameters:
  • project_id (str)

  • region_id (str | None)

  • limit (int | None)

Return type:

RunHistory

curate_ipsum.tools.parse_test_output(stdout, stderr)[source]
Parameters:
Return type:

tuple[int, int, int, list[str]]

curate_ipsum.tools.parse_stryker_output(report_path, working_directory)[source]
Parameters:
  • report_path (str | None)

  • working_directory (str)

Return type:

tuple[int, int, int, int, float, list[FileMutationStats]]

curate_ipsum.tools.compute_region_metrics(project_id, commit_sha, region_id, history)[source]
Parameters:
Return type:

RegionMetrics

async curate_ipsum.tools.run_unit_tests(projectId, commitSha, command, workingDirectory, regionId=None, framework='generic')[source]
Parameters:
  • projectId (str)

  • commitSha (str)

  • command (str)

  • workingDirectory (str)

  • regionId (str | None)

  • framework (str)

Return type:

TestRunResult

async curate_ipsum.tools.run_integration_tests(projectId, commitSha, command, workingDirectory, regionId=None, framework='generic')[source]
Parameters:
  • projectId (str)

  • commitSha (str)

  • command (str)

  • workingDirectory (str)

  • regionId (str | None)

  • framework (str)

Return type:

TestRunResult

async curate_ipsum.tools.run_mutation_tests(projectId, commitSha, command, workingDirectory, regionId=None, tool=None, reportPath=None)[source]

Run mutation tests and parse results.

If tool is not specified, auto-detects based on project structure and available mutation output.

Parameters:
  • projectId (str)

  • commitSha (str)

  • command (str)

  • workingDirectory (str)

  • regionId (str | None)

  • tool (str | None)

  • reportPath (str | None)

Return type:

MutationRunResult

curate_ipsum.tools.history_tool(projectId, regionId=None, limit=None)[source]
Parameters:
  • projectId (str)

  • regionId (str | None)

  • limit (int | None)

Return type:

RunHistory

curate_ipsum.tools.region_metrics_tool(projectId, commitSha, regionId)[source]
Parameters:
  • projectId (str)

  • commitSha (str)

  • regionId (str)

Return type:

RegionMetrics