Skip to main content
Glama
autopilotbrowser

Autopilot Browser MCP Server

Official

run_workflow

Execute automated browser workflows for web scraping and data extraction by providing workflow names and required inputs.

Instructions

Execute a specific Autopilot Browser workflow with the provided inputs. Use search_workflows first to find available workflows and their required inputs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowNameYesThe name of the workflow to execute
workflowInputsYesKey-value pairs of inputs required by the workflow. The required inputs depend on the specific workflow being executed.

Implementation Reference

  • Core handler function that makes the HTTP POST request to the Autopilot Browser API to execute the specified workflow with given inputs.
    async runWorkflow(workflowName: string, workflowInputs: Record<string, any>) {
      const response = await fetch(`${this.baseUrl}/wf/run`, {
        method: 'POST',
        headers: {
          'x-api-key': this.apiKey,
          'Content-Type': 'application/json',
        },
        body: JSON.stringify({
          workflowName,
          workflowInputs,
        }),
      });
      
      if (!response.ok) {
        const errorText = await response.text();
        throw new Error(`API Error: ${response.status} ${response.statusText} - ${errorText}`);
      }
      
      return await response.json();
    }
  • MCP CallToolRequestSchema handler specifically for the 'run_workflow' tool, which extracts arguments and calls the core runWorkflow function.
    if (request.params.name === "run_workflow") {
      const { workflowName, workflowInputs } = request.params.arguments as {
        workflowName: string;
        workflowInputs: Record<string, any>;
      };
    
      try {
        const result = await apiClient.runWorkflow(workflowName, workflowInputs);
        
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result, null, 2),
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error executing workflow: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
  • Input schema definition for the 'run_workflow' tool, specifying workflowName and workflowInputs as required parameters.
    inputSchema: {
      type: "object",
      properties: {
        workflowName: {
          type: "string",
          description: "The name of the workflow to execute",
        },
        workflowInputs: {
          type: "object",
          description: "Key-value pairs of inputs required by the workflow. The required inputs depend on the specific workflow being executed.",
          additionalProperties: true,
        },
      },
      required: ["workflowName", "workflowInputs"],
    },
  • src/index.ts:142-160 (registration)
    Tool registration metadata including name, description, and input schema returned by ListToolsRequestSchema handler.
    {
      name: "run_workflow",
      description: "Execute a specific Autopilot Browser workflow with the provided inputs. Use search_workflows first to find available workflows and their required inputs.",
      inputSchema: {
        type: "object",
        properties: {
          workflowName: {
            type: "string",
            description: "The name of the workflow to execute",
          },
          workflowInputs: {
            type: "object",
            description: "Key-value pairs of inputs required by the workflow. The required inputs depend on the specific workflow being executed.",
            additionalProperties: true,
          },
        },
        required: ["workflowName", "workflowInputs"],
      },
    },
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/autopilotbrowser/mcp-server'

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