Skip to main content
Glama
BradA1878
by BradA1878

sc_health_check

Verify SuperCollider installation and configuration to resolve audio synthesis issues before using the server.

Instructions

Check if SuperCollider is installed and configured correctly. Run this first if you have issues.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main execution logic for the sc_health_check tool. Detects SuperCollider installation using findSuperCollider, validates it, and returns appropriate success or error messages.
    case 'sc_health_check': {
      const detected = findSuperCollider();
    
      if (!detected) {
        const instructions = getInstallInstructions();
        return {
          content: [{
            type: 'text',
            text: `❌ SuperCollider NOT found\n\n${instructions}`
          }],
          isError: true,
        };
      }
    
      const validation = validateInstallation(detected.sclangPath);
    
      if (!validation.valid) {
        return {
          content: [{
            type: 'text',
            text: `⚠️  SuperCollider found but validation failed\n\nPath: ${detected.sclangPath}\nError: ${validation.error}`
          }],
          isError: true,
        };
      }
    
      return {
        content: [{
          type: 'text',
          text: `✅ SuperCollider is installed and ready!\n\nPath: ${detected.sclangPath}\n\nYou can now use sc_boot to start the audio server.`
        }],
      };
    }
  • src/index.ts:37-43 (registration)
    Tool registration object defining name 'sc_health_check', description, and empty input schema.
      name: 'sc_health_check',
      description: 'Check if SuperCollider is installed and configured correctly. Run this first if you have issues.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • findSuperCollider helper: Searches for sclang and scsynth paths across environment vars, PATH, and platform-specific locations.
    export function findSuperCollider(): { sclangPath: string; scsynthPath: string } | null {
      const os = platform();
    
      // 1. Check environment variables first
      if (process.env.SCLANG_PATH && existsSync(process.env.SCLANG_PATH)) {
        const scsynthPath = process.env.SCSYNTH_PATH ||
          process.env.SCLANG_PATH.replace('sclang', 'scsynth');
    
        return {
          sclangPath: process.env.SCLANG_PATH,
          scsynthPath,
        };
      }
    
      // 2. Try to find sclang in PATH
      try {
        const whichCommand = os === 'win32' ? 'where' : 'which';
        const sclangPath = execSync(`${whichCommand} sclang`, { encoding: 'utf-8' }).trim().split('\n')[0];
    
        if (sclangPath && existsSync(sclangPath)) {
          const scsynthPath = sclangPath.replace('sclang', 'scsynth');
          return { sclangPath, scsynthPath };
        }
      } catch (e) {
        // Not in PATH, continue searching
      }
    
      // 3. Check platform-specific common installation paths
      const paths = SC_PATHS[os as keyof typeof SC_PATHS] || [];
    
      for (const path of paths) {
        const expandedPath = path.replace('~', process.env.HOME || '');
    
        if (existsSync(expandedPath)) {
          const scsynthPath = expandedPath.replace('sclang', 'scsynth');
          return { sclangPath: expandedPath, scsynthPath };
        }
      }
    
      return null;
    }
  • validateInstallation helper: Checks if sclang path exists and can execute by running 'sclang -v'.
    export function validateInstallation(sclangPath: string): { valid: boolean; error?: string } {
      // Check if file exists
      if (!existsSync(sclangPath)) {
        return {
          valid: false,
          error: `sclang not found at: ${sclangPath}`,
        };
      }
    
      // Try to get version
      try {
        const version = execSync(`"${sclangPath}" -v`, {
          encoding: 'utf-8',
          timeout: 5000,
          stdio: ['pipe', 'pipe', 'pipe']
        });
    
        return { valid: true };
      } catch (e) {
        return {
          valid: false,
          error: `sclang found but failed to execute. Error: ${e instanceof Error ? e.message : String(e)}`,
        };
      }
    }
  • getInstallInstructions helper: Returns platform-specific installation instructions for SuperCollider.
    export function getInstallInstructions(): string {
      const os = platform();
    
      const instructions: Record<string, string> = {
        darwin: `
    SuperCollider not found. To install:
    
    1. Download from: https://supercollider.github.io/downloads
    2. Drag SuperCollider.app to /Applications/
    3. Restart this MCP server
    
    Or set SCLANG_PATH environment variable:
      export SCLANG_PATH="/path/to/SuperCollider.app/Contents/MacOS/sclang"
    `,
        linux: `
    SuperCollider not found. To install:
    
    Ubuntu/Debian:
      sudo apt-get install supercollider
    
    Arch:
      sudo pacman -S supercollider
    
    Or set SCLANG_PATH environment variable:
      export SCLANG_PATH="/path/to/sclang"
    `,
        win32: `
    SuperCollider not found. To install:
    
    1. Download from: https://supercollider.github.io/downloads
    2. Run the installer
    3. Restart this MCP server
    
    Or set SCLANG_PATH environment variable:
      set SCLANG_PATH="C:\\path\\to\\sclang.exe"
    `,
      };
    
      return instructions[os] || 'SuperCollider not found. Please install from https://supercollider.github.io/downloads';
    }
Behavior3/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 implies a read-only diagnostic operation but doesn't specify what 'configured correctly' means, what output to expect, or potential error conditions. It adds basic context about when to run it but lacks details on behavior.

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?

Two concise sentences that are front-loaded with the core purpose followed by usage guidance. Every word earns its place with no redundancy or wasted text.

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

Completeness3/5

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

For a diagnostic tool with no annotations and no output schema, the description is minimal but adequate. It explains what the tool does and when to use it, but lacks details on what 'correctly' means or what the output format might be, leaving some gaps in completeness.

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?

With 0 parameters and 100% schema description coverage, the baseline is 4. The description doesn't need to explain parameters, and it appropriately focuses on the tool's purpose without unnecessary parameter details.

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 tool's purpose with a specific verb ('Check') and resource ('SuperCollider'), and it distinguishes from siblings by focusing on installation/configuration verification rather than execution or control functions like sc_boot or sc_execute.

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?

It provides explicit guidance on when to use this tool ('Run this first if you have issues'), which clearly differentiates it from alternatives like sc_status (which might check runtime status) or other siblings that perform actions rather than diagnostic checks.

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