Dispatch analysis crawl
wopee_dispatch_analysisAutomatically discover and map a web application's structure by creating an analysis suite and dispatching an AI crawling agent in one step.
Instructions
Create a new analysis suite AND dispatch an AI crawling agent in one step. The agent opens a real browser, navigates from the starting URL, discovers pages, and maps the application structure. Use this when you want to auto-analyze a web app — it combines suite creation and crawling. Use wopee_create_blank_suite instead if you want to manually populate the suite. Optionally accepts starting URL, login credentials, cookie preferences (ACCEPT_ALL, DECLINE_ALL, IGNORE), custom variables, and free-text instructions to guide the crawl. Not idempotent: each call creates a new suite and starts a new crawl. Side effects: creates a suite and execution records on the platform. Rate limit: 10 seconds between dispatches per project; concurrent calls auto-retry with exponential backoff. Returns the created suite object on success.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| additionalInstructions | No | Additional instructions for the agent | |
| additionalVariables | No | Additional environment variables for the analysis. Each variable needs a key (uppercase, e.g. BASE_URL) and a non-empty value. | |
| rerun | No | If provided, reruns an existing analysis suite instead of creating a new one. Requires suiteUuid, analysisIdentifier, and mode. |
Implementation Reference
- Main tool definition and handler for wopee_dispatch_analysis. The handler creates a dispatch analysis input via factory, parses it, sends a GraphQL mutation request with retry logic, and returns success/failure text content.
export const wopeeDispatchAnalysis = { name: ToolName.WOPEE_DISPATCH_ANALYSIS, config: { title: "Dispatch analysis crawl", description: "Create a new analysis suite AND dispatch an AI crawling agent in one step. The agent opens a real browser, navigates from the starting URL, discovers pages, and maps the application structure. Use this when you want to auto-analyze a web app — it combines suite creation and crawling. Use wopee_create_blank_suite instead if you want to manually populate the suite. Optionally accepts starting URL, login credentials, cookie preferences (ACCEPT_ALL, DECLINE_ALL, IGNORE), custom variables, and free-text instructions to guide the crawl. Not idempotent: each call creates a new suite and starts a new crawl. Side effects: creates a suite and execution records on the platform. Rate limit: 10 seconds between dispatches per project; concurrent calls auto-retry with exponential backoff. Returns the created suite object on success.", inputSchema: WopeeDispatchAnalysisInputSchema.shape, }, handler: async (input: WopeeDispatchAnalysisInput) => { try { const rawInput = createDispatchAnalysisInput(input); const parsedInput = DispatchAnalysisInputSchema.parse(rawInput); const result = await withRetry(() => requestClient<{ dispatchAnalysis: AnalysisSuite }>(DispatchAnalysis, { input: parsedInput, }), ); if (!result?.dispatchAnalysis) return { content: [ { type: "text" as const, text: "Failed to dispatch agent: no analysis suite returned", }, ], }; return { content: [ { type: "text" as const, text: "Agent dispatched successfully", }, ], }; } catch (error) { return _parseError(error); } }, }; - WopeeDispatchAnalysisInputSchema defines the public input shape (additionalInstructions, additionalVariables, rerun) using Zod. Also defines DispatchAnalysisInputSchema for the internal/parsed input and exports TypeScript types.
export const WopeeDispatchAnalysisInputSchema = z.object({ additionalInstructions: z .string({ description: "Additional instructions for the agent" }) .nullish(), additionalVariables: z .array(AdditionalVariableSchema, { description: "Additional environment variables for the analysis. Each variable needs a key (uppercase, e.g. BASE_URL) and a non-empty value.", }) .nullish(), rerun: WopeeRerunOptionsSchema.nullish().describe( "If provided, reruns an existing analysis suite instead of creating a new one. Requires suiteUuid, analysisIdentifier, and mode.", ), }); export type DispatchAnalysisInput = z.infer<typeof DispatchAnalysisInputSchema>; export type WopeeDispatchAnalysisInput = z.infer< typeof WopeeDispatchAnalysisInputSchema >; - src/tools/index.ts:5-28 (registration)Tool is imported from ./wopee_dispatch_analysis/index.js and included in the TOOLS array (line 18) for registration as an MCP tool.
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, ]; - src/tools/shared/types.ts:6-7 (registration)ToolName.WOPEE_DISPATCH_ANALYSIS enum entry with string value 'wopee_dispatch_analysis' used as the tool's name identifier.
WOPEE_DISPATCH_ANALYSIS = "wopee_dispatch_analysis", WOPEE_DISPATCH_AGENT = "wopee_dispatch_agent", - Factory function createDispatchAnalysisInput transforms the public WopeeDispatchAnalysisInput into the internal DispatchAnalysisInput by injecting WOPEE_PROJECT_UUID from config and mapping fields.
export const createDispatchAnalysisInput = ( input: WopeeDispatchAnalysisInput, ): DispatchAnalysisInput => { const { WOPEE_PROJECT_UUID } = getConfig(); if (!WOPEE_PROJECT_UUID) throw new Error("WOPEE_PROJECT_UUID is not set"); return { projectUuid: WOPEE_PROJECT_UUID, suiteAnalysisConfig: { startingUrl: null, username: null, password: null, cookiesPreference: null, additionalInstructions: input.additionalInstructions ?? null, additionalVariables: input.additionalVariables?.length ? JSON.stringify(input.additionalVariables) : null, }, rerun: input.rerun ?? null, }; };