Skip to main content
Glama

Switch the default audio device

hs_audio_set_device

Switch the system default audio device to a specified output or input, using exact name match or substring fallback, and list available devices when no match is found.

Instructions

Make an audio device the system default, for example switching output to headphones or a display. Matches the name exactly first, then falls back to a case-insensitive substring, and lists the available devices when nothing matches.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDevice name from hs_audio_devices. A substring is accepted.
directionNoWhich default to change. Output is speakers and headphones, input is microphones.output
Behavior4/5

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

With no annotations provided, the description carries the full burden of transparency. It clearly discloses the three-step matching behavior (exact match, substring, list devices on no match), which is excellent. However, it does not mention potential side effects like needing system permissions or whether the change is persistent.

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 three concise sentences with no fluff. It is front-loaded with the core function, followed by examples and matching behavior. Every sentence adds value, making it easy to parse quickly.

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

Completeness4/5

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

For a tool with a simple schema and no output schema, the description is complete and self-contained. It explains the default behavior and error conditions (listing devices). Minor omissions like not stating whether the action returns a success indicator, but this is not critical for a tool of this complexity.

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 already provides good descriptions for both parameters (100% coverage). The tool description adds valuable detail about the exact matching semantics (exact first, case-insensitive substring) and what happens when no match is found. This goes beyond the schema, which only mentions 'substring is accepted', enriching the user's understanding.

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's purpose: 'Make an audio device the system default' with concrete examples ('headphones or a display'). It also explains the fallback matching behavior, fully distinguishing it from sibling tools like hs_audio_devices which lists devices.

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 usage context is implied through the description of how devices are matched and the fallback behavior, but there is no explicit mention of when to use this tool versus alternatives like hs_audio_volume or hs_audio_devices. It relies on the reader to infer the appropriate use case.

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/vukvukovich/hammerspoon-mcp'

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