Skip to main content
Glama

esp_media

Press hardware media keys—mute, volume, playback, track navigation—on the ESP32 device, with configurable press counts, regardless of which window is active.

Instructions

Press a media key on the hardware device: mute, volume_up, volume_down, play_pause, next_track, previous_track, stop; count presses (e.g. 5 volume steps). Works whatever window is in front. Needs firmware 0.3.0 (firmware_incompatible otherwise).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "key": "<key>",
      "control_id": "<control_id>"
    },
    "name": "esp_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesThe media key.
countNoHow many presses, 1..50 (default 1), e.g. 5 for five volume steps.
control_idYesFrom esp_control begin.
request_idNoOptional idempotency key: repeating a call with the same request_id within 5 min returns the first receipt (also an uncertain one) without running the action again.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the action is a hardware-level key press, that it is focus-independent, and that firmware 0.3.0 is required with a 'firmware_incompatible' error otherwise. It stops short of saying what happens when no media handler is active, but the key behavioral traits are covered.

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

Conciseness4/5

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

One front-loaded sentence with a clear action-first structure; every clause is relevant. The count example duplicates the schema slightly, keeping it from being maximally tight.

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 simple action tool with no output schema and no annotations, the description supplies action scope, count semantics, focus-independence, and the firmware prerequisite with its error code. That is enough for an agent to call it correctly without opening anything else.

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

Parameters3/5

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

Schema coverage is 100%, so key, count, control_id and request_id are already documented. The description's enumeration of keys and 'count presses (e.g. 5 volume steps)' restates the schema's own enum and count example rather than adding syntax or edge-case meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Press a media key on the hardware device') and enumerates the exact key set, so an agent can identify the action immediately. It does not explicitly distinguish itself from siblings like esp_keys or esp_button, though 'media key' and 'works whatever window is in front' implicitly separate it.

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?

Usage context is implied: it is the tool for media keys, and 'Works whatever window is in front' signals it works regardless of focus, unlike window-targeted input. There is no explicit when-to-use-vs-alternative guidance or exclusion, so an agent must infer the routing from esp_keys/esp_button itself.

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