lightdash_get_catalog
Retrieve the catalog of analytics assets for a project, including charts, dashboards, and metrics, using the project UUID.
Instructions
Get catalog for a project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectUuid | Yes | The UUID of the project. You can obtain it from the project list. |
Implementation Reference
- src/mcp.ts:79-83 (registration)Tool registration in the ListTools handler — defines name, description, and input schema for lightdash_get_catalog.
{ name: 'lightdash_get_catalog', description: 'Get catalog for a project', inputSchema: zodToJsonSchema(GetCatalogRequestSchema), }, - src/mcp.ts:292-319 (handler)Handler for the 'lightdash_get_catalog' tool call — parses arguments via GetCatalogRequestSchema and calls Lightdash API GET /api/v1/projects/{projectUuid}/dataCatalog, returning results as JSON.
case 'lightdash_get_catalog': { const args = GetCatalogRequestSchema.parse(request.params.arguments); const { data, error } = await lightdashClient.GET( '/api/v1/projects/{projectUuid}/dataCatalog', { params: { path: { projectUuid: args.projectUuid, }, }, } ); 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:50-57 (schema)Input schema (Zod) for the lightdash_get_catalog tool — requires a projectUuid (UUID string).
export const GetCatalogRequestSchema = z.object({ projectUuid: z .string() .uuid() .describe( 'The UUID of the project. You can obtain it from the project list.' ), }); - src/mcp.ts:16-23 (helper)Import of GetCatalogRequestSchema from schemas.js used by both registration and handler.
GetCatalogRequestSchema, GetMetricsCatalogRequestSchema, GetChartsAsCodeRequestSchema, GetDashboardsAsCodeRequestSchema, GetMetadataRequestSchema, GetAnalyticsRequestSchema, GetUserAttributesRequestSchema, } from './schemas.js';