rollbar_get_user
Retrieve a specific user's information from Rollbar error tracking by providing their user ID.
Instructions
Get a specific user from Rollbar
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | User ID |
Implementation Reference
- src/rollbar.ts:551-567 (handler)The handler for the 'rollbar_get_user' tool. It checks for accountClient availability, extracts the user ID from arguments, calls the Rollbar API endpoint `/user/${id}` to fetch user data, and returns the JSON stringified response.case "rollbar_get_user": { // Account Token is required if (!accountClient) { throw new Error("ROLLBAR_ACCOUNT_TOKEN is not set, cannot use this API"); } const { id } = args as { id: number }; const response = await accountClient.get<UserResponse>(`/user/${id}`); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
- src/rollbar.ts:246-256 (schema)The schema definition for the 'rollbar_get_user' tool, specifying the input schema that requires a numeric 'id' for the user.const GET_USER_TOOL: Tool = { name: "rollbar_get_user", description: "Get a specific user from Rollbar", inputSchema: { type: "object", properties: { id: { type: "number", description: "User ID" }, }, required: ["id"], }, };
- src/rollbar.ts:298-314 (registration)Registration of the 'rollbar_get_user' tool (via GET_USER_TOOL) in the list of tools returned by the ListToolsRequestSchema handler.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ LIST_ITEMS_TOOL, GET_ITEM_TOOL, GET_ITEM_BY_UUID_TOOL, GET_ITEM_BY_COUNTER_TOOL, LIST_OCCURRENCES_TOOL, GET_OCCURRENCE_TOOL, LIST_PROJECTS_TOOL, GET_PROJECT_TOOL, LIST_ENVIRONMENTS_TOOL, LIST_USERS_TOOL, GET_USER_TOOL, LIST_DEPLOYS_TOOL, GET_DEPLOY_TOOL, ], }));
- src/rollbar.ts:46-47 (helper)The 'rollbar_get_user' tool is listed in the SUPPORTED_APIS.accountApis array, used for token validation warnings.accountApis: ["rollbar_list_projects", "rollbar_get_project", "rollbar_list_users", "rollbar_get_user"], };