Skip to main content
Glama

Generate test artifacts

wopee_generate_artifact

Generate test artifacts for a suite using AI. Must call sequentially: APP_CONTEXT, then user stories, then test cases. Returns confirmation; use fetch to get the artifact.

Instructions

Generate AI-powered test artifacts for a suite using the Wopee.io AI engine. Each call creates one artifact type — call multiple times for different types. Generation order matters: APP_CONTEXT must be generated before user stories, and user stories before test cases. If called out of order, the AI may produce lower quality results. On success, returns confirmation that generation started. Use wopee_fetch_artifact to retrieve the generated content once ready. Do NOT use this to update existing artifacts — use wopee_update_artifact instead. Generating the same type again overwrites the previous version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesType of test artifact to generate. One of: APP_CONTEXT, GENERAL_USER_STORIES, USER_STORIES_WITH_TEST_CASES, TEST_CASES, TEST_CASE_STEPS, REUSABLE_TEST_CASES, REUSABLE_TEST_CASE_STEPS. Start with APP_CONTEXT, then generate stories and test cases from it.
suiteUuidYesUUID of the analysis suite to generate artifacts for. Get this from wopee_create_blank_suite or wopee_fetch_analysis_suites.

Implementation Reference

  • src/tools/index.ts:3-3 (registration)
    Import of wopeeGenerateArtifact into the tools array for registration
    import { wopeeGenerateArtifact } from "./wopee_generate_artifact/index.js";
  • Registration of wopeeGenerateArtifact in the TOOLS array
    wopeeGenerateArtifact,
  • Tool definition for wopee_generate_artifact with name, config (title, description, inputSchema), and handler that delegates to generateAIDataFile
    export const wopeeGenerateArtifact = {
      name: ToolName.WOPEE_GENERATE_ARTIFACT,
      config: {
        title: "Generate test artifacts",
        description:
          "Generate AI-powered test artifacts for a suite using the Wopee.io AI engine. Each call creates one artifact type — call multiple times for different types. Generation order matters: APP_CONTEXT must be generated before user stories, and user stories before test cases. If called out of order, the AI may produce lower quality results. On success, returns confirmation that generation started. Use wopee_fetch_artifact to retrieve the generated content once ready. Do NOT use this to update existing artifacts — use wopee_update_artifact instead. Generating the same type again overwrites the previous version.",
        inputSchema: GenerateAIDataHandlerInputSchema.shape,
      },
      handler: async (input: GenerateAIDataHandlerInput) =>
        await generateAIDataFile(input),
    };
  • GenerateAIDataHandlerInputSchema defining input schema (type enum + suiteUuid) for the tool
    export const GenerateAIDataHandlerInputSchema = z.object({
      type: z.nativeEnum(GenerateArtifactType, {
        description:
          "Type of test artifact to generate. One of: APP_CONTEXT, GENERAL_USER_STORIES, USER_STORIES_WITH_TEST_CASES, TEST_CASES, TEST_CASE_STEPS, REUSABLE_TEST_CASES, REUSABLE_TEST_CASE_STEPS. Start with APP_CONTEXT, then generate stories and test cases from it.",
      }),
      suiteUuid: z
        .string({
          description:
            "UUID of the analysis suite to generate artifacts for. Get this from wopee_create_blank_suite or wopee_fetch_analysis_suites.",
        })
        .min(1, "Suite UUID is required"),
    });
  • generateAIDataFile function — the actual handler logic that parses the artifact type, builds the GraphQL input via factory, executes the generation mutation, then fetches and returns the resulting artifact
    export async function generateAIDataFile(
      input: GenerateAIDataHandlerInput,
    ): Promise<{
      content: {
        type: "text";
        text: string;
      }[];
    }> {
      const { query, dataKey, description } = _parseGenerateArtifactType(
        input.type,
      );
      if (!query || !dataKey || !description)
        return {
          content: [
            {
              type: "text" as const,
              text: "Failed to parse generation type",
            },
          ],
        };
    
      try {
        const generateAIDataInput = createGenerateAIDataInput(input);
        const parsedInput = GenerateAIDataInputSchema.parse(generateAIDataInput);
        const generationResult = await requestClient<{ [key: string]: boolean }>(
          query,
          {
            input: parsedInput,
          },
          { timeoutMs: 5 * 60 * 1000 },
        );
        if (!generationResult?.[dataKey])
          return {
            content: [
              {
                type: "text" as const,
                text: `Failed to generate ${description}: no result returned`,
              },
            ],
          };
    
        const convertedType = _convertToArtifactType(input.type);
    
        return await fetchArtifact({
          suiteUuid: parsedInput.suiteUuid,
          type: convertedType,
        });
      } catch (error) {
        return _parseError(error);
      }
    }
Behavior5/5

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

No annotations, but description covers ordering dependencies, overwriting behavior, return confirmation, and retrieval mechanism. Complete behavioral context.

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

Conciseness5/5

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

Six concise sentences, front-loaded with purpose, each sentence adds unique value. No fluff.

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?

Despite no output schema, description adequately explains return value. Covers ordering, overwrite, retrieval, and alternatives. Sufficient for the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage, and description adds extra guidance: start with APP_CONTEXT, and sources for suiteUuid. Enriches both parameters.

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?

Clearly states the tool generates AI-powered test artifacts, specifies it creates one per call, lists artifact types, and distinguishes from sibling tools (fetch/update).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says when to use (generating artifacts), when not to use (updating), provides alternatives (wopee_update_artifact, wopee_fetch_artifact), and gives ordering constraints.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Wopee-io/wopee-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server