lightdash_list_charts
Lists all charts in a Lightdash project by providing its UUID.
Instructions
List all charts in 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:204-231 (handler)Handler for 'lightdash_list_charts' tool. Parses args with ListChartsRequestSchema, calls Lightdash GET /api/v1/projects/{projectUuid}/charts, and returns the charts data.
case 'lightdash_list_charts': { const args = ListChartsRequestSchema.parse(request.params.arguments); const { data, error } = await lightdashClient.GET( '/api/v1/projects/{projectUuid}/charts', { 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:23-30 (schema)Zod schema for the ListChartsRequest. Defines a single required field: projectUuid (UUID string).
export const ListChartsRequestSchema = z.object({ projectUuid: z .string() .uuid() .describe( 'The UUID of the project. You can obtain it from the project list.' ), }); - src/mcp.ts:64-68 (registration)Tool registration in the tools list. Defines name, description, and inputSchema for 'lightdash_list_charts'.
{ name: 'lightdash_list_charts', description: 'List all charts in a project', inputSchema: zodToJsonSchema(ListChartsRequestSchema), },