Skip to main content
Glama
jsebgiraldo

OpenWRT SSH MCP Server

by jsebgiraldo

openwrt_opkg_info

Retrieve detailed information about OpenWRT packages to verify availability, dependencies, and installation status for remote router management.

Instructions

Get detailed information about a specific package

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
package_nameYesName of the package

Implementation Reference

  • The actual implementation of opkg_info that validates package name format, executes 'opkg info {package_name}' command, parses the output into a dictionary, and returns the package information
    @staticmethod
    async def opkg_info(package_name: str) -> dict[str, Any]:
        """
        Get information about a package.
        
        Args:
            package_name: Name of the package
            
        Returns:
            dict: Package information
        """
        # Validate package name
        if not re.match(r'^[a-zA-Z0-9._-]+$', package_name):
            return {
                "success": False,
                "error": "Invalid package name. Use only alphanumeric characters, dash, underscore, and dot.",
            }
    
        command = f"opkg info {package_name}"
        result = await OpenWRTTools.execute_command(command)
    
        if result["success"]:
            # Parse package info
            info = {}
            for line in result["output"].strip().split("\n"):
                if ": " in line:
                    key, value = line.split(": ", 1)
                    info[key.lower().replace(" ", "_")] = value
    
            return {
                "success": True,
                "package_info": info,
            }
        else:
            return {
                "success": False,
                "error": result["error"],
                "output": result["output"],
            }
  • Tool registration with schema definition including the tool name, description, and inputSchema defining package_name as a required string parameter
    Tool(
        name="openwrt_opkg_info",
        description="Get detailed information about a specific package",
        inputSchema={
            "type": "object",
            "properties": {
                "package_name": {
                    "type": "string",
                    "description": "Name of the package",
                },
            },
            "required": ["package_name"],
        },
    ),
  • Handler routing logic that extracts package_name from arguments, validates it's present, and delegates to OpenWRTTools.opkg_info(package_name)
    elif name == "openwrt_opkg_info":
        package_name = arguments.get("package_name")
        if not package_name:
            raise ValueError("Missing required argument: package_name")
        result = await OpenWRTTools.opkg_info(package_name)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states it 'gets' information, implying a read-only operation, but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what 'detailed information' includes (e.g., version, dependencies, size). This leaves significant gaps for a tool with no annotation coverage.

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

Conciseness5/5

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

The description is a single, efficient sentence with no wasted words. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

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?

Given no annotations and no output schema, the description is incomplete. It doesn't explain what 'detailed information' entails, how results are structured, or any behavioral context. For a tool with one parameter but missing structured output details, this leaves the agent with insufficient guidance.

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

Parameters3/5

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

Schema description coverage is 100%, with the parameter 'package_name' clearly documented in the schema. The description adds no additional meaning beyond what the schema provides, such as format examples or constraints, so it meets the baseline for high schema coverage.

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 verb ('Get') and resource ('detailed information about a specific package'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'openwrt_opkg_list_installed' or 'openwrt_opkg_list_available', which reduces specificity.

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 is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context for package selection, or how it differs from other opkg-related tools in the sibling list.

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/jsebgiraldo/openwrt_ssh_mcp'

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