Skip to main content
Glama

mcp_cancel_job

Cancel long-running MCP jobs like ETCH or NEXUS operations in the WorkFlowy MCP Server by providing the job ID to stop ongoing processes.

Instructions

Request cancellation of a long-running MCP job (ETCH, NEXUS, etc.).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'mcp_cancel_job' tool. It retrieves the job from the in-memory registry, checks if it's cancellable, marks it as cancelling, and cancels the associated asyncio task.
    @mcp.tool(
        name="mcp_cancel_job",
        description="Request cancellation of a long-running MCP job (ETCH, NEXUS, etc.).",
    )
    async def mcp_cancel_job(job_id: str) -> dict:
        """Attempt to cancel a background MCP job.
    
        This sends an asyncio.CancelledError into the job task. The job will
        transition to status='failed' with an error message indicating
        cancellation.
        """
        job = _jobs.get(job_id)
        if not job:
            return {"success": False, "error": f"Unknown job_id: {job_id}"}
    
        task = job.get("_task")
        if task is None:
            return {"success": False, "error": "Job has no associated task (cannot cancel)."}
    
        if task.done():
            return {"success": False, "error": "Job already completed."}
    
        # Mark as cancelling for visibility; runner will finalize status
        job["status"] = "cancelling"
        task.cancel()
    
        return {"success": True, "job_id": job_id, "status": "cancelling"}
Behavior2/5

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

With no annotations provided, the description carries full burden. It mentions 'Request cancellation' which implies a mutation operation, but doesn't disclose behavioral traits such as permissions needed, whether cancellation is guaranteed or asynchronous, rate limits, or what happens if the job is already completed. This leaves significant gaps for a mutation tool.

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 that front-loads the key action and resource. Every word earns its place with no redundancy or unnecessary details, making it easy to parse quickly.

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 one parameter, no annotations, and an output schema (which handles return values), the description is minimally adequate. However, as a mutation tool with behavioral uncertainties, it should provide more context on outcomes or errors. The presence of an output schema prevents a lower score, but gaps remain.

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 description must compensate. It doesn't add any meaning beyond the schema's 'job_id' parameter—no explanation of what a job ID is, where to find it, or format examples. With only one parameter, the baseline is 4, but the lack of additional semantic context lowers the score.

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 ('Request cancellation') and target resource ('a long-running MCP job'), with examples of job types (ETCH, NEXUS, etc.). It distinguishes from siblings like 'mcp_job_status' by focusing on cancellation rather than status checking. However, it doesn't explicitly differentiate from all other job-related tools.

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 implies usage for 'long-running' jobs but provides no explicit guidance on when to use this tool versus alternatives, prerequisites, or constraints. No comparison to sibling tools like 'nexus_purge_keystones' or 'workflowy_etch_async' is made, leaving the agent to infer 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/daniel347x/workflowy-mcp-fixed'

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