Skip to main content
Glama

save_workflow

Store and organize creation workflows for future reuse, enabling consistent implementation of development processes.

Instructions

Save a creation workflow for reuse.

Args:
    name: Workflow name
    description: Workflow description
    steps: list of workflow steps

Returns:
    Confirmation message

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
descriptionYes
stepsYes

Implementation Reference

  • main.py:248-279 (handler)
    MCP tool handler for 'save_workflow'. Registers the tool and implements the logic by delegating to the workflow_engine instance from the request context.
    @mcp.tool()
    async def save_workflow(
        ctx: Context,
        name: str,
        description: str,
        steps: list[dict],
    ) -> str:
        """
        Save a creation workflow for reuse.
    
        Args:
            name: Workflow name
            description: Workflow description
            steps: list of workflow steps
    
        Returns:
            Confirmation message
        """
        try:
            workflow_engine = ctx.request_context.lifespan_context["workflow_engine"]
    
            workflow_id = await workflow_engine.save_workflow(
                name=name,
                description=description,
                steps=steps,
            )
    
            return f"✅ Workflow '{name}' saved successfully (ID: {workflow_id})"
    
        except Exception as e:
            logger.error(f"Failed to save workflow: {e}")
            return f"❌ Error saving workflow: {str(e)}"
  • Core helper method in WorkflowEngine class that implements the actual workflow saving logic, including ID generation, object creation, in-memory storage, and persistence to disk.
    async def save_workflow(
        self,
        name: str,
        description: str,
        steps: list[dict[str, Any]],
    ) -> str:
        """Save workflow with automatic ID generation."""
        workflow_id = str(uuid4())[:8]
    
        # Convert step dictionaries to WorkflowStep objects
        workflow_steps = [WorkflowStep(**step) for step in steps]
    
        workflow = Workflow(
            name=name,
            description=description,
            steps=workflow_steps,
        )
    
        # Save to memory and disk
        self.workflows[workflow_id] = workflow
        await self._persist_workflow(workflow_id, workflow)
    
        logger.info(f"Saved workflow: {name} ({workflow_id})")
        return workflow_id
  • main.py:248-248 (registration)
    The @mcp.tool() decorator registers the save_workflow function as an MCP tool.
    @mcp.tool()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states 'save' implies a write operation but doesn't cover permissions, idempotency, error handling, or what 'confirmation message' entails. This is inadequate for a mutation tool with zero annotation coverage.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded with the core purpose in the first sentence. The Args and Returns sections are structured but could be more integrated; overall, it's efficient with minimal waste.

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?

For a mutation tool with 3 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, parameter constraints, error cases, and the nature of the return value, making it insufficient for reliable agent use.

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

Parameters3/5

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

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description lists parameters (name, description, steps) and adds that steps are a 'list of workflow steps', offering some semantic value beyond the bare schema. However, it doesn't detail format, constraints, or examples, leaving significant gaps.

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 'save' and resource 'creation workflow' with the purpose 'for reuse', making the tool's function understandable. However, it doesn't differentiate from sibling tools like 'list_templates' or 'create_mcp_server', which might be related to workflow management, so it doesn't achieve full sibling differentiation.

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 like 'list_templates' or 'create_mcp_server'. It mentions 'for reuse' but doesn't specify prerequisites, timing, or exclusions, leaving the agent with minimal context for tool selection.

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/angrysky56/mcp-creator-mcp'

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