sc_status
Check the current status of the SuperCollider audio synthesis server, including whether it's running and its CPU usage.
Instructions
Get the current status of the SuperCollider server (running, CPU usage, etc.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:281-291 (handler)The handler logic for the 'sc_status' tool within the CallToolRequestSchema switch statement. It calls scServer.getServerStatus() and returns the status as a JSON string.case 'sc_status': { const status = await scServer.getServerStatus(); return { content: [ { type: 'text', text: JSON.stringify(status, null, 2), }, ], }; }
- src/index.ts:60-67 (schema)Input schema and tool metadata definition for 'sc_status', featuring an empty properties object indicating no input parameters.{ name: 'sc_status', description: 'Get the current status of the SuperCollider server (running, CPU usage, etc.)', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:200-202 (registration)Registration of the ListToolsRequestSchema handler, which exposes the tools array containing 'sc_status'.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools, }));
- src/supercollider.ts:191-214 (helper)SuperColliderServer.getServerStatus() method, which implements the core status checking logic by querying the SC server if booted.async getServerStatus(): Promise<{ running: boolean; avgCPU?: number; peakCPU?: number; numUGens?: number; numSynths?: number; numGroups?: number; numSynthDefs?: number; }> { if (!this.isBooted) { return { running: false }; } try { await this.executeCode('Server.default.queryAllNodes;'); return { running: true, // Note: Getting real-time stats requires OSC monitoring // This is a simplified version }; } catch (error) { return { running: false }; } }