Skip to main content
Glama

execute_workflow

Run a specified workflow with optional streaming support using AutoGen MCP Server, enabling integration and multi-agent conversations with provided input data.

Instructions

Execute a workflow with streaming support

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
input_dataYesInput data
streamingNoEnable streaming
workflow_nameYesWorkflow name

Implementation Reference

  • MCP-style handler entry point for the execute_workflow tool, delegates to internal _execute_workflow method.
    async def handle_execute_workflow(self, arguments: Dict[str, Any]) -> Dict[str, Any]:
        """Handle execute_workflow tool call."""
        return await self._execute_workflow(arguments)
  • Primary handler logic for execute_workflow: parses arguments (workflow_name, input_data, etc.) and executes via WorkflowManager.
    async def _execute_workflow(self, args: Dict[str, Any]) -> Dict[str, Any]:
        """Execute a predefined workflow."""
        workflow_name = args["workflow_name"]
        input_data = args["input_data"]
        output_format = args.get("output_format", "json")
        quality_checks = args.get("quality_checks", False)
    
        try:
            result = await self.workflow_manager.execute_workflow(
                workflow_name, input_data, output_format, quality_checks
            )
            return {
                "success": True,
                "workflow": workflow_name,
                "result": result,
                "format": output_format
            }
        except Exception as e:
            return {"error": f"Workflow execution failed: {str(e)}"}
  • Core WorkflowManager.execute_workflow implementation: dispatches to template-specific workflows (e.g., code_generation) or custom workflows based on name.
    async def execute_workflow(
        self,
        workflow_name: str,
        input_data: Dict[str, Any],
        output_format: str = "json",
        quality_checks: bool = False
    ) -> Dict[str, Any]:
        """Execute a predefined workflow with enhanced features."""
        if workflow_name in self._workflow_templates:
            return await self._workflow_templates[workflow_name](
                input_data, output_format, quality_checks
            )
        elif workflow_name in self._workflows:
            return await self._execute_custom_workflow(
                self._workflows[workflow_name], input_data, output_format, quality_checks
            )
        else:
            raise ValueError(f"Unknown workflow: {workflow_name}")
  • Tool dispatcher (handle_tool_call) that registers/handles execute_workflow among other tools via elif branch.
    async def handle_tool_call(self, tool_name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:
        """Handle tool calls with enhanced AutoGen features."""
        try:
            if tool_name == "create_agent":
                return await self._create_agent(arguments)
            elif tool_name == "create_workflow":
                return await self._create_workflow(arguments)
            elif tool_name == "execute_chat":
                return await self._execute_chat(arguments)
            elif tool_name == "execute_group_chat":
                return await self._execute_group_chat(arguments)
            elif tool_name == "execute_nested_chat":
                return await self._execute_nested_chat(arguments)
            elif tool_name == "execute_swarm":
                return await self._execute_swarm(arguments)
            elif tool_name == "execute_workflow":
                return await self._execute_workflow(arguments)
            elif tool_name == "manage_agent_memory":
                return await self._manage_agent_memory(arguments)
            elif tool_name == "configure_teachability":
                return await self._configure_teachability(arguments)
            elif tool_name == "get_agent_status":
                return await self._get_agent_status(arguments)
            elif tool_name == "get_resource":
                return await self._get_resource(arguments)
            else:
                return {"error": f"Unknown tool: {tool_name}"}
        except Exception as e:
            return {"error": str(e)}
Behavior2/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It mentions 'streaming support', which hints at real-time output or progressive processing, but fails to detail critical aspects such as permissions needed, whether execution is destructive or idempotent, rate limits, or what happens on failure. This is a significant gap for a tool that likely performs operations.

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 with zero waste. It's front-loaded with the core action and includes a key feature (streaming support), making it appropriately sized and easy to parse quickly.

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 of executing workflows (likely involving processing and mutations), no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, error handling, return values, and how it differs from siblings. This leaves the agent under-informed for safe and effective 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 100%, so the schema already documents all three parameters (workflow_name, input_data, streaming). The description adds no additional meaning beyond implying that 'streaming' is a feature, but doesn't explain parameter interactions or provide examples. Baseline 3 is appropriate as the schema handles the heavy lifting.

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 'Execute a workflow with streaming support' states the action (execute) and resource (workflow), but is vague about what 'execute' entails (e.g., run, trigger, process) and doesn't differentiate from siblings like 'create_agent' or 'start_streaming_chat'. It mentions streaming support, which adds some specificity but lacks detail on the workflow's nature or scope.

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 is provided on when to use this tool versus alternatives. The description implies streaming is optional, but it doesn't specify scenarios for using streaming versus non-streaming, nor does it reference sibling tools like 'create_streaming_workflow' or 'start_streaming_chat' for context. This leaves the agent without clear usage instructions.

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

Related 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/DynamicEndpoints/Autogen_MCP'

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