lightdash_list_dashboards
Retrieve all dashboards for a specified project UUID.
Instructions
List all dashboards 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:232-261 (handler)Handler for the 'lightdash_list_dashboards' tool. Parses the arguments using ListDashboardsRequestSchema, then calls the Lightdash API at /api/v1/projects/{projectUuid}/dashboards. Returns the results as formatted JSON text.
case 'lightdash_list_dashboards': { const args = ListDashboardsRequestSchema.parse( request.params.arguments ); const { data, error } = await lightdashClient.GET( '/api/v1/projects/{projectUuid}/dashboards', { 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:32-39 (schema)Zod schema for input validation of the 'lightdash_list_dashboards' tool. Requires a single 'projectUuid' field (UUID string) described as obtainable from the project list.
export const ListDashboardsRequestSchema = z.object({ projectUuid: z .string() .uuid() .describe( 'The UUID of the project. You can obtain it from the project list.' ), }); - src/mcp.ts:69-73 (registration)Registration of the 'lightdash_list_dashboards' tool in the ListTools handler. Defines its name, description ('List all dashboards in a project'), and input schema (converted from Zod to JSON Schema via zodToJsonSchema).
{ name: 'lightdash_list_dashboards', description: 'List all dashboards in a project', inputSchema: zodToJsonSchema(ListDashboardsRequestSchema), },