dglab-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| DGLAB_MAX_STEP | No | Maximum upward change per command. | 5 |
| DGLAB_PULSE_DIR | No | Directory for external .pulse files. | ~/.dglab-mcp/pulses |
| DGLAB_RELAY_URL | No | DG-LAB V4 relay endpoint. | wss://trex.dungeon-lab.cn/v4 |
| DGLAB_MAX_INTENSITY | No | Absolute output ceiling on the 0-200 scale. | 30 |
| DGLAB_HEARTBEAT_TIMEOUT_MS | No | Watchdog timeout for the control lease. | 20000 |
| DGLAB_MAX_WAVEFORM_DURATION_MS | No | Maximum waveform duration. | 10000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| dglab_connectA | Start (or reuse) the DG-LAB 4 V4 relay session. Returns the pairing QR code (PNG), the app socket URL, and the session link. Scan the QR code or open the link with the DG-LAB 4 mobile app to pair. Safe to call again to fetch pairing info for an existing session. |
| dglab_disconnectA | Emergency-stop every device, then destroy the relay session and all cached pairing state. |
| dglab_get_statusA | Read relay state, the safety lease, paired apps, devices (battery, Bluetooth state, A/B intensity, channel condition, mute, comfort limits, effective ceilings), and waveform tasks. Set refresh to re-query device lists from the apps first. |
| dglab_set_intensityA | Set one output channel (A or B) to an absolute target on the 0-200 scale. The target must not exceed the effective ceiling (software cap DGLAB_MAX_INTENSITY=30 tightened by device limits) and increases are limited to steps of 5. Reductions and 0 are always allowed. |
| dglab_adjust_intensityA | Apply a signed intensity delta to one channel. Positive deltas are limited to +5 per call and to the effective ceiling; negative deltas are unrestricted. |
| dglab_list_waveformsA | List built-in Coyote presets and external .pulse waveforms with ids, labels, source, and natural duration. The pulse directory is rescanned on every call, so newly added or changed files appear immediately. |
| dglab_play_waveformA | Play a named waveform (built-in preset or hot-loaded .pulse file; matching is case/separator-insensitive across ids and English/Chinese names) on one channel. Optionally repeat or truncate it to durationMs (max 10000ms). Requires a safe nonzero intensity on the channel; never changes intensity. Playback replaces the channel's current waveform task. |
| dglab_play_custom_waveformA | Compile and play semantic waveform segments (ramp, hold, pulse, silence) on one channel. Total duration is capped at 10000ms. Requires a safe nonzero intensity on the channel; never changes intensity. |
| dglab_stop_channelA | Clear all waveform tasks and reset the intensity of one channel to 0. |
| dglab_emergency_stopA | Immediately stop every channel and waveform task on every paired app and device, bypassing all queues. Cannot be undone by pending commands. |
| dglab_heartbeatA | Renew the control lease (timeout 20000ms) to keep output enabled while idle. When no output is active this succeeds as a no-op. If the lease ever expires, all outputs are stopped automatically. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 11 tools
Each tool targets a distinct concern: session lifecycle, status, channel stopping, absolute vs. relative intensity, waveform discovery, file-based vs. custom playback, emergency stop, and lease renewal. Even similar tools like set_intensity and adjust_intensity are clearly separated by absolute vs. delta semantics.
All tools share the dglab_ prefix and mostly follow a verb_object pattern: connect, disconnect, stop_channel, set_intensity, play_waveform. The main deviation is dglab_heartbeat, which is a noun rather than a verb_object command, but it remains predictable and readable within the set.
Eleven tools is well-scoped for a device-control server. Each tool covers a meaningful part of session management, safety, intensity control, and waveform playback without excessive fragmentation.
The tool surface covers the full control lifecycle: connect, disconnect, status, intensity, waveform playback, emergency stop, and lease renewal. A minor gap is that status exposes settings like mute and comfort limits, but there are no direct tools to modify those settings.