Skip to main content
Glama

control

Destructive

Control connected devices and services, retrieve results, and capture camera snapshots.

Discover the device with endpoint_query or the room with group_query. Copy its full id, message and optional routeId; use the documented payload for the declared message. Send a matching payload ({} for a command without fields). Preserve the account that returned the IDs and clarify ambiguous targets before writes.

Most controls return status accepted: dispatch succeeded, but the physical outcome is unconfirmed. For result-returning commands, such as search, library pages and get-snapshot, set waitForResult=true. A correlated result returns status responded; snapshots also return image pixels and timeOfSample. Outbound declarations include events, so they do not guarantee that every command responds. For playback, volume and power, omit waitForResult and verify fresh state using endpoint_query or group_query with declared expand capabilities and forceDeviceAttributeQuery=true.

Live music queue recipe for "set up a playlist and play it on my Sonos": build an active playback queue unless the customer also asks to save a reusable library playlist. This recipe is available to tools-only clients without resources/read or bundled skills.

  1. Discover the Spotify library and the requested speaker or native group. On the library's declared media-search/search-media message, use payload {"query":"","type":"track"} and waitForResult=true. Copy playable canonical track IDs from the returned tracks; do not invent IDs or pass a search phrase to playback.

  2. Select the target route declaring media-queue, preferring the native Sonos route when available. Check its supportedMediaResources and maxItemsPerPlay. Send one play-queue message with payload {"mediaIds":["",""]} and the copied routeId. This starts a new ordered selection. play-queue has no queueVersion field; requiresQueueVersion applies only to add-to-queue. Do not emulate a queue with repeated single-track play-media commands.

  3. Send get-queue with payload {} and waitForResult=true on the same target and route. queue-contents returns currentMediaId, upcoming mediaIds, complete and an optional queueVersion. complete=false is a limited window, not proof that other songs are absent. Read FRESH media-player observations with endpoint_query/group_query, expand=["media-player"] and forceDeviceAttributeQuery=true before claiming playback.

  4. To add music without restarting, search for another track and send add-to-queue once with {"mediaId":""}. If requiresQueueVersion=true, first read get-queue and include its exact queueVersion in that append payload. Spotify Connect does not accept queueVersion; omit it there. Read the queue again after each append. A conflict or uncertain write requires inspection, never an automatic retry or replacement selection. No saved-playlist command is needed for this live-queue workflow.

A failed search does not establish that the speaker stopped or the whole connection is unavailable. Preserve current playback, report the failed operation, and use fresh device observations for playback claims. Do not substitute remembered song names or invented IDs for returned playable tracks. The search payload type is lowercase "track", not the uppercase capability configuration label "TRACK".

Room lighting scenes: use group_query with expand:["scene"] and forceDeviceAttributeQuery:true, select the requested native provider group/route, and inspect its declared messages. To recall an available scene, send scene/activate with {"sceneId":""} on that group and route. To save a new scene, first set the requested member lighting states, then send its declared scene/create-scene with {"name":""} and waitForResult=true. This snapshots the group's current light settings; it does not activate the scene. Use the returned scene-created.sceneId for activate, and fresh-query available-scenes before repeating an uncertain create. After recall, verify each affected light's fresh power/brightness and supported color state; dispatch acceptance or a scene label alone does not prove every light changed. Never create or recall a scene on another room or provider route as a fallback.

Use only capabilities and commands declared by the selected device or service. Examples of device classes and providers, subject to the connected integration's support:

  • Lights, switches and plugs: on/off and brightness (Philips Hue, Tuya, TP-Link).

  • Phones, tablets, laptops, wallets and trackers: locate or ring (Apple Find My, Tile).

  • Thermostats and temperature sensors: heat/cool settings; read ambient temperature with endpoint_query (Nest, Tuya, ecobee).

  • Cameras: request a declared get-snapshot command and inspect the returned pixels (Ring, Nest and other cameras). A snapshot is distinct from live video.

  • Connectivity and battery: check declared observations with endpoint_query for phones, watches, locks and other devices.

  • Smart locks and PINs: use declared lock and PIN commands (August, Yale, Ring, Seam).

  • Home appliances: supported controls and running-state observations (Samsung, LG, Xiaomi).

  • Robot vacuums: clean rooms and return to dock (Roomba, Roborock, Dreame). Send clean-room to the robot listing the room in controllableGroups with {"groupIds": []}. Bounded remote driving requires fresh visual feedback; cleaning is not navigation.

  • Speakers and announcements: supported speech and audio playback (Sonos, Alexa, Nest cameras).

  • TVs, remotes and media libraries: playback, volume, search and declared playlist operations (Spotify, Fire TV, YouTube, Chrome, TCL, Samsung, LG).

  • Files and photos: declared browse, download, upload, rename, move and delete commands (iCloud Photos, iCloud Drive, Google Drive, Outlook). download-file returns a URI; catalog presence alone does not establish upload support.

  • Litter robots and pet appliances: declared cleaning, waste and dispensing observations or controls.

  • Water sensors and sprinklers: declared water detection, watering state and controls.

  • Calendars and reminders: declared list, create, complete, reschedule and delete operations (iCloud Calendar and Reminders). Connected reminders are distinct from assistant-created scheduled tasks.

