Skip to main content
Glama
BradA1878
by BradA1878

sc_play_synth_advanced

Generate audio synthesis by playing specific synth types with customizable parameters including frequency, amplitude, duration, pan, and filter controls.

Instructions

Play a specific synth with explicit parameters. Available synths: sine, pluck, bell, bass, pad, kick, snare, hihat, atmosphere, sweep

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
synthNameYesName of the synth to play
freqNoFrequency in Hz (default: 440)
ampNoAmplitude 0-1 (default: 0.3)
durationNoDuration in seconds (default: 1)
panNoPan position -1 (left) to 1 (right) (default: 0)
decayNoDecay time for pluck synth (default: 2)
cutoffNoFilter cutoff frequency for bass/pad (default: varies)
startFreqNoStart frequency for sweep (default: 100)
endFreqNoEnd frequency for sweep (default: 2000)

Implementation Reference

  • Handler function for 'sc_play_synth_advanced': parses Zod schema, checks server booted and synthDefs loaded, builds SuperCollider Synth command string with provided parameters, executes it via scServer.executeCode, returns status message.
    case 'sc_play_synth_advanced': {
      const schema = z.object({
        synthName: z.string(),
        freq: z.number().optional(),
        amp: z.number().optional(),
        duration: z.number().optional(),
        pan: z.number().optional(),
        decay: z.number().optional(),
        cutoff: z.number().optional(),
        startFreq: z.number().optional(),
        endFreq: z.number().optional(),
      });
      const params = schema.parse(args);
    
      if (!scServer.getBooted() || !synthDefsLoaded) {
        return {
          content: [{ type: 'text', text: 'Error: SuperCollider server is not running. Call sc_boot first.' }],
          isError: true,
        };
      }
    
      const { synthName, ...synthParams } = params;
      const paramStr = Object.entries(synthParams)
        .filter(([_, value]) => value !== undefined)
        .map(([key, value]) => `\\${key}, ${value}`)
        .join(', ');
    
      const code = `Synth(\\${synthName}, [${paramStr}]);`;
      await scServer.executeCode(code);
    
      return {
        content: [
          {
            type: 'text',
            text: `Playing ${synthName} synth with parameters: ${JSON.stringify(synthParams)}`,
          },
        ],
      };
    }
  • src/index.ts:96-142 (registration)
    Tool registration in the tools array, defining name, description, and input schema (JSON Schema) for parameter validation with synthName required and enum of available synths, optional params for freq, amp, etc.
    {
      name: 'sc_play_synth_advanced',
      description: 'Play a specific synth with explicit parameters. Available synths: sine, pluck, bell, bass, pad, kick, snare, hihat, atmosphere, sweep',
      inputSchema: {
        type: 'object',
        properties: {
          synthName: {
            type: 'string',
            description: 'Name of the synth to play',
            enum: ['sine', 'pluck', 'bell', 'bass', 'pad', 'kick', 'snare', 'hihat', 'atmosphere', 'sweep'],
          },
          freq: {
            type: 'number',
            description: 'Frequency in Hz (default: 440)',
          },
          amp: {
            type: 'number',
            description: 'Amplitude 0-1 (default: 0.3)',
          },
          duration: {
            type: 'number',
            description: 'Duration in seconds (default: 1)',
          },
          pan: {
            type: 'number',
            description: 'Pan position -1 (left) to 1 (right) (default: 0)',
          },
          decay: {
            type: 'number',
            description: 'Decay time for pluck synth (default: 2)',
          },
          cutoff: {
            type: 'number',
            description: 'Filter cutoff frequency for bass/pad (default: varies)',
          },
          startFreq: {
            type: 'number',
            description: 'Start frequency for sweep (default: 100)',
          },
          endFreq: {
            type: 'number',
            description: 'End frequency for sweep (default: 2000)',
          },
        },
        required: ['synthName'],
      },
    },
  • Zod schema used in handler for runtime validation of input arguments.
    const schema = z.object({
      synthName: z.string(),
      freq: z.number().optional(),
      amp: z.number().optional(),
      duration: z.number().optional(),
      pan: z.number().optional(),
      decay: z.number().optional(),
      cutoff: z.number().optional(),
      startFreq: z.number().optional(),
      endFreq: z.number().optional(),
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool plays a synth but doesn't disclose behavioral traits like whether it's a read-only operation, if it requires specific audio context, latency considerations, error handling, or what happens when multiple synths are played simultaneously. The description is minimal and lacks crucial behavioral context for an audio synthesis tool.

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 a single, efficient sentence that front-loads the core purpose and provides essential context (available synths). Every word earns its place with zero waste, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of an audio synthesis tool with 9 parameters and no annotations or output schema, the description is incomplete. It doesn't explain what 'play' means in practice (e.g., real-time audio output, file generation), performance implications, or error conditions. For a tool with rich parameters and no structured safety hints, more behavioral context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 9 parameters with descriptions and defaults. The description adds no parameter-specific information beyond listing available synth names (which is already in the schema's enum). Baseline is 3 since the schema does all the heavy lifting, and the description doesn't add meaningful semantic context.

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 clearly states the action ('Play') and resource ('a specific synth'), specifies the available synth types, and distinguishes it from sibling tools like 'sc_play_synth' (likely a simpler version) and 'sc_play_pattern' (for patterns rather than single synth notes). It provides specific, actionable information about what the tool does.

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

Usage Guidelines3/5

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

The description implies usage by listing available synths, suggesting it should be used when explicit control over synth parameters is needed. However, it doesn't explicitly state when to use this tool versus alternatives like 'sc_play_synth' (presumably a simpler version) or 'sc_play_pattern' (for sequences). The guidance is implied rather than explicit.

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/BradA1878/mcp-wave'

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