Skip to main content
Glama

get_homekit_code

Get the HomeKit setup code from a discovered WeMo device to add it to Apple Home. Input device name or IP to retrieve the code in XXX-XX-XXX format.

Instructions

Get the HomeKit setup code for a WeMo device.

Retrieves the HomeKit setup code (HKSetupCode) for devices that support HomeKit integration. This code can be used to add the device to Apple Home. The device must have been discovered via scan_network first.

Note: Not all WeMo devices support HomeKit. If a device doesn't support HomeKit or doesn't have a setup code, an error will be returned.

Args:

device_identifier: Device name (e.g., "Office Light") or IP address (e.g., "192.168.1.100")

Returns:

Dictionary containing:
- success: Boolean indicating if the code was retrieved
- device_name: Name of the device
- homekit_code: The HomeKit setup code (format: XXX-XX-XXX)
- device_ip: IP address of the device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_identifierYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description must disclose behavioral traits. It clearly states prerequisites (device discovered, HomeKit support) and the possibility of an error. It also describes the return format. No contradictions or hidden side effects are evident.

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 well-structured with clear sections: summary, prerequisites, note, Args, Returns. Every sentence adds necessary information without redundancy. It is concise yet comprehensive.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given there is one parameter and an output schema (implied by context), the description covers all essential aspects: what it does, prerequisites, parameter usage, and return value structure. No gaps are apparent.

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?

The schema provides only a type 'string' for 'device_identifier' with 0% coverage. The description adds significant meaning: it explains the parameter can be a device name (e.g., 'Office Light') or IP address (e.g., '192.168.1.100'), which is essential for the agent to use it correctly.

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 tool retrieves a HomeKit setup code for a WeMo device. The verb 'Get' and resource 'HomeKit setup code' are specific. This distinguishes it from sibling tools like 'control_device' or 'get_device_status', which perform different functions.

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

Usage Guidelines4/5

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

The description explains that the device must be discovered via 'scan_network' first and notes that not all devices support HomeKit, implying when not to use. It does not explicitly compare to siblings, but the context is sufficient for an agent to decide when to invoke this tool.

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/apiarya/wemo-mcp-server'

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