Skip to main content
Glama

Dispatch autonomous testing agent

wopee_dispatch_agent

Dispatches an autonomous AI agent to execute a test case in a real browser, capturing screenshots and reporting pass or fail with detailed findings.

Instructions

Execute a specific test case by dispatching an autonomous AI agent. The agent opens a real browser, navigates the web app, follows the test case steps, captures screenshots at each step, and reports pass/fail with detailed findings. Prerequisite: test cases must exist in the suite — generate them first with wopee_generate_artifact (type USER_STORIES_WITH_TEST_CASES). Do NOT use this to analyze or crawl an app — use wopee_dispatch_analysis for that. Side effects: creates execution records and screenshots on the Wopee.io platform. Rate limit: 10 seconds between dispatches per project; concurrent calls auto-retry with exponential backoff. On success, returns executed test case results. On failure (invalid suite/test case ID), returns an error message. Use wopee_fetch_executed_test_cases afterward to get full results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
suiteUuidYesUUID of the suite to dispatch the agent for
analysisIdentifierYesAnalysis identifier of the suite to dispatch the agent for
testCasesYesChosen test cases to dispatch the agent for

Implementation Reference

  • The main tool handler that dispatches an autonomous AI agent to execute test cases. Takes suite UUID, analysis identifier, and selected test cases, creates the input payload via factory, runs the GraphQL mutation with retry logic, and returns the executed test case results.
    export const wopeeDispatchAgent = {
      name: ToolName.WOPEE_DISPATCH_AGENT,
      config: {
        title: "Dispatch autonomous testing agent",
        description:
          "Execute a specific test case by dispatching an autonomous AI agent. The agent opens a real browser, navigates the web app, follows the test case steps, captures screenshots at each step, and reports pass/fail with detailed findings. Prerequisite: test cases must exist in the suite — generate them first with wopee_generate_artifact (type USER_STORIES_WITH_TEST_CASES). Do NOT use this to analyze or crawl an app — use wopee_dispatch_analysis for that. Side effects: creates execution records and screenshots on the Wopee.io platform. Rate limit: 10 seconds between dispatches per project; concurrent calls auto-retry with exponential backoff. On success, returns executed test case results. On failure (invalid suite/test case ID), returns an error message. Use wopee_fetch_executed_test_cases afterward to get full results.",
        inputSchema: WopeeDispatchAgentInputSchema.shape,
      },
      handler: async (input: WopeeDispatchAgentInput) => {
        try {
          const dispatchAgentInput = createDispatchAgentInput(input);
          const parsedInput = DispatchAgentInputSchema.parse(dispatchAgentInput);
    
          const result = await withRetry(() =>
            requestClient<{ dispatchAgent: ExecutedTestCase[] }>(DispatchAgent, {
              input: parsedInput,
            }),
          );
    
          if (!result?.dispatchAgent?.length)
            return {
              content: [
                {
                  type: "text" as const,
                  text: "Failed to dispatch agent: no dispatch result returned",
                },
              ],
            };
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(result.dispatchAgent, null, 2),
              },
            ],
          };
        } catch (error) {
          return _parseError(error);
        }
      },
    };
  • Zod validation schemas for the tool. WopeeDispatchAgentInputSchema defines the user-facing input (suiteUuid, analysisIdentifier, testCases). DispatchAgentInputSchema is the internal input that includes projectUuid injected by the factory. SelectedTestCasesSchema validates each test case entry (testCaseId + userStoryId).
    export const WopeeDispatchAgentInputSchema = z.object({
      suiteUuid: z
        .string({ description: "UUID of the suite to dispatch the agent for" })
        .min(1, "Suite UUID is required"),
      analysisIdentifier: z
        .string({
          description: "Analysis identifier of the suite to dispatch the agent for",
        })
        .min(1, "Analysis identifier is required"),
      testCases: z.array(SelectedTestCasesSchema, {
        description: "Chosen test cases to dispatch the agent for",
      }),
    });
    
    export const DispatchAgentInputSchema = z.object({
      projectUuid: z.string().min(1, "Project UUID is required"),
      suiteUuid: z.string().min(1, "Suite UUID is required"),
      analysisIdentifier: z.string().min(1, "Analysis identifier is required"),
      testCases: z.array(SelectedTestCasesSchema),
    });
    
    export type DispatchAgentInput = z.infer<typeof DispatchAgentInputSchema>;
    export type WopeeDispatchAgentInput = z.infer<
      typeof WopeeDispatchAgentInputSchema
    >;
  • Factory/helper function that takes the user-facing WopeeDispatchAgentInput and enriches it with the project UUID from configuration, producing a DispatchAgentInput ready for the GraphQL mutation.
    export const createDispatchAgentInput = (
      input: WopeeDispatchAgentInput
    ): DispatchAgentInput => {
      const { WOPEE_PROJECT_UUID } = getConfig();
      if (!WOPEE_PROJECT_UUID) throw new Error("WOPEE_PROJECT_UUID is not set");
    
      return {
        projectUuid: WOPEE_PROJECT_UUID,
        suiteUuid: input.suiteUuid,
        analysisIdentifier: input.analysisIdentifier,
        testCases: input.testCases,
      };
    };
  • Tool registration: imports wopeeDispatchAgent from its subdirectory and exports it as part of the TOOLS array that registers all available MCP tools.
    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,
    ];
  • Enum registration: the tool name 'wopee_dispatch_agent' is defined in the ToolName enum, which is used by the handler to identify itself.
    WOPEE_DISPATCH_AGENT = "wopee_dispatch_agent",
Behavior5/5

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

No annotations provided, but description discloses side effects (execution records, screenshots), rate limit (10s per project with auto-retry), and success/failure outcomes with error handling.

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

Conciseness4/5

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

Description is detailed but well-structured: main action first, then prerequisite, exclusions, side effects, rate limit, and outcomes. Every sentence adds value; slight verbosity but 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?

Covers all essential aspects: prerequisites, exclusions, side effects, rate limits, error conditions, and follow-up. No output schema, but description explains success/failure returns adequately.

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

Parameters3/5

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

Input schema has 100% coverage, so baseline is 3. Description does not add significant meaning beyond what schema already provides for the 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?

Description explicitly states the tool executes a specific test case by dispatching an AI agent, detailing the browser interaction and reporting. It distinguishes itself from sibling wopee_dispatch_analysis by specifying what not to use it for.

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?

Provides clear prerequisite (generate test cases first with wopee_generate_artifact), explicitly warns against using for analysis/crawl (directs to sibling), and recommends follow-up with wopee_fetch_executed_test_cases.

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