search_workflows
Find n8n workflows by searching their name or associated tags using a query string.
Instructions
Search workflows by name or tags
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query |
Implementation Reference
- src/n8n-client.ts:182-193 (handler)The core implementation of the search_workflows tool. Fetches all workflows (up to 100) and filters by name or tags based on a case-insensitive query.
async searchWorkflows(query: string) { const allWorkflows = await this.listWorkflows({ limit: 100 }); const searchLower = query.toLowerCase(); return allWorkflows.data.filter((workflow: any) => { const nameMatch = workflow.name.toLowerCase().includes(searchLower); const tagMatch = workflow.tags?.some((tag: string) => tag.toLowerCase().includes(searchLower) ); return nameMatch || tagMatch; }); } - src/handlers.ts:161-164 (handler)The tool handler dispatch case for 'search_workflows' - parses args with SearchSchema and calls client.searchWorkflows().
case "search_workflows": { const { query } = SearchSchema.parse(args); return await client.searchWorkflows(query); } - src/handlers.ts:64-66 (schema)Zod schema for validating the 'query' input argument for search_workflows.
const SearchSchema = z.object({ query: z.string(), }); - src/tools.ts:315-328 (registration)Tool registration entry for 'search_workflows', defining its name, description, and input JSON schema (requires 'query' string).
{ name: "search_workflows", description: "Search workflows by name or tags", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query", }, }, required: ["query"], }, },