get_user
Retrieve user profile data from Manifold Markets by providing a username to access account information and activity details.
Instructions
Get user information by username
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | Username |
Implementation Reference
- src/index.ts:584-606 (handler)Handler function for the 'get_user' tool. Parses input using GetUserSchema, fetches user data from Manifold Markets API by username, and returns the JSON response as text content.case 'get_user': { const { username } = GetUserSchema.parse(args); const response = await fetch(`${API_BASE}/v0/user/${username}`, { headers: { Accept: 'application/json' }, }); if (!response.ok) { throw new McpError( ErrorCode.InternalError, `Manifold API error: ${response.statusText}` ); } const user = await response.json(); return { content: [ { type: 'text', text: JSON.stringify(user, null, 2), }, ], }; }
- src/index.ts:69-71 (schema)Zod input schema for the 'get_user' tool, requiring a 'username' string.const GetUserSchema = z.object({ username: z.string(), });
- src/index.ts:238-248 (registration)Tool registration entry in the listTools response, defining name, description, and inputSchema for 'get_user'.{ name: 'get_user', description: 'Get user information by username', inputSchema: { type: 'object', properties: { username: { type: 'string', description: 'Username' }, }, required: ['username'], }, },