get_similar_sounds
Find audio samples similar to a specific sound by ID, with options to filter by content descriptors and paginate results.
Instructions
Find sounds similar to a given sound
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sound_id | Yes | The ID of the sound to find similar sounds for | |
| descriptors_filter | No | Filter similar sounds by content descriptors | |
| page | No | Page number (default: 1) | |
| page_size | No | Number of results per page (default: 15) |
Implementation Reference
- src/freesound-client.ts:165-180 (handler)Core handler function that executes the tool logic by querying the Freesound API endpoint for similar sounds.async getSimilarSounds( soundId: number, params?: SimilarSoundsParams ): Promise<PaginatedResults<Sound>> { const response = await this.axiosInstance.get( `/sounds/${soundId}/similar/`, { params: { descriptors_filter: params?.descriptors_filter, page: params?.page || 1, page_size: params?.page_size || 15, }, } ); return response.data; }
- src/index.ts:106-131 (schema)Input schema definition for the get_similar_sounds tool in the MCP ListTools response.{ name: "get_similar_sounds", description: "Find sounds similar to a given sound", inputSchema: { type: "object", properties: { sound_id: { type: "number", description: "The ID of the sound to find similar sounds for", }, descriptors_filter: { type: "string", description: "Filter similar sounds by content descriptors", }, page: { type: "number", description: "Page number (default: 1)", }, page_size: { type: "number", description: "Number of results per page (default: 15)", }, }, required: ["sound_id"], }, },
- src/index.ts:262-279 (handler)MCP server handler case that processes the tool call and delegates to the FreesoundClient implementation.case "get_similar_sounds": { const similar = await freesoundClient.getSimilarSounds( args.sound_id as number, { descriptors_filter: args.descriptors_filter as string | undefined, page: args.page as number | undefined, page_size: args.page_size as number | undefined, } ); return { content: [ { type: "text", text: JSON.stringify(similar, null, 2), }, ], }; }
- src/freesound-client.ts:17-19 (helper)Type definition for parameters used in the getSimilarSounds method.export interface SimilarSoundsParams extends PaginationParams { descriptors_filter?: string; }