Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MODULARSYNTH_PORTNoThe port the server listens on for the ModularSynth tab (default is 27900).27900

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

ModularSynth is a modular synthesizer running in the user's browser tab. You build and play patches with these tools; the user hears the result and can undo every change with Ctrl+Z.

How to work:

  • Call describe_patch first, and list_module_types (with a type) before using a module you don't know.

  • Signals are voltages: pitch is 1 V per octave (0 V = C4), gates and triggers are 0/10 V, audio is about ±5 V.

  • After building or changing something, check it: listen (levels at the Output, limiter, silent modules) and look (rack photo, a module's panel, oscilloscope and spectrum). Start the clock first for sequenced parts. Audio must be on: if it is off, ask the user to click the audio button in the top bar.

  • Drums: synthesize them with modules (kick: sine VCO whose pitch drops fast into a VCA with a short envelope; snare: noise through a band-pass VCF; hi-hat: high-passed noise, very short), or load the built-in kit into samplers (list_sounds, set_sample). Real instruments and voices: a sampler with the user's recording, or audioin.

  • Relative requests ("brighter", "faster", "more reverb", "a bit less"): nudge_param turns a knob up or down along its own travel.

  • Sequencers: set_steps (Trigger Seq patterns, Step Seq notes), set_notes and transform_notes (Note Grid). Chords need as many voices as notes (set_voices).

  • Playing together: every answer ends with what the user changed since your last action. When the user says "your turn" or plays something, call what_changed and answer musically.

  • show_player shows a small player in the conversation when the app supports it.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
describe_patchA

Describe the current patch in the ModularSynth rack: modules (id, type, settings, "bypass": true when bypassed), cables ("moduleId:port" → "moduleId:port"), polyphony, whether the clock is running, and "editing": the Note Grid the user has open in its editor right now (write there when they talk about "the notes"). Call it first.

list_module_typesA

List the module types you can add, with their inputs, outputs and settings (name, label shown on the panel, min, max, default, unit; "options": the meaning of each value of a selector, from min upward). Pass a type to get just that one. Audio and control signals are voltages: pitch is 1 V per octave (0 V = C4), gates are 0/10 V. Drums can be synthesized with modules, the modular way (kick: a sine VCO whose pitch drops fast, through a VCA with a short envelope; snare: noise through a band-pass VCF with a brief envelope; hi-hat: noise high-passed, very short — see the "Noise percussion" preset), or played by samplers from the built-in kit (list_sounds, set_sample) for a quick result; both are triggered by a Trigger Seq. Choose from what the user asks for. Real instruments and voices (saxophone, vocals…) can’t be synthesized convincingly: use a sampler with a recording the user drops on it (or one of their saved sounds), or audioin (the user’s microphone or line input).

list_presetsA

List the ready-made presets (name and what they do). Load one with load_preset to start from a working sound.

load_presetA

Replace the rack with a ready-made preset, by name (see list_presets). The user can undo it.

new_patchA

Replace the rack with the default starter patch (keyboard → oscillator → filter → amplifier → output). The user can undo it.

add_moduleA

Add a module to the rack. Optional row and x (in HP) place it; otherwise it goes to the first free spot. Optional params set its knobs. Returns its id. Drums: synthesize them with modules (VCO, Noise, VCF, ADSR, VCA) or load the built-in kit into samplers with set_sample. For a real instrument or a voice, a sampler with the user’s recording, or audioin for a microphone.

remove_moduleB

Remove a module and its cables from the rack.

connectA

Patch a cable from an output to an input, both written "moduleId:port". An input takes one cable: plugging into a busy input replaces its cable.

disconnectA

Unplug the cable going into an input ("moduleId:port").

set_paramB

Turn a knob or flip a switch on a module. The value is clamped to the setting range; the value actually set is returned.

nudge_paramA

Turn a knob up or down by a little, some (default) or a lot, along the knob's own travel (logarithmic for frequencies and times), never past its range — for relative requests: "brighter" (filter cutoff up), "darker", "faster" (clock bpm up), "more reverb" (mix up). The old and new values are returned.

set_bypassA

Bypass a module (on: true) or turn it back on (on: false), without unplugging anything: effects and processors (filters, VCA, mixers, delay, reverb…) pass their input straight through; sources and modulators (oscillators, LFO, envelopes, sequencers, clock…) go silent. Output, Scope and Memo can’t be bypassed. Useful to hear a part of a rich patch more clearly; the user can undo it.

set_notesA

Write the notes of one page (A–D, default A) of a Note Grid sequencer; the other pages are kept. Each note: start step (0–63: sixteenth notes when clocked by Clock ×4, thirty-second notes when the Note Grid "resolution" setting is 1), length in steps, MIDI pitch (60 = C4), optional velocity. Replaces the notes of that page. Only the page selected by the "page" setting plays: put a verse on A and a chorus on B, then save scenes with different "page" values.

set_stepsA

Write the steps of a sequencer in one call. Trigger Seq: "tracks", each a track (1–4) and a pattern of up to 16 characters, "x" a hit and "." a rest (e.g. "x...x...x...x..." four on the floor), on page A–D (default: the page the module shows); the other tracks are kept, and written tracks leave Euclidean mode. Step Seq: "notes", up to 16 MIDI pitches (60 = C4) or null for a silent step; the length follows, and each pitch is fitted to the module's scale and octave range (from C4 up), so the notes actually set are returned. For a Note Grid, use set_notes.

set_voicesA

Set the polyphony of the patch: how many notes can sound at once (1–16). Chords from a keyboard or a Note Grid need as many voices as notes; a mono bass or lead sounds best with 1.

transform_notesA

Transform one page (A–D, default: the page the module shows) of a Note Grid: "harmonize" adds the third (voices "third", default) or the third and fifth ("third+fifth") of the scale above each note; "humanize" varies velocities (and start times by one step at 1/32 resolution) by "amount" (0–1, default 0.5); "vary" copies the page to page "to" (default the next page) and moves about amount×30 % of the notes to a neighbouring scale note — a quick variation for a chorus or a break. Scale: "scale" and "root" (0 = C … 11 = B; scale indexes as in list_module_types for the Quant module), otherwise guessed from the notes.

play_notesA

Play notes live, as if on the keyboard (the patch must have a MIDI→CV module wired to sound, its KEYBOARD screen set to All or Computer). Each note: MIDI pitch (60 = C4), start and duration in seconds from now, optional velocity. Up to 64 notes within 30 seconds.

save_sceneA

Save the current settings and sequences of every module as a scene (like a snapshot: intro, verse, chorus, break…), or overwrite an existing scene. Up to 16 scenes. Tempo and the clock's run state are not part of scenes. Returns the scene id.

recall_sceneA

Switch to a saved scene, like pressing its button: on the next bar while the sound plays, right away otherwise. Stops the song if it was playing.

set_songA

Write the song: scenes played one after another, each for a number of bars (e.g. intro 4, verse 8, chorus 8, break 4, chorus 8). Up to 64 lines; an empty list removes the song. "loop": start again at the end (default true; otherwise the clocks stop). Needs a Clock in the patch to count bars.

play_songA

Play the song from its first line (or from line "from", counted from 0): the scene of each line plays for its bars, clocks restart on the first beat. Stop it with set_transport running: false.

listenA

Listen to the patch for a few seconds (default 2, up to 10) and report what actually sounds: for each Output module, its peak level in dBFS and whether the master limiter is squeezing it (too loud: lower a level or the Output gain); the peak voltage of every module output; and which modules are silent. Use it after building or changing a patch, with the clock running for sequenced parts, to check that it makes sound and is not too loud. Needs audio on.

lookA

See the synth: with no argument, a photo of the whole rack (modules, knob positions, cables); with "module", that module's panel plus an oscilloscope and spectrum of one of its outputs ("port", default the first output); with "output": true, the oscilloscope and spectrum of what reaches the Output. Use it to check a patch visually: a clipped or silent waveform, a filter closed too far, a bass that fills the spectrum. Scope and spectrum need audio on.

show_playerA

Show the ModularSynth player in the conversation (in apps that support MCP Apps): the patch name, play/stop and up to 6 knobs you choose ("moduleId:setting", the ones that matter most for this sound), so the user can play with them without leaving the chat. Call it when you have finished a patch. The sound still comes from the ModularSynth tab.

highlightA

Show the user a module, a knob or a jack by making it glow in the rack for a few seconds (the rack scrolls to it). target: "moduleId", "moduleId:setting" or "moduleId:port". With "to" (an input "moduleId:port") and an output as target, it draws the cable to plug as a dotted line. Use it when you explain or ask the user to turn or patch something.

list_soundsA

List the sounds a sampler can play: the built-in starter kit (kick, snare, hi-hat, a chord, a pad — always available, made by the synth itself) and the user’s own sounds saved in this browser. Load one with set_sample.

set_sampleB

Load a sound (an id from list_sounds) into a sampler module. Then trigger it with its gate input (from a Trigger Seq, a Note Grid or MIDI→CV) and choose how it plays with set_param "mode": 0 one-shot (drums), 1 hold (plays while the gate is high), 2 loop (synced to the clock).

set_transportA

Start or stop every Clock in the patch (the ▶/■ button): sequencers play while it runs. Stopping also stops a playing song.

what_changedA

What the user (and other assistants) changed in the patch since your last action: knobs turned, cables patched, modules added, scenes recalled, the clock started. Every tool answer already ends with this when something changed; call this to look again, for example when the user says "your turn" after playing — then answer what they did, like a musician would.

undoA

Undo the last change (yours or the user’s), like Ctrl+Z: first cancels a scene waiting for the next bar, stops a playing song.

Prompts

Interactive templates invoked by user choice

NameDescription
techno_loopBuild a driving techno loop: kick, hi-hats, an acid bass, and start it.
ambient_padA slow, evolving pad that plays by itself, with a long reverb.
explain_patchExplain the current patch, signal by signal, for a beginner.
teach_subtractiveA hands-on lesson: oscillator, filter, envelope, step by step.
remix_presetLoad a preset and give it a new character.
jam_with_mePlay together: you change something, the AI answers musically.

Resources

Contextual data attached and managed by the client

NameDescription
ModularSynth playerPlay/stop and a few knobs of the ModularSynth tab, in the conversation.

TDQS

A3.7/5.0

Scored across 30 tools

Disambiguation4/5

Most tools target a clearly distinct action/resource (patching, params, scenes, presets, transport), and the descriptions actively disambiguate tricky pairs like set_param vs nudge_param (absolute vs relative) and set_steps vs set_notes vs play_notes (per sequencer type vs live performance). The densest cluster — set_steps, set_notes, transform_notes, play_notes — still requires the agent to know which sequencer module is in the rack, and scene/preset/song tools (save_scene, recall_scene, load_preset, new_patch, set_song) overlap conceptually enough to cause occasional misselection.

Naming Consistency4/5

Consistently snake_case with a dominant verb_noun pattern (set_param, add_module, save_scene, play_song, list_presets). Deviations are single-verb tools for single-target actions (connect, disconnect, listen, look, undo, highlight), which are readable and conventional rather than chaotic.

Tool Count3/5

At 30 tools this is a heavy surface, but the domain (modular patching, sequencing, scenes, songs, presets, audio/visual feedback) is genuinely broad and nearly every tool maps to a real operation. A few pairs could be consolidated (connect/disconnect, load_preset/new_patch/recall_scene, save_scene with no accompanying list/delete), which keeps it just above the comfortable range.

Completeness4/5

Coverage is strong: create/remove modules, patch/unpatch cables, adjust params, program sequences, manage scenes and a song timeline, plus analysis tools (listen, look) and undo. The notable gap is scene management — you can save_scene and recall_scene, but there is no list_scenes or delete_scene, so scene ids only exist if the agent remembered them from prior calls.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues