Skip to main content
Glama
snussik
by snussik

list_tools

Discover available OCR processing tools for extracting text and tables from documents into structured formats.

Instructions

List available OCR tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `list_tools` function is registered as an MCP tool via the `@app.tool("list_tools")` decorator. It returns a list of available `Tool` definitions, which include the tools supported by the OCR server.
    @app.tool("list_tools")
    async def list_tools() -> List[Tool]:
        """List available OCR tools."""
        return [
            Tool(
                name="process_local_file",
                description="Process a single local file from OCR_DIR with optional parameters",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "filename": {
                            "type": "string",
                            "description": "Name of the file to process (relative to OCR_DIR)",
                        },
                        "table_format": {
                            "type": "string",
                            "description": "Table formatting: null (inline), markdown, or html",
                            "enum": ["null", "markdown", "html"],
                        },
                        "extract_header": {
                            "type": "boolean",
                            "description": "Extract document headers (default: false)",
                        },
                        "extract_footer": {
                            "type": "boolean",
                            "description": "Extract document footers (default: false)",
                        },
                        "include_images": {
                            "type": "boolean",
                            "description": "Include base64 images in output (default: false for token efficiency)",
                        },
                    },
                    "required": ["filename"],
                },
            ),
            Tool(
                name="process_batch_local_files",
                description="Process multiple local files concurrently (optimal for 5+ files)",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "patterns": {
                            "type": "array",
                            "items": {"type": "string"},
                            "description": "Glob patterns to match files (e.g., ['*.pdf', 'scanned_*.jpg'])",
                        },
                        "max_files": {
                            "type": "integer",
                            "description": "Maximum number of files to process",
                        },
                        "table_format": {
                            "type": "string",
                            "description": "Table formatting: null, markdown, or html",
                            "enum": ["null", "markdown", "html"],
                        },
                        "extract_header": {
                            "type": "boolean",
                            "description": "Extract document headers",
                        },
                        "extract_footer": {
                            "type": "boolean",
                            "description": "Extract document footers",
                        },
                        "include_images": {
                            "type": "boolean",
                            "description": "Include base64 images in output",
                        },
                    },
                    "required": ["patterns"],
                },
            ),
            Tool(
                name="process_url_file",
                description="Process a file from a URL",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "url": {
                            "type": "string",
                            "description": "URL of the file to process",
                        },
                        "file_type": {
                            "type": "string",
                            "description": "Type of file: 'image' or 'pdf'",
                            "enum": ["image", "pdf"],
                        },
                        "table_format": {
                            "type": "string",
                            "description": "Table formatting: null, markdown, or html",
                            "enum": ["null", "markdown", "html"],
                        },
                        "extract_header": {
                            "type": "boolean",
                            "description": "Extract document headers",
                        },
                        "extract_footer": {
                            "type": "boolean",
                            "description": "Extract document footers",
                        },
                        "include_images": {
                            "type": "boolean",
                            "description": "Include base64 images in output",
                        },
                    },
                    "required": ["url", "file_type"],
                },
            ),
            Tool(
                name="create_batch_job",
                description="Create a batch processing job for large file sets (saves up to 50% cost)",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "patterns": {
                            "type": "array",
                            "items": {"type": "string"},
                            "description": "Glob patterns to match files",
                        },
                        "use_inline": {
                            "type": "boolean",
                            "description": "Use inline batch (for <10k files) or file batch (for larger)",
                        },
                        "table_format": {
                            "type": "string",
                            "description": "Table formatting: null, markdown, or html",
                            "enum": ["null", "markdown", "html"],
                        },
                        "extract_header": {
                            "type": "boolean",
                            "description": "Extract document headers",
                        },
                        "extract_footer": {
                            "type": "boolean",
                            "description": "Extract document footers",
                        },
                        "include_images": {
                            "type": "boolean",
                            "description": "Include base64 images in output",
                        },
                    },
                    "required": ["patterns"],
                },
            ),
            Tool(
                name="check_batch_status",
                description="Check the status of a batch processing job",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "job_id": {
                            "type": "string",
                            "description": "Batch job ID",
                        },
                    },
                    "required": ["job_id"],
                },
            ),
            Tool(
                name="download_batch_results",
                description="Download results from a completed batch job",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "job_id": {
                            "type": "string",
                            "description": "Batch job ID",
                        },
                    },
                    "required": ["job_id"],
                },
            ),
            Tool(
                name="cancel_batch_job",
                description="Cancel a running batch job",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "job_id": {
                            "type": "string",
                            "description": "Batch job ID",
                        },
                    },
                    "required": ["job_id"],
                },
            ),
            Tool(
                name="list_batch_jobs",
                description="List batch jobs with optional filtering",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "status": {
                            "type": "string",
                            "description": "Filter by status (QUEUED, RUNNING, SUCCESS, FAILED, etc.)",
                        },
                    },
                    "required": [],
                },
            ),
        ]
Behavior2/5

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

No annotations provided, yet description fails to disclose caching behavior, dynamic updates to available tools, or response format. Relies entirely on output schema (indicated in context) for return value documentation.

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?

Extremely brief (4 words) but appropriate for a zero-parameter discovery tool. No redundant information. However, single-sentence structure misses opportunity to add usage context without sacrificing clarity.

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?

Adequate for a simple discovery tool with existing output schema (per context signals) handling return documentation. Missing usage context prevents higher score, but meets minimum requirements given low complexity.

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?

Zero parameters present, which per guidelines warrants a baseline score of 4. Description correctly implies no filtering/parameters are accepted.

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+resource ('List available OCR tools') that distinguishes from processing siblings like process_local_file and create_batch_job. However, 'tools' is slightly ambiguous (could mean OCR engines vs API endpoints) and lacks the specificity seen in top-tier descriptions.

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 on when to invoke this versus other list operations (like list_batch_jobs) or when discovery is necessary (e.g., before submitting jobs). No prerequisites or alternatives mentioned.

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