@testledger/mcp 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +36 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
+ // Test Results MCP Server
5
6
  // Configuration from environment
6
7
  const API_BASE_URL = process.env.TEST_LEDGER_API_URL;
7
8
  const API_KEY = process.env.TEST_LEDGER_API_KEY || "";
@@ -256,6 +257,38 @@ const tools = [
256
257
  required: ["spec_file"],
257
258
  },
258
259
  },
260
+ {
261
+ name: "get_failure_screenshots",
262
+ description: "Get screenshots from recent test failures. Returns presigned S3 URLs that can be viewed with the Read tool to see exactly what the UI looked like when the test failed.",
263
+ inputSchema: {
264
+ type: "object",
265
+ properties: {
266
+ spec_file: {
267
+ type: "string",
268
+ description: "The spec file path (e.g., 'login.spec.js')",
269
+ },
270
+ test_title: {
271
+ type: "string",
272
+ description: "Specific test title to filter by (optional)",
273
+ },
274
+ project_id: {
275
+ type: "number",
276
+ description: "Project ID to filter by (optional)",
277
+ },
278
+ days: {
279
+ type: "number",
280
+ description: "Days to look back (default: 7)",
281
+ default: 7,
282
+ },
283
+ limit: {
284
+ type: "number",
285
+ description: "Maximum screenshots to return (default: 10)",
286
+ default: 10,
287
+ },
288
+ },
289
+ required: ["spec_file"],
290
+ },
291
+ },
259
292
  ];
260
293
  // Create the server
261
294
  const server = new Server({
@@ -297,6 +330,9 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
297
330
  case "get_test_trend":
298
331
  result = await apiCall("/tests/trend", args);
299
332
  break;
333
+ case "get_failure_screenshots":
334
+ result = await apiCall("/tests/failure-screenshots", args);
335
+ break;
300
336
  default:
301
337
  throw new Error(`Unknown tool: ${name}`);
302
338
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testledger/mcp",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "MCP server for Test Ledger - analyze flaky tests with Claude Code",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",