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

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)}"

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