lightdash_get_user_attributes
Retrieves organization user attributes to customize analytics and apply user-specific filters.
Instructions
Get organization user attributes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp.ts:470-490 (handler)Handler logic for 'lightdash_get_user_attributes' tool. Calls lightdashClient.GET('/api/v1/org/attributes') to fetch organization user attributes and returns the results as formatted JSON.
case 'lightdash_get_user_attributes': { const { data, error } = await lightdashClient.GET( '/api/v1/org/attributes', {} ); if (error) { throw new Error( `Lightdash API error: ${error.error.name}, ${ error.error.message ?? 'no message' }` ); } return { content: [ { type: 'text', text: JSON.stringify(data.results, null, 2), }, ], }; } - src/schemas.ts:106-106 (schema)Schema definition for the tool. No input parameters required (empty object schema).
export const GetUserAttributesRequestSchema = z.object({}); - src/mcp.ts:109-113 (registration)Tool registration in the ListToolsRequestSchema handler. Registers the tool with name 'lightdash_get_user_attributes' and description 'Get organization user attributes'.
{ name: 'lightdash_get_user_attributes', description: 'Get organization user attributes', inputSchema: zodToJsonSchema(GetUserAttributesRequestSchema), },