Skip to main content
Glama

list_available_sounds

Discover available notification sounds to verify options before use and check if specific sound files exist for audio feedback.

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that implements the list_available_sounds tool logic by listing all .mp3 and .wav sound files in the configured sounds directory and returning them as a formatted string.
    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}"
  • The tool is registered as an MCP tool using the @self.mcp.tool decorator inside the register_tools method of SoundToolServer class, with a detailed description of usage.
    @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. """) 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}"
  • Static JSON schema definition for the list_available_sounds tool, including name, description, empty parameters, and string return type.
    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" } }

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/tijs/py-sound-mcp'

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