get_sound
Retrieve detailed metadata and content descriptors for audio samples from Freesound.org using sound IDs to analyze and access sound information.
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:66-83 (registration)Registration of the 'get_sound' tool in the MCP tools list, including name, description, and input schema.{ 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/index.ts:69-82 (schema)Input schema definition for the 'get_sound' tool.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/index.ts:231-244 (handler)MCP CallToolRequest handler for 'get_sound' that calls freesoundClient.getSound and returns JSON.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/freesound-client.ts:139-146 (handler)Core implementation of getSound in FreesoundClient, fetching sound details via Freesound API.async getSound(soundId: number, descriptors?: string): Promise<Sound> { const response = await this.axiosInstance.get(`/sounds/${soundId}/`, { params: { descriptors: descriptors, }, }); return response.data; }
- src/freesound-client.ts:21-63 (schema)TypeScript interface defining the Sound object structure returned by getSound.export interface Sound { id: number; url: string; name: string; tags: string[]; description: string; geotag: string | null; created: string; license: string; type: string; channels: number; filesize: number; bitrate: number; bitdepth: number; duration: number; samplerate: number; username: string; pack: string | null; pack_name: string | null; download: string; bookmark: string; previews: { [key: string]: string; }; images: { waveform_m: string; waveform_l: string; spectral_m: string; spectral_l: string; }; num_downloads: number; avg_rating: number; num_ratings: number; rate: string; comments: string; num_comments: number; comment: string; similar_sounds: string; analysis: string; analysis_frames: string; analysis_stats: string; [key: string]: any; }