Skip to main content
Glama
sealablab

Moku MCP Server

by sealablab

get_config

Retrieve current device configuration from the Moku MCP Server to access settings and parameters for control and management.

Instructions

Retrieve current device configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The implementation of the `get_config` tool handler in the `MokuMCP` server.
    async def get_config(self):
        """
        Retrieve current device configuration.
    
        Returns:
            {
                "platform": {...},
                "slots": {...},
                "routing": [...]
            }
    
        Implementation: See IMPLEMENTATION_GUIDE.md Section 3.5
        """
        from moku_models import MokuConfig, SlotConfig, MOKU_GO_PLATFORM
    
        if not self.moku_instance:
            return {
                "status": "error",
                "message": "Not connected to any device",
                "suggestion": "Call attach_moku first",
            }
    
        # If we have a cached config from push_config, use it
        if self.last_config:
            logger.info("Returning cached configuration")
            return self.last_config.model_dump()
    
        # Otherwise, try to reconstruct config from device state
        # NOTE: The Moku API may not provide full config retrieval
        logger.info("Reconstructing config from device state (best effort)")
    
        slots = {}
    
        # Query each slot (1-4 for Moku:Go)
        for slot_num in range(1, 5):
            try:
                instrument = self.moku_instance.get_instrument(slot_num)
                if instrument:
                    slots[slot_num] = SlotConfig(
                        instrument=instrument.__class__.__name__,
                        settings={},  # TODO: Extract settings from instrument if API supports
                    )
                    logger.debug(f"Slot {slot_num}: Found {instrument.__class__.__name__}")
            except Exception:
                # Slot not configured or error accessing it
                pass
    
        # Routing is harder to query - the Moku API doesn't provide a way to retrieve it
        # We can only return what we cached during push_config
        routing = []
        if self.last_config and self.last_config.routing:
            routing = self.last_config.routing
    
        # Build config object
        platform_config = MOKU_GO_PLATFORM.model_copy(
            update={"ip_address": self.connected_device}
        )
    
        config = MokuConfig(platform=platform_config, slots=slots, routing=routing)
    
        return config.model_dump()
Behavior2/5

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

With no annotations provided, the description carries full burden but discloses minimal behavioral traits. While 'Retrieve' implies read-only access, it does not explicitly confirm safety, describe the return format, or explain error conditions (e.g., if called before device attachment).

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 concise at four words. The single sentence is front-loaded and contains no filler, though it borders on under-specification given the lack of supporting annotations or output schema.

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?

Inadequate for operational use given no output schema exists. Fails to mention that device attachment is likely required (per sibling 'attach_moku'), does not describe configuration scope, and omits return value structure.

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?

Input schema contains zero parameters, establishing baseline 4 per rubric. No parameter semantics are required or provided.

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?

States a specific verb ('Retrieve') and resource ('device configuration'), making the basic function clear. However, it does not explicitly differentiate from sibling 'get_device_info', leaving ambiguity between configuration and general device information.

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?

Provides no guidance on when to use this tool versus alternatives like 'get_device_info' or 'push_config'. Does not mention prerequisites (e.g., requiring 'attach_moku' first) or typical workflows.

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