Skip to main content
Glama
Unstructured-IO

Unstructured API MCP Server

Official

delete_workflow

Remove a workflow from the Unstructured API MCP Server by specifying its ID to manage and organize data processing pipelines.

Instructions

Delete a specific workflow.

Args:
    workflow_id: ID of the workflow to delete

Returns:
    String containing the response from the workflow deletion

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflow_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'delete_workflow' tool. It is registered via the @mcp.tool() decorator. The function takes a workflow_id, uses the UnstructuredClient to call delete_workflow_async with DeleteWorkflowRequest, and returns success or error message.
    @mcp.tool()
    async def delete_workflow(ctx: Context, workflow_id: str) -> str:
        """Delete a specific workflow.
    
        Args:
            workflow_id: ID of the workflow to delete
    
        Returns:
            String containing the response from the workflow deletion
        """
        client = ctx.request_context.lifespan_context.client
    
        try:
            response = await client.workflows.delete_workflow_async(
                request=DeleteWorkflowRequest(workflow_id=workflow_id),
            )
            return f"Workflow deleted successfully: {response.raw_response}"
        except Exception as e:
            return f"Error deleting workflow: {str(e)}"
  • Imports the DeleteWorkflowRequest schema from unstructured_client.models.operations, used in the delete_workflow handler for request validation.
        CancelJobRequest,
        CreateWorkflowRequest,
        DeleteWorkflowRequest,
        GetDestinationRequest,
        GetJobRequest,
        GetSourceRequest,
        GetWorkflowRequest,
        ListDestinationsRequest,
        ListJobsRequest,
        ListSourcesRequest,
        ListWorkflowsRequest,
        RunWorkflowRequest,
        UpdateWorkflowRequest,
    )
  • The @mcp.tool() decorator registers the delete_workflow function as an MCP tool.
    @mcp.tool()
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 of behavioral disclosure. It states the tool deletes a workflow but doesn't cover critical aspects like whether deletion is permanent, requires specific permissions, affects associated jobs, or has side effects. For a destructive operation with zero annotation coverage, this is a significant gap in transparency.

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 well-structured and front-loaded with the core purpose, followed by brief sections for args and returns. It avoids unnecessary words, though the returns section could be more informative. Overall, it's efficient and easy to parse.

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 destructive nature, lack of annotations, and an output schema (which handles return values), the description is minimally adequate. It covers the basic purpose and parameter but misses important behavioral details like irreversibility or dependencies, leaving gaps for safe agent 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 delete', which clarifies its role beyond the schema's basic title. With 0% schema description coverage and only one parameter, this compensation is adequate, though it doesn't detail ID format or sourcing.

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

Purpose5/5

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

The description clearly states the specific action ('Delete') and resource ('a specific workflow'), distinguishing it from sibling tools like 'create_workflow', 'update_workflow', and 'get_workflow_info'. It directly communicates the tool's function without ambiguity.

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. While the purpose is clear, there's no mention of prerequisites (e.g., workflow must exist), consequences (e.g., irreversible deletion), or when to choose deletion over other operations like updating or canceling jobs. The description lacks context for decision-making.

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