Skip to main content
Glama
Unstructured-IO

Unstructured API MCP Server

Official

run_workflow

Execute a workflow by specifying its ID to process data through the Unstructured API, returning the execution response.

Instructions

Run a specific workflow.

Args:
    workflow_id: ID of the workflow to run

Returns:
    String containing the response from the workflow execution

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler and registration for the 'run_workflow' tool. This async function is decorated with @mcp.tool() which registers it with the MCP server. It executes the tool logic by calling the UnstructuredClient's run_workflow_async method using the provided workflow_id, handling exceptions and returning the response or error message.
    @mcp.tool()
    async def run_workflow(ctx: Context, workflow_id: str) -> str:
        """Run a specific workflow.
    
        Args:
            workflow_id: ID of the workflow to run
    
        Returns:
            String containing the response from the workflow execution
        """
        client = ctx.request_context.lifespan_context.client
    
        try:
            response = await client.workflows.run_workflow_async(
                request=RunWorkflowRequest(workflow_id=workflow_id),
            )
            return f"Workflow execution initiated: {response.raw_response}"
        except Exception as e:
            return f"Error running workflow: {str(e)}"
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 the tool executes a workflow and returns a response string, but lacks details on permissions required, whether it's idempotent, rate limits, error handling, or what the response entails (e.g., job ID, status). 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.

Conciseness5/5

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

The description is efficiently structured with a clear purpose statement followed by brief Arg and Return sections. Every sentence adds value without redundancy, making it easy to parse and front-loaded with essential information.

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?

Given the tool's complexity (executing workflows), lack of annotations, and presence of an output schema (which handles return values), the description is minimally adequate. It covers the basic purpose and parameter semantics but lacks behavioral details and usage guidelines, leaving gaps for safe and effective use.

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 description adds meaningful context for the single parameter 'workflow_id' by specifying it's the 'ID of the workflow to run', which clarifies its role beyond the schema's basic title. With 0% schema description coverage and only one parameter, this compensates well, though it doesn't detail format constraints (e.g., UUID).

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 action ('Run') and resource ('a specific workflow'), making the purpose immediately understandable. However, it doesn't distinguish this tool from potential alternatives or siblings like 'invoke_firecrawl_crawlhtml' or 'invoke_firecrawl_llmtxt' that might also execute workflows or similar processes.

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 doesn't mention prerequisites (e.g., needing an existing workflow), exclusions, or how it differs from sibling tools like 'create_workflow' or job-related tools, leaving the agent to infer usage context.

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/Unstructured-IO/UNS-MCP'

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