Skip to main content
Glama

list_workflows

Retrieve and organize workflows with filtering by tags, name, date, success rate, or deletion status, and sorting options for better task management.

Instructions

List all workflows with optional filtering and sorting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterNo
sortNo

Implementation Reference

  • The main handler function for the 'list_workflows' tool. It parses the input arguments using ListWorkflowsSchema, fetches workflows from storage with optional filter and sort, creates summaries, and returns a JSON-formatted response.
    private async listWorkflows(args: unknown) {
      const parsed = ListWorkflowsSchema.parse(args);
      
      const workflows = await this.storage.list(parsed.filter, parsed.sort);
      
      // Create summary for each workflow
      const summaries = workflows.map(w => ({
        id: w.id,
        name: w.name,
        description: w.description,
        version: w.version,
        tags: w.tags,
        steps_count: w.steps.length,
        created_at: w.metadata?.created_at,
        times_run: w.metadata?.times_run || 0,
        success_rate: w.metadata?.success_rate,
        is_deleted: w.is_deleted,
      }));
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              count: summaries.length,
              workflows: summaries,
            }, null, 2),
          },
        ],
      };
    }
  • Zod schema defining the input structure for the 'list_workflows' tool, including optional filter and sort parameters.
    const ListWorkflowsSchema = z.object({
      filter: z.object({
        tags: z.array(z.string()).optional(),
        name_contains: z.string().optional(),
        created_after: z.string().optional(),
        created_before: z.string().optional(),
        min_success_rate: z.number().optional(),
        is_deleted: z.boolean().optional(),
      }).optional(),
      sort: z.object({
        field: z.enum(['name', 'created_at', 'updated_at', 'times_run', 'success_rate']),
        order: z.enum(['asc', 'desc']),
      }).optional(),
    });
  • src/index.ts:258-261 (registration)
    Tool registration in the getTools() method, defining the name, description, and input schema for 'list_workflows'.
      name: 'list_workflows',
      description: 'List all workflows with optional filtering and sorting',
      inputSchema: zodToJsonSchema(ListWorkflowsSchema),
    },
  • src/index.ts:124-125 (registration)
    Dispatch registration in the CallToolRequestSchema handler switch statement, routing 'list_workflows' calls to the listWorkflows method.
    case 'list_workflows':
      return await this.listWorkflows(args);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'optional filtering and sorting', which hints at query capabilities, but fails to describe critical traits like pagination, rate limits, authentication needs, or what data is returned (e.g., workflow details, IDs). For a list operation with no annotation coverage, this is a significant gap in transparency.

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?

The description is a single, efficient sentence that front-loads the core action ('List all workflows') and adds key modifiers ('with optional filtering and sorting'). There is no wasted verbiage, making it appropriately sized and easy to parse.

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

Completeness2/5

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

Given the complexity (2 parameters with nested objects, no annotations, no output schema), the description is incomplete. It lacks details on behavioral aspects (e.g., pagination, error handling), parameter usage, and output format, which are crucial for an agent to invoke this tool effectively. The conciseness comes at the expense of necessary context.

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

Parameters2/5

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

Schema description coverage is 0%, meaning parameters are undocumented in the schema. The description mentions 'optional filtering and sorting', which maps to the two parameters ('filter' and 'sort'), but adds minimal semantic value—it doesn't explain what fields can be filtered (e.g., tags, dates) or sorted (e.g., by name, success rate), leaving the agent to infer from the schema structure alone. This insufficiently compensates for the low coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('workflows'), making the purpose evident. It also mentions optional filtering and sorting, which adds specificity. However, it doesn't explicitly distinguish this tool from sibling tools like 'get_workflow' or 'get_workflow_versions', which might also retrieve workflow information, so it falls short of a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_workflow' (likely for single workflows) and 'get_workflow_versions' (for version history), there's no indication of context or exclusions, such as whether this is for bulk retrieval or initial exploration. This leaves the agent without clear usage direction.

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/FiveOhhWon/workflows-mcp'

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