Skip to main content
Glama

list_workflows

Lists all available workflow templates to help you select and initiate collaborative AI tasks among multiple models.

Instructions

列出所有可用的工作流模板

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler: The listWorkflows() method on WorkflowManager returns all workflow definitions by combining templates (predefined) and customWorkflows (registered at runtime).
    listWorkflows(): WorkflowDefinition[] {
      return [
        ...this.templates.values(),
        ...this.customWorkflows.values(),
      ];
    }
  • Schema: WorkflowDefinition interface defines the shape of each workflow (id, name, description, triggers, steps, entryPoint, variables).
    export interface WorkflowDefinition {
      /** 工作流 ID */
      id: string;
      /** 工作流名称 */
      name: string;
      /** 工作流描述 */
      description: string;
      /** 适用场景 */
      triggers: string[];
      /** 工作流步骤 */
      steps: WorkflowStep[];
      /** 入口步骤 ID */
      entryPoint: string;
      /** 变量定义 */
      variables?: Record<string, string>;
    }
  • src/server.ts:357-364 (registration)
    Registration: The tool 'list_workflows' is registered in the server's tool definitions list with an empty input schema.
    {
      name: 'list_workflows',
      description: '列出所有可用的工作流模板',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/server.ts:869-883 (registration)
    Handler dispatch: The server routes the 'list_workflows' tool call, invokes workflowManager.listWorkflows(), formats the result as a Markdown list, and returns it.
            case 'list_workflows': {
              const workflows = workflowManager.listWorkflows();
              const list = workflows.map(w => {
                const stepsCount = w.steps.filter(s => s.type === 'expert').length;
                return `### ${w.name} (\`${w.id}\`)
    ${w.description}
    - **触发词**: ${w.triggers.join(', ')}
    - **步骤数**: ${stepsCount} 个专家步骤
    - **流程**: ${w.steps.filter(s => s.type === 'expert').map(s => s.name).join(' → ')}`;
              }).join('\n\n');
              
              return {
                content: [{ type: 'text', text: `# 📋 可用工作流模板\n\n${list}\n\n---\n> 使用 \`run_workflow\` 执行指定工作流,或使用 \`suggest_workflow\` 自动推荐` }],
              };
            }
  • Helper: The singleton export 'workflowManager' is created as a new WorkflowManager instance, imported and used by the server.
    export const workflowManager = new WorkflowManager();
Behavior3/5

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

No annotations provided; description only states it lists templates. No disclosure of sorting, filtering, permissions, or pagination. Adequate for a simple read operation but lacks depth.

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?

Single sentence, no fluff, directly states the action.

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?

Lacks output schema or description of return format (e.g., fields in each template). Adequate for a trivial list tool but could be more informative.

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?

No parameters defined; description adds no parameter info. Per guidelines, 0 parameters yields baseline 4.

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 lists all available workflow templates, distinguishing it from siblings like run_workflow (executes) and suggest_workflow (recommends).

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?

No guidance on when to use this tool vs alternatives like suggest_workflow or search_workflow (not present but inferred). The description lacks context on use cases.

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/7836246/claude-team-mcp'

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