Skip to main content
Glama

List Available Workflows

list_workflows

List all guided workflows that apply Base120 mental models to solve problems.

Instructions

Get all available guided workflows for problem-solving with Base120 mental models.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
workflowsYes

Implementation Reference

  • The async handler function registered for the 'list_workflows' tool. It calls listWorkflows() from the framework, maps results to a payload with count and workflow details, and returns content with structured JSON.
    async () => {
      const workflows = listWorkflows();
    
      const payload = {
        count: workflows.length,
        workflows: workflows.map((wf) => ({
          name: wf.name,
          displayName: wf.displayName,
          description: wf.description,
          problemTypes: wf.problemTypes,
          stepCount: wf.steps.length,
          estimatedDuration: wf.estimatedDuration,
        })),
      };
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(payload, null, 2),
          },
        ],
        structuredContent: payload,
      } as const;
    }
  • Registration of the 'list_workflows' tool on the MCP server via server.registerTool(), including input/output schemas, title, and description.
    server.registerTool(
      "list_workflows",
      {
        title: "List Available Workflows",
        description:
          "Get all available guided workflows for problem-solving with Base120 mental models.",
        inputSchema: z.object({}),
        outputSchema: z.object({
          count: z.number(),
          workflows: z.array(
            z.object({
              name: z.string(),
              displayName: z.string(),
              description: z.string(),
              problemTypes: z.array(z.string()),
              stepCount: z.number(),
              estimatedDuration: z.string(),
            })
          ),
        }),
      },
      async () => {
        const workflows = listWorkflows();
    
        const payload = {
          count: workflows.length,
          workflows: workflows.map((wf) => ({
            name: wf.name,
            displayName: wf.displayName,
            description: wf.description,
            problemTypes: wf.problemTypes,
            stepCount: wf.steps.length,
            estimatedDuration: wf.estimatedDuration,
          })),
        };
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(payload, null, 2),
            },
          ],
          structuredContent: payload,
        } as const;
      }
    );
  • Input/output schemas for list_workflows tool defined using Zod. Input is empty object. Output contains count (number) and workflows array with name, displayName, description, problemTypes, stepCount, estimatedDuration.
      inputSchema: z.object({}),
      outputSchema: z.object({
        count: z.number(),
        workflows: z.array(
          z.object({
            name: z.string(),
            displayName: z.string(),
            description: z.string(),
            problemTypes: z.array(z.string()),
            stepCount: z.number(),
            estimatedDuration: z.string(),
          })
        ),
      }),
    },
  • Helper function that returns all workflow templates by extracting values from the WORKFLOW_TEMPLATES record. This is the core data source called by the tool handler.
    export function listWorkflows(): WorkflowTemplate[] {
      return Object.values(WORKFLOW_TEMPLATES);
    }
  • src/server.ts:28-29 (registration)
    The registration call that wires registerWorkflowTools into the MCP server during server creation, which registers the list_workflows tool among others.
    registerWorkflowTools(server); // Phase 2: Guided workflows
    registerExportTools(server);
Behavior3/5

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

With no annotations, the description carries the full burden. While 'get' implies a read-only operation, the description does not explicitly state safety, idempotency, or that no state changes occur. It also does not mention any prerequisites or side effects. Although the tool has no parameters, the behavioral transparency is only adequate.

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, clear sentence with no extraneous information. It is front-loaded and efficient, earning its place.

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

Completeness4/5

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

Given the simplicity of the tool (no parameters, output schema exists), the description is mostly complete. It could optionally mention that the output is a list of workflow names/IDs, but that is likely covered by the output schema. Minor room for improvement.

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 input schema has no parameters and schema description coverage is 100%. According to the rule, 0 parameters yields a baseline of 4. The description adds no parameter-specific information, but none is needed as there are no parameters.

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 retrieves all available guided workflows for problem-solving with Base120 mental models. It uses a specific verb ('get') and resource ('available guided workflows'). It distinguishes from sibling 'find_workflow_for_problem' which likely filters by problem, making the scope clear.

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?

The description implies usage for obtaining a full list of workflows, but does not explicitly provide guidance on when to use this tool versus alternatives like 'find_workflow_for_problem'. No when-not-to-use or exclusion criteria are mentioned.

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/hummbl-dev/mcp-server'

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