Skip to main content
Glama

play_warning_sound

Play a system warning sound to alert users to important events or issues, providing audio feedback for notifications.

Instructions

Play a warning system sound

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'play_warning_sound' tool. Calls playSound('warning') and returns success message.
    case 'play_warning_sound':
      await playSound('warning');
      return {
        content: [
          {
            type: 'text',
            text: 'Warning sound played successfully',
          },
        ],
      };
  • src/index.ts:289-296 (registration)
    Registration of the 'play_warning_sound' tool in the listTools response, including empty input schema.
      name: 'play_warning_sound',
      description: 'Play a warning system sound',
      inputSchema: {
        type: 'object',
        properties: {},
        required: [],
      },
    },
  • Helper function playSound that implements the logic for playing system sounds, including 'Purr' for warning.
    async function playSound(soundType: 'info' | 'warning' | 'error'): Promise<void> {
      const requestId = `${soundType}-${Date.now()}`;
      
      // Throttle requests to prevent conflicts
      if (activeRequests.has(soundType)) {
        throw new Error(`${soundType} sound already playing`);
      }
      
      activeRequests.add(soundType);
      
      try {
        return new Promise((resolve, reject) => {
          let soundName: string;
          
          switch (soundType) {
            case 'info':
              soundName = 'Glass';
              break;
            case 'warning':
              soundName = 'Purr';
              break;
            case 'error':
              soundName = 'Sosumi';
              break;
            default:
              soundName = 'Glass';
          }
    
          const afplay = spawn('afplay', [`/System/Library/Sounds/${soundName}.aiff`]);
          
          // Add timeout
          const timeout = setTimeout(() => {
            afplay.kill();
            reject(new Error('Sound playback timed out'));
          }, PROCESS_TIMEOUT_MS);
          
          afplay.once('close', (code) => {
            clearTimeout(timeout);
            if (code === 0) {
              resolve();
            } else {
              reject(new Error(`Sound playback failed with code ${code}`));
            }
          });
          
          afplay.once('error', (error) => {
            clearTimeout(timeout);
            reject(error);
          });
        });
      } finally {
        activeRequests.delete(soundType);
      }
    }
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 of behavioral disclosure. It states the action ('Play') but doesn't describe what happens—e.g., whether it's audible, requires permissions, has side effects, or how it interacts with the system. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place, achieving maximum clarity in minimal space.

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 tool's simplicity (0 parameters, no output schema), the description is minimal but adequate for basic understanding. However, with no annotations and no output schema, it lacks details on behavior, effects, or return values, which could be important for an agent to use it correctly in context. It's incomplete for a tool that might have auditory or system-level implications.

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 tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. Baseline is 4 for zero parameters, as there's nothing to compensate for.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 the resource ('a warning system sound'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its siblings (play_error_sound, play_info_sound, play_sound) beyond specifying 'warning' versus other sound types, which is somewhat implicit but not explicit about distinctions.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus its siblings or alternatives. It implies usage for warning scenarios but doesn't specify contexts, exclusions, or comparisons with other sound-playing tools, leaving the agent to infer based on the name alone.

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/nocoo/mcp-make-sound'

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