Skip to main content
Glama
nikolausm

n8n MCP Server

by nikolausm

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

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query

Implementation Reference

  • 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;
      });
    }
  • 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);
    }
  • 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"],
      },
    },
Behavior2/5

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

No annotations provided; the description only states basic search function. Lacks details on pagination, case sensitivity, partial matching, or behavior when no results.

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

Conciseness5/5

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

One concise, front-loaded sentence with no extraneous information. Efficiently conveys purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a simple search with one parameter, but missing details on output format, sorting, or matching behavior. Sufficient but with gaps.

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

Parameters4/5

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

The description adds meaning beyond the schema by specifying that the query can search by name or tags, enriching the single parameter's context.

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?

The description clearly states the tool searches workflows, specifying criteria as name or tags. It distinguishes from siblings like list_workflows and get_workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use versus alternatives like list_workflows or get_workflow. Usage is implied but not clarified.

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/nikolausm/n8n-mcp-server'

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