Skip to main content
Glama
madorn
by madorn

set_fan_direction

Control ceiling fan airflow direction to optimize comfort and energy efficiency. Change fan rotation between forward (cooling) and reverse (winter) modes for your Bond Bridge device.

Instructions

Set fan direction for a ceiling fan device.

Args: device_id: The Bond fan device identifier direction: Fan direction ("forward" or "reverse")

Returns: Result of the direction change operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idYes
directionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The complete implementation of the 'set_fan_direction' tool handler, including the @mcp.tool() decorator for automatic registration in FastMCP. It validates the direction input, maps 'forward'/'reverse' to 1/-1, calls BondClient.set_direction, and handles errors.
    @mcp.tool()
    async def set_fan_direction(device_id: str, direction: str) -> Dict[str, Any]:
        """Set fan direction for a ceiling fan device.
        
        Args:
            device_id: The Bond fan device identifier
            direction: Fan direction ("forward" or "reverse")
            
        Returns:
            Result of the direction change operation.
        """
        direction_map = {"forward": 1, "reverse": -1}
        
        if direction.lower() not in direction_map:
            return {"error": "Direction must be 'forward' or 'reverse'"}
        
        try:
            async with await get_bond_client() as client:
                dir_value = direction_map[direction.lower()]
                result = await client.set_direction(device_id, dir_value)
                return {
                    "device_id": device_id,
                    "direction": direction.lower(),
                    "result": result
                }
        except BondAPIError as e:
            return {"error": f"Failed to set fan direction: {str(e)}"}
        except Exception as e:
            logger.error(f"Unexpected error setting fan direction: {e}")
            return {"error": f"Unexpected error: {str(e)}"}
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Set' implies a mutation operation, it doesn't specify whether this requires authentication, what happens on failure, if changes are immediate or reversible, or any rate limits. The return statement is vague about what 'Result' actually contains.

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 efficiently structured with a clear purpose statement followed by organized Args and Returns sections. Every sentence serves a distinct purpose with zero wasted words, making it easy to parse and understand quickly.

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?

For a mutation tool with no annotations and an output schema (though not shown), the description covers basic purpose and parameters adequately but lacks important behavioral context about permissions, side effects, and error handling. The presence of an output schema reduces the need to describe return values, but more operational guidance would be beneficial.

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?

With 0% schema description coverage, the description provides essential parameter context: device_id is identified as 'Bond fan device identifier' and direction is clarified to accept 'forward' or 'reverse' values. This adds meaningful semantics beyond the bare schema, though it doesn't explain format requirements for device_id.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Set fan direction') and target resource ('for a ceiling fan device'), distinguishing it from sibling tools like set_fan_speed or toggle_device_power. It precisely communicates the tool's function without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for controlling ceiling fan direction, but provides no explicit guidance on when to use this versus alternatives like set_fan_speed or toggle_device_power. It doesn't mention prerequisites, error conditions, or specific scenarios where this tool is appropriate.

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