Skip to main content
Glama
snussik
by snussik

cancel_batch_job

Stop a running batch OCR processing job in the MCP Mistral OCR Optimized server to manage document extraction operations.

Instructions

Cancel a running batch job.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argumentsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The cancel_batch_job tool handler, which validates the job_id argument and calls the batch processor to cancel the job.
    @app.tool("cancel_batch_job")
    async def cancel_batch_job(arguments: Dict[str, Any]) -> List[TextContent]:
        """Cancel a running batch job."""
        job_id = arguments.get("job_id")
        if not job_id:
            raise McpError(ErrorData(code=INVALID_PARAMS, message="job_id is required"))
    
        try:
            batch_proc = await get_batch_processor()
            result = await batch_proc.cancel_job(job_id)
    
            return [
                TextContent(
                    type="text", text=json.dumps(result, indent=2, ensure_ascii=False)
                )
            ]
        except Exception as e:
            raise McpError(
                ErrorData(
                    code=INTERNAL_ERROR, message=f"Error canceling batch job: {str(e)}"
                )
            )
Behavior2/5

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

No annotations provided, so description carries full disclosure burden. Mentions 'running' state but fails to explain cancellation semantics (graceful vs immediate, reversible vs permanent, data loss implications), processing time, or success/failure behaviors despite having an output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

Extremely concise at four words, but under-specification rather than efficient communication. No wasted words, but insufficient content for a mutative operation with complex parameters and undocumented output schema.

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?

Inadequate for tool complexity: cancellation is typically a sensitive destructive operation, yet description omits parameter details (despite 0% schema coverage), output format (despite existing output schema), error conditions, and authorization requirements.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage with a single generic parameter 'arguments' (object with additionalProperties: true). Description fails to compensate by documenting expected fields (e.g., job_id, force flag) or providing examples of the argument structure.

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?

States specific verb 'Cancel' and resource 'batch job', and qualifies with 'running' to indicate state precondition. Distinguishes clearly from siblings like create_batch_job, check_batch_status, or download_batch_results through distinct action verb.

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?

Only implies usage through the word 'running', suggesting it applies to active jobs. No explicit guidance on when to use versus alternatives, prerequisites (e.g., job ID required), or side effects of cancellation.

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/snussik/mcp_mistral_ocr_opt'

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