get_pack_sounds
Retrieve audio samples from a specific sound pack on Freesound.org using the pack ID. Specify page number and results per page to navigate large collections.
Instructions
Get sounds from a specific pack
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pack_id | Yes | The ID of the pack | |
| page | No | Page number (default: 1) | |
| page_size | No | Number of results per page (default: 15) |
Implementation Reference
- src/index.ts:323-339 (handler)MCP CallToolRequest handler case for 'get_pack_sounds': parses arguments, calls FreesoundClient.getPackSounds, and returns results as JSON-formatted text content.case "get_pack_sounds": { const sounds = await freesoundClient.getPackSounds( args.pack_id as number, { page: args.page as number | undefined, page_size: args.page_size as number | undefined, } ); return { content: [ { type: "text", text: JSON.stringify(sounds, null, 2), }, ], }; }
- src/index.ts:182-203 (registration)Registration of the 'get_pack_sounds' tool in the ListTools response, defining its name, description, and input schema.{ name: "get_pack_sounds", description: "Get sounds from a specific pack", inputSchema: { type: "object", properties: { pack_id: { type: "number", description: "The ID of the pack", }, page: { type: "number", description: "Page number (default: 1)", }, page_size: { type: "number", description: "Number of results per page (default: 15)", }, }, required: ["pack_id"], }, },
- src/freesound-client.ts:231-242 (helper)Helper method in FreesoundClient that performs the API request to retrieve paginated list of sounds from a specific pack.async getPackSounds( packId: number, params?: PaginationParams ): Promise<PaginatedResults<Sound>> { const response = await this.axiosInstance.get(`/packs/${packId}/sounds/`, { params: { page: params?.page || 1, page_size: params?.page_size || 15, }, }); return response.data; }