Skip to main content
Glama

play

Initiate playback on a specified Sonos device or the current device. Returns device state details including volume, track info, and playback status for monitoring and control.

Instructions

Start playback on a Sonos device.

Args: name: The name of the device to start playback on. If None, uses the current device.

Returns: Dict[str, Any]: The device's state after starting playback, including name, volume, state, and track info.

Input Schema

NameRequiredDescriptionDefault
nameNo

Input Schema (JSON Schema)

{ "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Name" } }, "title": "playArguments", "type": "object" }

Implementation Reference

  • The implementation of the 'play' MCP tool. It is decorated with @mcp.tool() for registration and executes the playback logic by calling device.play() on the selected Sonos device, then returns the updated device information.
    @mcp.tool() def play(name: Optional[str] = None) -> Dict[str, Any]: """Start playback on a Sonos device. Args: name: The name of the device to start playback on. If None, uses the current device. Returns: Dict[str, Any]: The device's state after starting playback, including name, volume, state, and track info. """ device = get_device(name) device.play() return get_info_from(device)

Other Tools

Related 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/WinstonFassett/sonos-mcp-server'

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