get_user
Retrieve user profile information from Freesound.org by providing a username to access details about audio contributors.
Instructions
Get information about a Freesound user
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | The username of the user |
Implementation Reference
- src/index.ts:281-291 (handler)MCP tool handler for 'get_user': extracts username from args, calls freesoundClient.getUser, and returns the user data as formatted JSON text.case "get_user": { const user = await freesoundClient.getUser(args.username as string); return { content: [ { type: "text", text: JSON.stringify(user, null, 2), }, ], }; }
- src/index.ts:132-145 (registration)Registration of the 'get_user' tool in the tools list, including name, description, and input schema requiring 'username'.{ name: "get_user", description: "Get information about a Freesound user", inputSchema: { type: "object", properties: { username: { type: "string", description: "The username of the user", }, }, required: ["username"], }, },
- src/freesound-client.ts:65-83 (schema)TypeScript interface defining the structure of the User object returned by the getUser method.export interface User { url: string; username: string; about: string; home_page: string; avatar: { small: string; medium: string; large: string; }; date_joined: string; num_sounds: number; sounds: string; num_packs: number; packs: string; num_posts: number; num_comments: number; bookmark_categories: string; }
- src/freesound-client.ts:192-195 (helper)Core helper method in FreesoundClient that performs the API request to retrieve user data from Freesound.org.async getUser(username: string): Promise<User> { const response = await this.axiosInstance.get(`/users/${username}/`); return response.data; }