get_sound_analysis
Retrieve audio analysis data for Freesound samples to examine acoustic properties, spectral features, and temporal characteristics for research or creative projects.
Instructions
Get audio analysis data for 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 analysis descriptors to retrieve | |
| normalized | No | Whether to normalize descriptor values |
Implementation Reference
- src/index.ts:246-260 (handler)MCP tool handler for 'get_sound_analysis': extracts input arguments, calls FreesoundClient.getSoundAnalysis, and returns the analysis as formatted JSON text content.case "get_sound_analysis": { const analysis = await freesoundClient.getSoundAnalysis( args.sound_id as number, args.descriptors as string | undefined, args.normalized as boolean | undefined ); return { content: [ { type: "text", text: JSON.stringify(analysis, null, 2), }, ], }; }
- src/index.ts:87-104 (schema)Input schema for the 'get_sound_analysis' tool, defining required sound_id and optional descriptors and normalized parameters.inputSchema: { type: "object", properties: { sound_id: { type: "number", description: "The ID of the sound", }, descriptors: { type: "string", description: "Comma-separated list of analysis descriptors to retrieve", }, normalized: { type: "boolean", description: "Whether to normalize descriptor values", }, }, required: ["sound_id"], },
- src/index.ts:84-105 (registration)Registration of the 'get_sound_analysis' tool in the MCP server's tool list, including name, description, and input schema.{ name: "get_sound_analysis", description: "Get audio analysis data for 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 analysis descriptors to retrieve", }, normalized: { type: "boolean", description: "Whether to normalize descriptor values", }, }, required: ["sound_id"], }, },
- src/freesound-client.ts:148-163 (helper)Core implementation in FreesoundClient: makes authenticated API request to Freesound.org for sound analysis data based on sound ID and optional descriptors/normalized params.async getSoundAnalysis( soundId: number, descriptors?: string, normalized?: boolean ): Promise<any> { const response = await this.axiosInstance.get( `/sounds/${soundId}/analysis/`, { params: { descriptors: descriptors, normalized: normalized !== undefined ? (normalized ? 1 : 0) : undefined, }, } ); return response.data; }