Skip to main content
Glama
madorn
by madorn

send_custom_action

Control Bond smart home devices by sending custom actions like TurnOn, TurnOff, or SetSpeed to specific devices through the Bond MCP Server.

Instructions

Send a custom action to a Bond device.

Args: device_id: The Bond device identifier action: Bond action name (e.g., "TurnOn", "TurnOff", "SetSpeed") argument: Optional argument for the action

Returns: Result of the custom action.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idYes
actionYes
argumentNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'send_custom_action' tool, registered via @mcp.tool(). It sends a custom action to a Bond device using the BondClient, handling errors and returning results.
    @mcp.tool()
    async def send_custom_action(device_id: str, action: str, argument: Optional[int] = None) -> Dict[str, Any]:
        """Send a custom action to a Bond device.
        
        Args:
            device_id: The Bond device identifier
            action: Bond action name (e.g., "TurnOn", "TurnOff", "SetSpeed")
            argument: Optional argument for the action
            
        Returns:
            Result of the custom action.
        """
        try:
            async with await get_bond_client() as client:
                result = await client.send_action(device_id, action, argument)
                return {
                    "device_id": device_id,
                    "action": action,
                    "argument": argument,
                    "result": result
                }
        except BondAPIError as e:
            return {"error": f"Failed to send custom action: {str(e)}"}
        except Exception as e:
            logger.error(f"Unexpected error sending custom action: {e}")
            return {"error": f"Unexpected error: {str(e)}"}
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 this sends an action but doesn't disclose behavioral traits such as whether this is a read/write operation, potential side effects (e.g., device state changes), authentication needs, rate limits, or error handling. This is a significant gap for a tool that likely performs mutations.

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 appropriately sized and front-loaded with the core purpose, followed by structured sections for Args and Returns. Each sentence earns its place, but the Returns section is redundant given the presence of an output schema, slightly reducing efficiency.

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's moderate complexity (3 parameters, no annotations, but with an output schema), the description is partially complete. It covers parameters well but lacks behavioral context (e.g., mutation effects, error cases). The output schema reduces the need to explain return values, but overall, it's adequate with clear gaps in usage and transparency.

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?

Schema description coverage is 0%, but the description compensates by explaining all three parameters: 'device_id' as the Bond device identifier, 'action' as the Bond action name with examples, and 'argument' as optional with its type. This adds meaningful context beyond the bare schema, though it could specify format constraints (e.g., action naming conventions).

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 ('Send') and resource ('custom action to a Bond device'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'toggle_device_power' or 'set_fan_speed', which also control devices but through specific actions rather than custom ones.

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 like 'toggle_device_power' or 'set_fan_speed'. The description mentions it's for custom actions but doesn't clarify scenarios where this is preferred over the more specific sibling tools, leaving usage context implied at best.

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/madorn/bond-mcp-server'

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