get_user_sounds
Retrieve audio samples uploaded by a specific Freesound user to access their uploaded sound library for projects or analysis.
Instructions
Get sounds uploaded by a specific user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | The username of the user | |
| page | No | Page number (default: 1) | |
| page_size | No | Number of results per page (default: 15) |
Implementation Reference
- src/freesound-client.ts:197-211 (handler)Core handler function that performs the API request to fetch paginated list of sounds for a given Freesound user.async getUserSounds( username: string, params?: PaginationParams ): Promise<PaginatedResults<Sound>> { const response = await this.axiosInstance.get( `/users/${username}/sounds/`, { params: { page: params?.page || 1, page_size: params?.page_size || 15, }, } ); return response.data; }
- src/index.ts:146-167 (registration)Tool registration in MCP server's ListTools handler, including name, description, and input schema.{ name: "get_user_sounds", description: "Get sounds uploaded by a specific user", inputSchema: { type: "object", properties: { username: { type: "string", description: "The username of the user", }, page: { type: "number", description: "Page number (default: 1)", }, page_size: { type: "number", description: "Number of results per page (default: 15)", }, }, required: ["username"], }, },
- src/index.ts:293-309 (handler)MCP CallToolRequest handler case that extracts arguments, calls the client method, and formats the response as JSON text.case "get_user_sounds": { const sounds = await freesoundClient.getUserSounds( args.username as string, { page: args.page as number | undefined, page_size: args.page_size as number | undefined, } ); return { content: [ { type: "text", text: JSON.stringify(sounds, null, 2), }, ], }; }