get_sound
Retrieve detailed information about specific audio samples from Freesound.org using sound IDs and content descriptors to analyze sound characteristics and metadata.
Instructions
Get detailed information about a specific sound
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sound_id | Yes | The ID of the sound | |
| descriptors | No | Comma-separated list of content-based descriptors to include |
Implementation Reference
- src/index.ts:231-244 (handler)MCP tool handler for 'get_sound': extracts sound_id and optional descriptors from arguments, calls FreesoundClient.getSound, stringifies the result as JSON, and returns it as text content.case "get_sound": { const sound = await freesoundClient.getSound( args.sound_id as number, args.descriptors as string | undefined ); return { content: [ { type: "text", text: JSON.stringify(sound, null, 2), }, ], }; }
- src/index.ts:66-83 (registration)Registration of the 'get_sound' tool in the ListTools response, including its name, description, and input schema definition.{ name: "get_sound", description: "Get detailed information about a specific sound", inputSchema: { type: "object", properties: { sound_id: { type: "number", description: "The ID of the sound", }, descriptors: { type: "string", description: "Comma-separated list of content-based descriptors to include", }, }, required: ["sound_id"], }, },
- src/freesound-client.ts:139-146 (helper)Core helper method in FreesoundClient that performs the API request to retrieve detailed sound information from Freesound.org using axios, optionally including specified descriptors.async getSound(soundId: number, descriptors?: string): Promise<Sound> { const response = await this.axiosInstance.get(`/sounds/${soundId}/`, { params: { descriptors: descriptors, }, }); return response.data; }