Skip to main content
Glama

get_workflow

Retrieve a specific workflow by its ID to access structured, multi-step task sequences for execution and analysis.

Instructions

Get a specific workflow by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • The handler function that executes the 'get_workflow' tool logic. Parses the input arguments using GetWorkflowSchema, retrieves the workflow from storage using the provided ID, handles not-found errors, and returns the workflow as a JSON-formatted text response.
    private async getWorkflow(args: unknown) {
      const parsed = GetWorkflowSchema.parse(args);
      
      const workflow = await this.storage.get(parsed.id);
      if (!workflow) {
        throw new Error(`Workflow not found: ${parsed.id}`);
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              workflow,
            }, null, 2),
          },
        ],
      };
    }
  • Zod schema defining the input structure for the 'get_workflow' tool, requiring a single 'id' string parameter.
    const GetWorkflowSchema = z.object({
      id: z.string(),
    });
  • src/index.ts:262-266 (registration)
    Tool registration in the getTools() method, defining the name, description, and input schema for the 'get_workflow' tool.
    {
      name: 'get_workflow',
      description: 'Get a specific workflow by ID',
      inputSchema: zodToJsonSchema(GetWorkflowSchema),
    },
  • src/index.ts:126-127 (registration)
    Dispatch/registration in the CallToolRequestSchema handler switch statement, routing 'get_workflow' calls to the getWorkflow method.
    case 'get_workflow':
      return await this.getWorkflow(args);
  • Supporting method in WorkflowStorage that retrieves a workflow by ID from the filesystem, used by the getWorkflow handler.
    async get(id: string): Promise<Workflow | null> {
      try {
        const filePath = this.getWorkflowPath(id);
        const data = await fs.readFile(filePath, 'utf-8');
        return JSON.parse(data) as Workflow;
      } catch (error) {
        if ((error as any).code === 'ENOENT') {
          return null;
        }
        throw error;
      }
    }
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. It states 'get' but doesn't disclose behavioral traits such as whether this is a read-only operation, if it requires authentication, error handling for invalid IDs, or rate limits. The description is minimal and lacks critical context for safe invocation.

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's front-loaded with the core purpose. There's no wasted verbiage, making it highly concise and well-structured for quick understanding.

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 no annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't cover what the tool returns, error conditions, or behavioral nuances. For a tool with siblings and potential complexity, this leaves significant gaps for an AI agent.

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%, so the description must compensate. It mentions 'by ID', which adds meaning to the 'id' parameter, but doesn't explain the ID format, where to obtain it, or constraints. With 1 undocumented parameter, this is insufficient to guide effective use.

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

Purpose3/5

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

The description 'Get a specific workflow by ID' clearly states the action (get) and resource (workflow), but it's vague about what 'get' entails (e.g., retrieve metadata, fetch details). It distinguishes from siblings like 'list_workflows' by specifying 'by ID', but lacks specificity on the scope of information returned.

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 explicit guidance on when to use this tool versus alternatives. It implies usage when a specific workflow ID is known, but doesn't mention prerequisites, when not to use it (e.g., for listing workflows), or compare to siblings like 'get_workflow_versions' for version-specific details.

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