search_workflows
Find automated browser workflows for web scraping, data extraction, and automation tasks by searching with keywords.
Instructions
Search for available Autopilot Browser workflows by keyword. Returns a list of workflows that match the search term. If no search term is provided, returns all workflows.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_workflows"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| searchTerm | No | Optional keyword to search for specific workflows (e.g., 'scraping', 'automation', 'data extraction') |
Implementation Reference
- src/index.ts:167-194 (handler)Executes the search_workflows tool by extracting optional searchTerm from input arguments, calling the apiClient helper, formatting results as JSON text content, and handling errors.
if (request.params.name === "search_workflows") { const { searchTerm } = request.params.arguments as { searchTerm?: string; }; try { const workflows = await apiClient.searchWorkflows(searchTerm); return { content: [ { type: "text", text: JSON.stringify(workflows, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error searching workflows: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } } - src/index.ts:132-141 (schema)Input schema definition for the search_workflows tool, specifying an optional 'searchTerm' string property.
inputSchema: { type: "object", properties: { searchTerm: { type: "string", description: "Optional keyword to search for specific workflows (e.g., 'scraping', 'automation', 'data extraction')", }, }, }, }, - src/index.ts:129-141 (registration)Tool registration in the MCP server's ListTools handler, including name, description, and input schema for search_workflows.
{ name: "search_workflows", description: "Search for available Autopilot Browser workflows by keyword. Returns a list of workflows that match the search term. If no search term is provided, returns all workflows.", inputSchema: { type: "object", properties: { searchTerm: { type: "string", description: "Optional keyword to search for specific workflows (e.g., 'scraping', 'automation', 'data extraction')", }, }, }, }, - src/index.ts:29-48 (helper)Core helper function in AutopilotAPIClient class that performs the actual HTTP GET request to the Autopilot Browser API's /wf/search endpoint to fetch workflows.
async searchWorkflows(searchTerm?: string) { const url = new URL(`${this.baseUrl}/wf/search`); if (searchTerm) { url.searchParams.append('searchTerm', searchTerm); } const response = await fetch(url.toString(), { method: 'GET', headers: { 'x-api-key': this.apiKey, 'Content-Type': 'application/json', }, }); if (!response.ok) { throw new Error(`API Error: ${response.status} ${response.statusText}`); } return await response.json(); }