Skip to main content
Glama

Generate a game sound effect

generate_sound

Synthesize retro/8-bit game sound effects (pickup, shoot, explosion) and export them as WAV files, with optional parameter tuning for pitch, length, and filtering.

Instructions

Synthesize a retro/8-bit game sound effect with the Bfxr engine and save it as a .wav file.

Presets: pickup_coin, laser_shoot, explosion, powerup, hit_hurt, jump, blip_select, random, tone. Pick the preset closest to what was asked for, then shape it with params:

  • coin/pickup/collect -> pickup_coin; laser/shoot/zap -> laser_shoot; explosion/boom -> explosion

  • powerup/level-up -> powerup; damage/hurt/impact -> hit_hurt; jump/hop -> jump; UI click/menu blip -> blip_select

  • anything else -> start from tone (a plain sine) or random and set params by hand. Useful shaping params: frequency_start (pitch), frequency_slide (up/down glide), sustainTime + decayTime (length), sustainPunch (attack pop), lpFilterCutoff (muffle), bitCrush (lo-fi crunch), vibratoDepth/Speed, overtones (thicker).

Never set play or embed_audio, and never call play_sound — the user always plays sounds in the library UI. Prefer count=3..5, then report file paths. After writing, refresh the library in Cursor at http://localhost:4747. Each sound comes back with a bfxr.net permalink the user can open to tweak it by ear.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoBase filename, e.g. 'coin' -> coin.wav. Default: the preset name.
playNoDo not set this. The user plays sounds in the library UI.
seedNoSeed the randomization so the same call reproduces the same sound(s).
countNoHow many variations to generate (presets are randomized). Default 1.
paramsNoBfxr parameter overrides, applied on top of the preset. Any of: masterVolume, waveType, attackTime, sustainTime, sustainPunch, decayTime, compressionAmount, frequency_start, frequency_slide, frequency_acceleration, min_frequency_relative_to_starting_frequency, vibratoDepth, vibratoSpeed, pitch_jump_repeat_speed, pitch_jump_amount, pitch_jump_onset_percent, pitch_jump_2_amount, pitch_jump_onset2_percent, overtones, overtoneFalloff, squareDuty, dutySweep, repeatSpeed, flangerOffset, flangerSweep, lpFilterCutoff, lpFilterCutoffSweep, lpFilterResonance, hpFilterCutoff, hpFilterCutoffSweep, bitCrush, bitCrushSweep. Call list_parameters for ranges and meanings.
presetNoStarting point. One of: pickup_coin, laser_shoot, explosion, powerup, hit_hurt, jump, blip_select, random, tone. Default: tone.
save_bfxrNoAlso write a .bfxr project file next to each .wav. Default false.
wave_typeNoWaveform by name. Overrides the preset's choice.
output_dirNoWhere to write files. Default: $BFXR_OUTPUT_DIR or ~/Downloads/bfxr-sounds.
embed_audioNoDo not set this. The user plays sounds in the library UI.
Behavior4/5

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

With no annotations, the description discloses side effects: saving .wav files, optionally writing .bfxr project files, and requiring a library refresh. It also informs the agent about the bfxr.net permalink in the output and warns against setting play/embed_audio. This gives a clear picture of the tool's behavior, though it doesn't cover file-overwrite or directory-creation edge cases.

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

Conciseness5/5

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

The description is structured with clear sections: purpose, preset mapping, shaping params, and usage rules. Every sentence conveys actionable information—no fluff or repetition. Despite its length, it remains efficient and scannable.

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 the tool's 10 parameters, nested params object, and no output schema, the description covers all essential aspects: how to choose presets, how to shape sounds, what not to do, and the follow-up refresh step. It also points to `list_parameters` for detailed ranges, filling any residual gaps.

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?

The input schema already has 100% parameter coverage, so the description adds extra semantic value by grouping useful shaping params with everyday meanings (frequency_start=pitch, sustainTime+decayTime=length, lpFilterCutoff=muffle). It also maps presets to user intents, which helps select the right preset. This goes beyond the schema's basic 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?

The description opens with 'Synthesize a retro/8-bit game sound effect with the Bfxr engine and save it as a .wav file.' This clearly states the action (synthesize), the resource (retro/8-bit game sound effect), and the output (.wav file). It also distinguishes from siblings by explicitly saying 'never call play_sound'.

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?

The description provides preset mapping rules (coin→pickup_coin, laser→laser_shoot, etc.), and tells the agent to use `tone` or `random` for anything else. It also gives explicit exclusions ('Never set play or embed_audio, and never call play_sound') and practical guidance ('Prefer count=3..5', 'refresh the library in Cursor'). These instructions define exactly when and how to use this tool.

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/zaynabed/bfxr-mcp'

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