Skip to main content
Glama

wake_on_lan

Wake a remote computer from sleep by sending a magic packet to its MAC address. Specify optional broadcast address for network delivery.

Instructions

Send a Wake-on-LAN magic packet to a MAC address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
macYes
broadcastNo255.255.255.255

Implementation Reference

  • The handler function for the wake_on_lan MCP tool. Accepts a MAC address and optional broadcast IP, delegates to the wakeonlan library's send_magic_packet, and returns a dict indicating success or error.
    @mcp.tool()
    def wake_on_lan(mac: str, broadcast: str = "255.255.255.255") -> dict:
        """Send a Wake-on-LAN magic packet to a MAC address."""
        try:
            send_magic_packet(mac, ip_address=broadcast)
            return {"mac": mac, "broadcast": broadcast, "sent": True}
        except Exception as e:
            return {"error": str(e), "tool": "wake_on_lan", "mac": mac}
  • Registration of the wake_on_lan function as an MCP tool via the @mcp.tool() decorator on the FastMCP instance. This is the registration point.
    @mcp.tool()
  • The function signature defines the input schema: mac (str, required) and broadcast (str, optional with default '255.255.255.255'). The return type is dict.
    def wake_on_lan(mac: str, broadcast: str = "255.255.255.255") -> dict:
  • Import of the external wakeonlan library's send_magic_packet function, which is the underlying helper that actually sends the magic packet over the network.
    from wakeonlan import send_magic_packet
Behavior2/5

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

No annotations exist, so the description must fully disclose behavior. It only states the action but omits side effects (e.g., no response expected, potential need for subnet broadcast configuration, and that the tool is one-way and non-blocking).

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?

Single sentence with no unnecessary words. Front-loaded action and resource. Every word earns its place.

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?

The tool has two simple parameters and no output schema, but the description lacks details on protocol specifics (port, UDP) and typical usage patterns. It is minimally adequate for an agent familiar with WOL, but could be more complete.

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

Parameters2/5

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

Schema description coverage is 0%. The description clarifies that 'mac' is a MAC address and 'broadcast' defaults to 255.255.255.255, but does not specify MAC format (e.g., colons vs dashes) or broadcast address validity across subnets. This is minimal improvement over the schema.

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 uses a specific verb ('Send') and resource ('Wake-on-LAN magic packet') to state exactly what the tool does. It clearly distinguishes from sibling tools (e.g., ping, port_check) which perform other network operations.

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, nor are there prerequisites or context about network configuration (e.g., target machine must support WOL, magic packet typically sent on port 9).

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/aaronckj/mcp-nettools'

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