Skip to main content
Glama
j0KZ
by j0KZ

compose_patch

Generates a complete Pure Data patch for music composition based on user-provided genre, mood, tempo, key, instruments, and effects.

Instructions

Compose a complete musical Pd patch from a high-level song description. Before calling this tool, ask the user about genre, mood, tempo, key, instruments, and effects — use the song_analysis prompt as a guide. Only call this tool once you have enough info. Genres: ambient, techno, house, dnb, experimental, idm, minimal, drone, noise. Moods: dark, bright, aggressive, chill, ethereal, melancholic, energetic. Instrument roles: lead, bass, pad, drums, arpeggio, sequence, texture, modulator. Each role auto-selects appropriate templates (e.g. lead → sequencer + synth, texture → noise synth + granular). IMPORTANT: The complete .pd content is ALWAYS returned in the response — present it directly to the user as code blocks. STOP after presenting the result. Do NOT run bash, ls, mkdir, cat, cp, mv, or ANY file/shell operations after this tool. Do NOT try to save, create, write, or verify files — NEVER use artifacts or file downloads. Everything is already in the response text. Just show the content to the user as-is.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
genreYesMusical genre: "ambient", "techno", "house", "dnb", "experimental", "idm", "minimal", "drone", "noise".
tempoNoBPM (20-300). Defaults to genre preset. Clamped to genre range.
moodNoMood modifier: "dark", "bright", "aggressive", "chill", "ethereal", "melancholic", "energetic". Defaults to genre preset.
keyNoMusical key. Defaults to genre preset.
instrumentsNoInstrument specifications. Defaults to genre preset instruments.
effectsNoEffect chain: ["reverb"], ["granular"], or ["reverb", "granular"]. Defaults to genre preset.
controllerNoMIDI controller integration. Generates controller patches.
outputDirNoOptional ABSOLUTE directory path to write all .pd files. Only use if the user explicitly requests saving to a specific path. If omitted, content is returned but not written to disk.
Behavior5/5

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

No annotations provided, but the description fully discloses behavior: auto-selects templates per role, always returns .pd content in response, warns against shell/file operations, and explains outputDir's role. Contradiction false.

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?

Well-structured with main purpose first, then prerequisites, enumerated values, and critical warnings. Slightly verbose but every sentence is informative. Front-loads key info.

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?

Given 8 parameters, nested objects, and no output schema, the description covers all necessary aspects: prerequisites, value ranges, output handling, and post-call actions. An agent can use this tool correctly.

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?

Schema coverage is 100%, baseline 3. The description adds value by listing all possible values for genre, mood, roles, and explaining template selection logic, going beyond schema descriptions.

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?

Clearly states it composes a complete Pd patch from a high-level description. Distinguishes from sibling tools like analyze_patch or generate_vcv by focusing on high-level composition with genre, mood, instruments, etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly instructs to first gather user info about genre, mood, tempo, etc., and only call once enough info is gathered. Also tells to present results as code blocks and avoid file operations, providing clear when-to-use and not-to-use guidance.

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/j0KZ/synthlab-mcp-server'

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