Skip to main content
Glama
sealablab

Moku MCP Server

by sealablab

get_device_info

Query device metadata including name, serial number, and IP address to identify and manage Moku devices on the network.

Instructions

Query device metadata (name, serial, IP, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual handler logic for 'get_device_info', which queries metadata from the device.
    async def get_device_info(self):
        """
        Query device metadata (name, serial, IP, etc.).
    
        Returns:
            {
                "ip": "192.168.1.100",
                "name": "Lilo",
                "serial": "MG106B",
                "platform": "Moku:Go",
                "connected": true
            }
    
        Implementation: See IMPLEMENTATION_GUIDE.md Section 3.7
        """
        from moku import Moku
    
        if not self.moku_instance:
            return {
                "status": "error",
                "message": "Not connected to any device",
                "suggestion": "Call attach_moku first",
            }
    
        try:
            # Query via Moku API
            # Create a temporary Moku instance to query metadata
            # (We need this because MultiInstrument doesn't expose these methods directly)
            temp_moku = Moku(ip=self.connected_device, force_connect=False, connect_timeout=5)
    
            try:
                name = temp_moku.name()
                serial = temp_moku.serial_number()
            finally:
                # Always release ownership on the temp connection
                temp_moku.relinquish_ownership()
    
            info = {
                "ip": self.connected_device,
                "name": name,
                "serial": serial,
                "platform": "Moku:Go",  # Inferred from platform_id=2
                "connected": True,
            }
    
            logger.info(f"Device info: {name} ({serial}) at {self.connected_device}")
            return info
    
        except Exception as e:
            logger.error(f"Failed to query device info: {e}")
            return {
                "status": "error",
                "message": "Failed to query device information",
                "details": str(e),
            }
  • Registration of the 'get_device_info' tool within the MCP server.
        name="get_device_info",
        description="Query device metadata (name, serial, IP, etc.)",
        inputSchema={
            "type": "object",
            "properties": {},
        },
    ),
  • Tool call dispatcher for 'get_device_info'.
    elif name == "get_device_info":
        if not server.moku_instance:
            error = {
                "status": "error",
                "message": "Not connected to any device",
                "suggestion": "Call attach_moku first",
            }
            return [TextContent(type="text", text=json.dumps(error, indent=2))]
    
        result = await server.get_device_info()
        return [TextContent(type="text", text=json.dumps(result, indent=2))]
Behavior2/5

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

No annotations provided, so description carries full burden. While 'Query' implies read-only, description does not explicitly confirm lack of side effects, error conditions (e.g., device not attached), or whether data is cached versus live. Insufficient disclosure for a hardware interaction tool.

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 efficient sentence with no wasted words. Front-loaded with verb and resource. However, given lack of annotations and output schema, the extreme brevity leaves significant gaps, suggesting it may be undersized for the tool's implicit complexity.

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?

Minimum viable for a zero-parameter tool: states what it returns. However, fails to compensate for missing output schema (no return format description) and missing annotations (no behavioral constraints). Does not address device attachment state requirements implied by sibling attach_moku.

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 per schema, establishing baseline of 4. Description correctly omits parameter discussion as none exist, avoiding unnecessary elaboration.

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?

Uses specific verb 'Query' with clear resource 'device metadata' and provides concrete examples (name, serial, IP). Distinguishes reasonably from sibling get_config by using 'metadata' versus configuration terminology, though explicit contrast would strengthen it further.

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 provided on when to use versus alternatives (e.g., discover_mokus for finding devices vs getting current device info). Critical omission: fails to mention prerequisite requirements (e.g., whether attach_moku must be called first given the sibling tool exists).

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/sealablab/moku-mcp'

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