list_available_sounds
Discover available notification sounds to verify sound options and select appropriate audio feedback for coding environments.
Instructions
List all available notification sounds.
WHEN TO USE THIS TOOL:
- When you need to check what sound options are available
- When determining if a specific sound file exists
- Before using a custom sound to verify available options
This tool helps you discover what sounds are available for providing audio feedback.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/sound_tool/server.py:175-183 (handler)The handler function that implements the core logic of the 'list_available_sounds' tool by listing .mp3 and .wav files from the configured sounds directory.def list_available_sounds() -> str: try: sounds = [f for f in os.listdir(self.sounds_dir) if f.endswith(('.mp3', '.wav'))] if sounds: return "Available sounds:\n" + "\n".join(sounds) else: return "No sound files found in the sounds directory." except Exception as e: return f"Error listing sounds: {e}"
- src/sound_tool/server.py:165-174 (registration)The @self.mcp.tool decorator that registers the list_available_sounds function as an MCP tool, including usage description.@self.mcp.tool(description=""" List all available notification sounds. WHEN TO USE THIS TOOL: - When you need to check what sound options are available - When determining if a specific sound file exists - Before using a custom sound to verify available options This tool helps you discover what sounds are available for providing audio feedback. """)
- JSON schema definition for the list_available_sounds tool specifying no input parameters and string return.list_sounds_tool_definition = { "name": "list_available_sounds", "description": """ List all available notification sounds. Use this tool when you need to check what sound options are available to play. This is helpful when determining what custom sounds might be available. """, "parameters": { "type": "object", "properties": {}, "required": [] }, "returns": { "type": "string", "description": "A string listing all available sound files" } }