Skip to main content
Glama
snussik
by snussik

download_batch_results

Retrieve processed OCR results from completed batch jobs to access extracted text and structured data in markdown or HTML formats.

Instructions

Download results from a completed batch job.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argumentsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler implementation for the 'download_batch_results' tool, which takes a 'job_id', downloads the results using the batch processor, and returns the path to the results file.
    @app.tool("download_batch_results")
    async def download_batch_results(arguments: Dict[str, Any]) -> List[TextContent]:
        """Download results from a completed 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()
            results_path = await batch_proc.download_job_results(job_id, config.output_dir)
    
            return [
                TextContent(
                    type="text",
                    text=json.dumps(
                        {
                            "message": "Batch results downloaded successfully",
                            "results_file": results_path,
                            "job_id": job_id,
                        },
                        indent=2,
                        ensure_ascii=False,
                    ),
                )
            ]
        except Exception as e:
            raise McpError(
                ErrorData(
                    code=INTERNAL_ERROR,
                    message=f"Error downloading batch results: {str(e)}",
                )
            )
Behavior2/5

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

No annotations provided, so description carries full burden. Mentions 'completed' constraint but fails to disclose: result format, idempotency, whether download is destructive/removes server-side data, size limits, or required authentication/permissions. Minimal behavioral disclosure.

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?

Single sentence with no redundancy. Appropriately front-loaded with action and target. However, excessive brevity contributes to under-documentation rather than efficient communication.

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?

Critical gaps for a batch job download tool. Despite having output schema (reducing need to describe return values), tool lacks: parameter documentation (what identifies the job?), error behaviors (what if incomplete?), and relationship to sibling tools in the batch workflow.

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?

Complete failure. Schema has 0% coverage with generic 'arguments' object (additionalProperties: true). Description provides zero parameter guidance - doesn't specify that job_id is required, what fields belong in arguments, or expected parameter structure. Description adds no meaning beyond the schema.

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?

Clear verb 'Download' and resource 'results from a completed batch job'. Implicitly distinguishes from siblings like create_batch_job, check_batch_status, and cancel_batch_job by specifying the download action and completed state requirement.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies proper timing via 'completed batch job', suggesting prerequisite workflow (job must finish first). However, lacks explicit guidance on when NOT to use (e.g., running/failed jobs), doesn't reference check_batch_status as a prerequisite, and omits alternatives for incomplete jobs.

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