List analysis suites
wopee_fetch_analysis_suitesList all analysis suites in the current project, returning UUIDs, names, types, and running statuses. Read-only; takes no input.
Instructions
List all analysis suites in the current project. Returns an array of suite objects with UUIDs, names, types (ANALYSIS, AGENT, etc.), and running statuses (IDLE, IN_PROGRESS, FINISHED). Use this to discover existing suites before calling other tools — you need a suite UUID for wopee_generate_artifact, wopee_fetch_artifact, wopee_update_artifact, and wopee_dispatch_agent. Read-only: does not create or modify anything. Takes no input; uses WOPEE_PROJECT_UUID from environment. Returns an empty array if no suites exist. Fails if WOPEE_PROJECT_UUID is not configured.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The main tool definition and handler for 'wopee_fetch_analysis_suites'. The handler fetches all analysis suites by calling the GraphQL API with the project UUID from config. It calls the GQL query 'FetchAnalysisSuites', passes 'projectUuid', and returns the suite list as JSON.
import { getConfig } from "../../utils/getConfig.js"; import { requestClient } from "../../utils/requestClient.js"; import { _parseError } from "../shared/helpers.js"; import { AnalysisSuite, ToolName } from "../shared/types.js"; import { FetchAnalysisSuites } from "../shared/gql-queries.js"; export const wopeeFetchAnalysisSuites = { name: ToolName.WOPEE_FETCH_ANALYSIS_SUITES, config: { title: "List analysis suites", description: "List all analysis suites in the current project. Returns an array of suite objects with UUIDs, names, types (ANALYSIS, AGENT, etc.), and running statuses (IDLE, IN_PROGRESS, FINISHED). Use this to discover existing suites before calling other tools — you need a suite UUID for wopee_generate_artifact, wopee_fetch_artifact, wopee_update_artifact, and wopee_dispatch_agent. Read-only: does not create or modify anything. Takes no input; uses WOPEE_PROJECT_UUID from environment. Returns an empty array if no suites exist. Fails if WOPEE_PROJECT_UUID is not configured.", }, handler: async () => { try { const { WOPEE_PROJECT_UUID } = getConfig(); if (!WOPEE_PROJECT_UUID) return { content: [ { type: "text" as const, text: "WOPEE_PROJECT_UUID is not set", }, ], }; const result = await requestClient<{ fetchAnalysisSuites: AnalysisSuite[]; }>(FetchAnalysisSuites, { projectUuid: WOPEE_PROJECT_UUID, }); if (!result?.fetchAnalysisSuites) return { content: [ { type: "text" as const, text: "Failed to fetch analysis suites: no data returned", }, ], }; return { content: [ { type: "text" as const, text: JSON.stringify(result.fetchAnalysisSuites, null, 2), }, ], }; } catch (error) { return _parseError(error); } }, }; - The GraphQL query 'FetchAnalysisSuites' used by the handler to retrieve analysis suites with their UUIDs, names, types, statuses, and generation data states.
export const FetchAnalysisSuites = ` query FetchAnalysisSuites($projectUuid: ID!) { fetchAnalysisSuites(projectUuid: $projectUuid) { uuid name suiteType executionStatus analysisIdentifier suiteRunningStatus createdAt updatedAt generatedAnalysisDataState { uuid suiteUuid appContext { uuid isGenerated status } generalUserStories { uuid isGenerated status } userStories { uuid isGenerated status } testCases { uuid isGenerated status } reusableTestCases { uuid isGenerated status } testCaseSteps } } } `; - src/tools/shared/helpers.ts:90-122 (helper)The '_parseError' helper function used by the handler to format errors (including RequestError) into MCP content responses.
export function _parseError(error: unknown) { console.error(error instanceof z.ZodError ? error.issues : error); if (error instanceof RequestError) { return { content: [ { type: "text" as const, text: `[${error.code}] ${error.message}${error.retryable ? " (retryable)" : ""}`, }, ], }; } return { content: [ { type: "text" as const, text: `Failed to parse input: ${ error instanceof z.ZodError ? error.issues .map( (issue) => `${issue.path[0] ?? "Unknown"}: ${issue.message}`, ) .join("\n") : error instanceof Error ? error.message : "Unknown zod validation error" }`, }, ], }; } - src/utils/getConfig.ts:1-13 (helper)The 'getConfig' helper that reads environment variables (WOPEE_API_URL, WOPEE_API_KEY, WOPEE_PROJECT_UUID, WOPEE_AUTH_TOKEN) used by the handler.
export const getConfig = () => { const WOPEE_API_URL = process.env.WOPEE_API_URL ?? "https://api.wopee.io"; const WOPEE_API_KEY = process.env.WOPEE_API_KEY ?? null; const WOPEE_PROJECT_UUID = process.env.WOPEE_PROJECT_UUID ?? null; const WOPEE_AUTH_TOKEN = process.env.WOPEE_AUTH_TOKEN ?? null; return { WOPEE_API_URL, WOPEE_API_KEY, WOPEE_PROJECT_UUID, WOPEE_AUTH_TOKEN, }; }; - src/tools/index.ts:1-28 (registration)Registration of the tool in the TOOLS array. The tool is imported from './wopee_fetch_analysis_suites/index.js' and added to the exported TOOLS array at line 15.
import { wopeeFetchArtifact } from "./wopee_fetch_artifact/index.js"; import { wopeeUpdateArtifact } from "./wopee_update_artifact/index.js"; import { wopeeGenerateArtifact } from "./wopee_generate_artifact/index.js"; import { wopeeDispatchAgent } from "./wopee_dispatch_agent/index.js"; import { wopeeDispatchAnalysis } from "./wopee_dispatch_analysis/index.js"; import { wopeeCreateBlankSuite } from "./wopee_create_blank_suite/index.js"; import { wopeeFetchAnalysisSuites } from "./wopee_fetch_analysis_suites/index.js"; import { wopeeFetchExecutedTestCases } from "./wopee_fetch_executed_test_cases/index.js"; import { wopeeSendChatMessage } from "./wopee_send_chat_message/index.js"; import { wopeeReadChatHistory } from "./wopee_read_chat_history/index.js"; import { wopeeCreateGithubIssue } from "./wopee_create_github_issue/index.js"; export const TOOLS = [ wopeeCreateBlankSuite, wopeeFetchAnalysisSuites, wopeeFetchExecutedTestCases, wopeeDispatchAnalysis, wopeeDispatchAgent, wopeeFetchArtifact, wopeeUpdateArtifact, wopeeGenerateArtifact, wopeeSendChatMessage, wopeeReadChatHistory, wopeeCreateGithubIssue, ];