Skip to main content
Glama

get_parallel_downloads_setting

Retrieve and analyze parallel downloads configuration from pacman.conf to optimize package installation performance on Arch Linux systems.

Instructions

[CONFIG] Get parallel downloads configuration from pacman.conf and provide recommendations. Only works on Arch Linux.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function implementing the tool logic. It checks if running on Arch Linux, analyzes pacman.conf for parallel_downloads setting, generates recommendations based on the value, logs the action, and returns a structured dictionary with the setting, default status, and recommendations. Handles errors gracefully.
    async def get_parallel_downloads_setting() -> Dict[str, Any]: """ Get parallel downloads configuration. Returns: Dict with parallel downloads setting and recommendations """ if not IS_ARCH: return create_error_response( "NotSupported", "This feature is only available on Arch Linux" ) logger.info("Checking parallel downloads setting") try: result = await analyze_pacman_conf() if "error" in result: return result parallel_downloads = result.get("parallel_downloads", 1) # Recommendations recommendations = [] if parallel_downloads == 1: recommendations.append("Consider increasing ParallelDownloads to 3-5 for faster updates") elif parallel_downloads > 10: recommendations.append("Very high ParallelDownloads may strain mirrors; consider reducing to 5-7") logger.info(f"Parallel downloads: {parallel_downloads}") return { "parallel_downloads": parallel_downloads, "is_default": parallel_downloads == 1, "recommendations": recommendations } except Exception as e: logger.error(f"Failed to check parallel downloads: {e}") return create_error_response( "ConfigCheckError", f"Failed to check parallel downloads setting: {str(e)}" )
  • Tool registration in the @server.list_tools() function. Defines the tool name, description, and empty input schema (no parameters required). This makes the tool discoverable to MCP clients.
    Tool( name="get_parallel_downloads_setting", description="[CONFIG] Get parallel downloads configuration from pacman.conf and provide recommendations. Only works on Arch Linux.", inputSchema={ "type": "object", "properties": {} } ),
  • Input schema definition for the tool: an empty object since the tool takes no parameters. Part of the Tool registration in list_tools().
    Tool( name="get_parallel_downloads_setting", description="[CONFIG] Get parallel downloads configuration from pacman.conf and provide recommendations. Only works on Arch Linux.", inputSchema={ "type": "object", "properties": {} } ),
  • Tool invocation/dispatch in the @server.call_tool() handler. Checks Arch Linux environment, calls the get_parallel_downloads_setting function, and formats the result as JSON text content for MCP response.
    elif name == "get_parallel_downloads_setting": if not IS_ARCH: return [TextContent(type="text", text="Error: get_parallel_downloads_setting only available on Arch Linux systems")] result = await get_parallel_downloads_setting() return [TextContent(type="text", text=json.dumps(result, indent=2))]
  • Tool metadata definition categorizing it as 'config' tool for Arch platform, read permission, 'explore' workflow, with related tool analyze_pacman_conf.
    "get_parallel_downloads_setting": ToolMetadata( name="get_parallel_downloads_setting", category="config", platform="arch", permission="read", workflow="explore", related_tools=["analyze_pacman_conf"], prerequisite_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/nihalxkumar/arch-mcp'

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