{"at":"2026-11-23T04:46:54.399Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T04:46:54.808Z","dir":"received","era":"server_discover","message":{"error":{"code":-32601,"message":"Method not found"},"id":1,"jsonrpc":"2.0"}}
{"at":"2026-11-23T04:46:54.909Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T04:46:55.311Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"sfxbrew","version":"0.1.4"}}}}
{"at":"2026-11-23T04:46:55.311Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T04:46:55.311Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T04:46:55.315Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"readOnlyHint":true},"description":"List the procedural sound effect presets (Eastern wuxia/xianxia sounds and general game sounds) with category, tags and what each is good for. Optionally filter by category (combat, magic, instrument, ui, items, character, ambience, creature) or a search query such as \"metal\", \"calm\" or \"sword\". Every call to generate_sfx with a preset gives a new random variation; pass a seed to reproduce one.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"category":{"description":"Only presets in this category","enum":["combat","magic","instrument","ui","items","character","ambience","creature"],"type":"string"},"query":{"description":"Words that must all match the name, description, keywords or tags","type":"string"}},"type":"object"},"name":"list_presets","title":"List sound presets"},{"annotations":{"destructiveHint":false},"description":"Synthesize game sound effects locally from a preset and write 16-bit mono 44.1 kHz WAV files. Free for commercial use, no attribution. Returns file paths, the seed of each variant (reuse it to get the exact same sound) and the patch JSON (edit it and call render_patch to fine-tune). Presets: swordQi, guqin, bell, gong, spell, thunder, lightning, breakthrough, talisman, alchemy, chime, flute, qiGather, pipa, erhu, woodfish, drum, coin, pickup, click, confirm, error, jump, hit, explosion, laser, powerUp, levelUp, whoosh, arrow, swordClash, footstepStone, rain, notify, footstepGrass, land, shieldBlock, wind, campfire, stream, caveDrip, pageTurn, typing, chestOpen, monsterGrowl.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"count":{"description":"Number of variants to write (default 1). Useful to let the user pick, or for randomized playback.","maximum":20,"minimum":1,"type":"integer"},"js_path":{"description":"Also write a dependency-free .js file with play functions for these sounds (Web Audio, no audio files needed)","type":"string"},"loop_seconds":{"description":"Write a seamless loop of about this many seconds instead of a one-shot (the WAV carries a loop point). Only for loopable presets: rain, wind, campfire, stream, drum, caveDrip, thunder, chime, monsterGrowl. Use for background ambience.","maximum":120,"minimum":3,"type":"number"},"mutate":{"description":"Extra random tweak amount on top of the seeded result, 0-1 (e.g. 0.15)","maximum":1,"minimum":0,"type":"number"},"out_path":{"description":"WAV file to write, e.g. \"assets/sfx/coin.wav\". Relative paths resolve against the server working directory. With count > 1, files get -01, -02 ... suffixes.","type":"string"},"preset":{"description":"Preset id, see list_presets","enum":["swordQi","guqin","bell","gong","spell","thunder","lightning","breakthrough","talisman","alchemy","chime","flute","qiGather","pipa","erhu","woodfish","drum","coin","pickup","click","confirm","error","jump","hit","explosion","laser","powerUp","levelUp","whoosh","arrow","swordClash","footstepStone","rain","notify","footstepGrass","land","shieldBlock","wind","campfire","stream","caveDrip","pageTurn","typing","chestOpen","monsterGrowl"],"type":"string"},"seed":{"description":"Seed for a reproducible result; variant i uses seed + i","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["preset","out_path"],"type":"object"},"name":"generate_sfx","title":"Generate sound effect WAV files"},{"annotations":{"destructiveHint":false},"description":"Render a hand-edited patch (for example one returned by generate_sfx with changed values) to a WAV file.\nA patch is JSON: { layers: Layer[1..6], reverb 0-1, echo 0-0.9, echoTime s, drive 0-1, crush 0|1-16 bits, gain 0-1 }.\nLayer fields (all optional, defaults in brackets):\n  type: \"tone\"|\"fm\"|\"string\"|\"pluck\"|\"bell\"|\"noise\" [\"tone\"]; wave: \"sine\"|\"triangle\"|\"square\"|\"sawtooth\" (tone/fm/pluck)\n  string: physically modelled plucked string (Karplus-Strong); bright 0-1 [0.5] = darker (guqin) to brighter (pipa); decay = ring time\n  bell: partials = [[ratio, amplitude, decayMultiplier 0-1], ...] (max 16) for custom bells, gongs, wood blocks; default is a metal bar\n  sample: a CC0 recording; sample = one of drum-center-loud, drum-center-soft, drum-edge-loud, drum-rim, lightning-1, lightning-2, gong-1, gong-2, erhu-d3, erhu-f5, sword-clash, footstep-stone, arrow, footstep-grass, land, shield-block, page-turn, typewriter, chest-open, monster-growl, campfire, stream; pitch / pitchEnd semitones (slide over slideTime); offset s into the recording;\n          set hold ≈ recording length to let it ring naturally (lengths s: drum-center-loud 2.7, drum-center-soft 2.7, drum-edge-loud 3.5, drum-rim 1.8, lightning-1 6.5, lightning-2 7, gong-1 10, gong-2 12, erhu-d3 4.9, erhu-f5 6, sword-clash 7.2, footstep-stone 5.4, arrow 4, footstep-grass 3.2, land 2.1, shield-block 3.6, page-turn 8.75, typewriter 4.55, chest-open 11.1, monster-growl 12.8, campfire 10.4, stream 10.4)\n  freq, freqEnd: Hz, pitch slides exponentially from freq to freqEnd; slideTime: s the slide takes (0 = whole sound)\n  hold: s to stay at full volume before the decay starts (louder, more violent bodies)\n  repAccel: gap multiplier per repeat (<1 speeds up, e.g. 0.86 for an accelerating drum build-up); repGain: loudness multiplier per repeat (>1 crescendo)\n  freqPeak / cutoffPeak (Hz, 0 = off): go up to this value by the end of attack, then down to freqEnd / cutoffEnd (Doppler-like pass-by for swishes)\n  start: s delay; attack: s; decay: s (exponential fade); vol: 0-1\n  filter: \"none\"|\"lowpass\"|\"highpass\"|\"bandpass\"; cutoff, cutoffEnd: Hz; sweepTime: s (0 = whole); q: resonance\n  vib: vibrato depth in cents; vibRate: Hz\n  rep: number of repeats; repGap: s between repeats; repStep: pitch step per repeat; scale: \"penta\"|\"chromatic\" (unit of repStep)\n  jitter 0-1: random gaps (1 = Poisson-like) and loudness per repeat; pitchJitter: semitones of random pitch/cutoff per repeat (crackles, bubbles, debris)\n  noise layers: color \"white\"|\"pink\"|\"brown\"; any layer: trem 0-1 + tremRate Hz = wavering loudness (flames, rumble)\n  patch.seed: integer that fixes the random pattern of jitter\n  unison: 1-5 stacked voices; detune: cents spread\n  fmRatio, fmIndex, fmDecay: FM modulator ratio, depth and how fast the depth decays (type \"fm\" only)\nTips: punchy impacts = short noise layer (decay ~0.01) + tone with fast slideTime (~0.04); metallic = fm or bell; keep total vol*gain under ~1.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"js_path":{"description":"Also write a .js file with a play function for this sound","type":"string"},"name":{"description":"Name used for the JS play function (default: file name)","type":"string"},"out_path":{"description":"WAV file to write","type":"string"},"patch":{"additionalProperties":{},"description":"Patch JSON object with a \"layers\" array","propertyNames":{"type":"string"},"type":"object"}},"required":["patch","out_path"],"type":"object"},"name":"render_patch","title":"Render a custom sound patch"},{"annotations":{"readOnlyHint":true},"description":"Return one self-contained JavaScript snippet (Web Audio, ~7 KB, no dependencies, no audio files) that defines play functions for several sounds. Best for browser games: paste it in and call e.g. playCoin() after a user gesture. Each sound is either {name, preset, seed} or {name, patch}.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"sounds":{"items":{"properties":{"name":{"description":"Used for the function name, e.g. \"coin\" -> playCoin()","type":"string"},"patch":{"additionalProperties":{},"description":"Custom patch instead of preset","propertyNames":{"type":"string"},"type":"object"},"preset":{"enum":["swordQi","guqin","bell","gong","spell","thunder","lightning","breakthrough","talisman","alchemy","chime","flute","qiGather","pipa","erhu","woodfish","drum","coin","pickup","click","confirm","error","jump","hit","explosion","laser","powerUp","levelUp","whoosh","arrow","swordClash","footstepStone","rain","notify","footstepGrass","land","shieldBlock","wind","campfire","stream","caveDrip","pageTurn","typing","chestOpen","monsterGrowl"],"type":"string"},"seed":{"description":"Seed from generate_sfx to get the same sound; random if omitted","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["name"],"type":"object"},"maxItems":50,"minItems":1,"type":"array"}},"required":["sounds"],"type":"object"},"name":"get_js_code","title":"Get drop-in JavaScript for sounds"},{"annotations":{"destructiveHint":false},"description":"Write a ready-to-use folder for game engines: several WAV variations of one preset (or several seamless loops), a Godot 4 AudioStreamRandomizer (.tres, plays a random variation each time), a Unity SfxBrewPlayer.cs component, a plain Web Audio .js player and a README. Loop WAVs carry a loop point that Godot, FMOD, Wwise and GameMaker read. Writes <out_dir>/sfxbrew-<preset>/. For Godot, out_dir should be the project root (res://) so the .tres paths resolve.","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"count":{"description":"Number of variations (default 8) or loops (default 2, max 6)","maximum":30,"minimum":1,"type":"integer"},"loop_seconds":{"description":"Make seamless loops of about this many seconds. Only for: rain, wind, campfire, stream, drum, caveDrip, thunder, chime, monsterGrowl","maximum":120,"minimum":3,"type":"number"},"out_dir":{"description":"Directory to create the sfxbrew-<preset> folder in, e.g. \".\" for a Godot project root or \"Assets/Audio\" for Unity","type":"string"},"preset":{"description":"Preset id, see list_presets","enum":["swordQi","guqin","bell","gong","spell","thunder","lightning","breakthrough","talisman","alchemy","chime","flute","qiGather","pipa","erhu","woodfish","drum","coin","pickup","click","confirm","error","jump","hit","explosion","laser","powerUp","levelUp","whoosh","arrow","swordClash","footstepStone","rain","notify","footstepGrass","land","shieldBlock","wind","campfire","stream","caveDrip","pageTurn","typing","chestOpen","monsterGrowl"],"type":"string"},"seed":{"description":"Seed for reproducible results; variation i uses seed + i","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["preset","out_dir"],"type":"object"},"name":"export_pack","title":"Export a game-engine sound pack"},{"annotations":{"destructiveHint":false},"description":"Compose and render background music locally as a seamless stereo WAV loop (the WAV carries a loop point; one full piece with intro, themes and outro, about 1-2 minutes). Every seed is a different piece in the same style. Moods: calm (Calm Eastern piece: guqin and bamboo flute over strings. Exploration, villages, menus.); battle (Eastern battle music: pipa, spiccato low strings and big war drums. Combat, bosses.); mystery (Sparse, misty Eastern piece: flute and guqin over held strings, wooden fish. Caves, ruins, night.); sad (Slow erhu lament over strings and guqin. Loss, farewells, sad story beats.); primitive (Stone age: bone flute over a hummed drone, log drums, clapping sticks and a shaker. Cavemen, tribal camps, prehistory.); tribal (Early village: clay ocarina (xun) and bamboo flute, plucked zither, frame and log drums, low hum. Farming villages, early civilisation.); medieval (Medieval folk tune in dorian: fiddle and shawm, lute, bagpipe drone, frame drum and tambourine. Towns, taverns, markets, castles.). Also renders short stingers instead when \"stinger\" is given: victory (Bright drum hit, pipa run and bell. Win, quest complete.); defeat (Falling guqin, low bell and erhu. Loss, game over.); battleStart (Three war drum hits and a gong. A fight begins.); treasure (Rising chimes and a bell. Treasure, rare item.); breakthrough (Low bell, rising guqin and flute. Level up, realm breakthrough.); guiltCannibal (About 2 s, quiet: an erhu note sags down over a low hum. A dark deed (eating your own kind).); guiltChild (About 2 s, quiet: two ocarina notes a semitone apart. A terrible deed (harming a child).); grief (About 2.5 s, quiet: a low hum with two guqin notes. Someone close has died.).","execution":{"taskSupport":"forbidden"},"inputSchema":{"$schema":"http://json-schema.org/draft-07/schema#","properties":{"count":{"description":"Number of different pieces (default 1)","maximum":10,"minimum":1,"type":"integer"},"mood":{"description":"Music style for a loop","enum":["calm","battle","mystery","sad","primitive","tribal","medieval"],"type":"string"},"out_path":{"description":"WAV file to write, e.g. \"assets/music/town.wav\". With count > 1, files get -01, -02 ... suffixes.","type":"string"},"seed":{"description":"Seed for a reproducible piece; piece i uses seed + i","maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"stinger":{"description":"Render this short stinger instead of a loop","enum":["victory","defeat","battleStart","treasure","breakthrough","guiltCannibal","guiltChild","grief"],"type":"string"}},"required":["out_path"],"type":"object"},"name":"generate_music","title":"Compose a music loop"}]}}}
