Skip to main content
Glama

check_system_dependencies

Verify required system dependencies are installed for the Auto-Snap MCP server to automate screenshot capture and document processing.

Instructions

Check if all required system dependencies are installed.

Returns:
    JSON string with dependency check results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Main handler function for the 'check_system_dependencies' tool. Decorated with @mcp.tool() for registration. Orchestrates dependency checks using imported helpers and formats results as JSON.
    @mcp.tool()
    async def check_system_dependencies() -> str:
        """
        Check if all required system dependencies are installed.
        
        Returns:
            JSON string with dependency check results.
        """
        try:
            missing_deps = check_dependencies()
            tesseract_available = check_tesseract()
            
            result = {
                "status": "success",
                "dependencies": {
                    "wmctrl": "wmctrl" not in missing_deps,
                    "xdotool": "xdotool" not in missing_deps,
                    "tesseract": tesseract_available
                },
                "missing_dependencies": missing_deps,
                "install_commands": {
                    "wmctrl": "sudo apt-get install wmctrl",
                    "xdotool": "sudo apt-get install xdotool",
                    "tesseract": "sudo apt-get install tesseract-ocr"
                }
            }
            
            if missing_deps or not tesseract_available:
                result["status"] = "warning"
                result["message"] = "Some dependencies are missing"
            
            return json.dumps(result, indent=2)
            
        except Exception as e:
            logger.error(f"Failed to check dependencies: {e}")
            return json.dumps({
                "status": "error",
                "error": str(e)
            })
  • Helper function that checks availability of Linux window management tools wmctrl and xdotool, called by the main handler.
    def check_dependencies() -> List[str]:
        """
        Check if required system dependencies are installed.
        Returns list of missing dependencies.
        """
        missing = []
        
        # Check for wmctrl
        try:
            subprocess.run(['wmctrl', '--version'], capture_output=True, check=True, timeout=5)
        except (subprocess.CalledProcessError, FileNotFoundError, subprocess.TimeoutExpired):
            missing.append('wmctrl')
        
        # Check for xdotool
        try:
            subprocess.run(['xdotool', '--version'], capture_output=True, check=True, timeout=5)
        except (subprocess.CalledProcessError, FileNotFoundError, subprocess.TimeoutExpired):
            missing.append('xdotool')
        
        return missing
  • Helper function that verifies Tesseract OCR installation via pytesseract, used by the main handler.
    def check_tesseract() -> bool:
        """
        Check if Tesseract OCR is installed and accessible.
        
        Returns:
            True if Tesseract is available, False otherwise
        """
        try:
            import signal
            
            def timeout_handler(signum, frame):
                raise TimeoutError("Tesseract check timed out")
            
            # Set timeout for tesseract check
            signal.signal(signal.SIGALRM, timeout_handler)
            signal.alarm(10)  # 10 second timeout
            
            try:
                pytesseract.get_tesseract_version()
                return True
            finally:
                signal.alarm(0)  # Cancel the alarm
                
        except (TimeoutError, Exception) as e:
            logger.error(f"Tesseract not available: {e}")
            return False
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions the return format ('JSON string with dependency check results'), which is useful, but lacks details on behavioral traits: it doesn't specify what 'required' means, whether it checks versions, if it's read-only/destructive, or any error handling. The output schema exists, but the description could add more context.

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 concise and front-loaded: the first sentence states the purpose, and the second describes the return. It wastes no words, though it could be slightly more informative (e.g., explaining what 'dependencies' entail).

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 has no parameters, an output schema, and no annotations, the description is minimally complete. It covers the basic purpose and return format, but lacks context on usage scenarios or behavioral details (e.g., what happens if dependencies are missing). For a simple check tool, this is adequate but with clear gaps.

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?

There are 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add param info, but that's acceptable here. Baseline is 4 for zero parameters, as it doesn't need to compensate for gaps.

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 tool's purpose: 'Check if all required system dependencies are installed.' It uses a specific verb ('Check') and identifies the resource ('system dependencies'). However, it doesn't differentiate from sibling tools (which are mostly about capturing/processing documents), though this may not be necessary given the distinct domain.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., before running other tools), exclusions, or related tools. The context of sibling tools suggests it might be used before capture/processing operations, but this is not stated.

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/PovedaAqui/auto-snap-mcp'

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