Read the relevant bundled skill reference or portos://guides/index for unfamiliar workflows. File/reminder deletion and PIN changes modify account data. Inspect partial or uncertain writes before another action. result_timeout means unknown outcome: read state before considering a retry. MESSAGE_UNSUPPORTED or MESSAGE_AMBIGUOUS means nothing was sent; correct the message from discovery. An unreachable device rejected the command. Never automatically retry a state-changing command or claim success from conflicting observations.

Use endpoint_manage/group_manage to change names, types, membership or merges.

Input Schema

NameRequiredDescriptionDefault
idYesFull Port OS endpoint ID (…/endpoints/…) from endpoint_query or group ID (…/endpoint-groups/…) from group_query.
messageYesFull message ID copied from the target's messages: <capability-interface-namespace>/messages/<message-name>, with an @<version> suffix only when the listed ID has one.
payloadYesJSON object matching the message payload schema. Use {} for messages without fields.
routeIdNoOptional provider route ID copied from the target routes. Reuse it for pause, resume and volume after playing through that provider. It must belong to id and advertise the requested message. Without it, the route declaring the most interfaces is used, then the highest route ID.
waitForResultNoWait for one correlated, schema-validated result for commands that retrieve results, such as camera snapshots, media search or library pages, when outboundMessages are declared. Playback and volume commands do not return correlated results. For power and other response-less controls omit it, then read fresh state with endpoint_query.
correlationTokenNoOptional caller-provided correlation token.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare destructive=true and openWorld=true, and the description earns that bar by disclosing the crucial behavioral trait that 'accepted' only means dispatch succeeded, not that the physical outcome occurred. It also decodes error semantics (result_timeout = unknown outcome, MESSAGE_UNSUPPORTED/AMBIGUOUS = nothing sent, unreachable = rejected) and forbids automatic retries of state-changing commands — none of which is in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded and organized with numbered steps, but it is extremely long and carries material that duplicates the schema (waitForResult is re-explained three times) and that arguably belongs in a bundled skill — it even advertises itself as being for 'tools-only clients without resources/read.' The device-class catalogue is useful for routing but bloats the definition considerably.

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?

For a six-parameter, open-world, destructive dispatch tool, the description covers discovery, payload construction, route selection, result semantics, failure modes and post-write verification. An output schema exists, so return values needn't be spelled out, yet the status vocabulary (accepted/responded, queue-contents fields) is explained where it affects agent behavior.

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 coverage is 100%, so the baseline is 3, but the description adds real routing semantics beyond the schema: which command classes return correlated results and therefore need waitForResult (search, library pages, get-snapshot) versus which must omit it (playback, volume, power), plus the rule to verify with fresh endpoint_query instead. It also clarifies that payload must match the declared message and that {} is used for fieldless commands.

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?

Opens with a specific verb-plus-resource statement ('Control connected devices and services, retrieve results, capture camera snapshots') and immediately positions the tool against its siblings by directing discovery to endpoint_query/group_query and metadata changes to endpoint_manage/group_manage. An agent can tell what this tool does and what it does not do without opening any schema.

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

Usage Guidelines5/5

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

Explicitly states the precondition (discover the endpoint/group first and copy the full id, message and routeId), the when-not (do not use this to rename or change membership — use endpoint_manage/group_manage), and names alternatives throughout. It even supplies end-to-end recipes for the two hardest workflows (live music queue, lighting scenes) with per-step tool routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources