lightdash_list_spaces
List all spaces in a Lightdash project by providing its UUID to explore project structure.
Instructions
List all spaces 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:176-202 (handler)Handler case for 'lightdash_list_spaces' tool: parses projectUuid from arguments, calls GET /api/v1/projects/{projectUuid}/spaces on the Lightdash API, and returns the spaces list as JSON text.
case 'lightdash_list_spaces': { const args = ListSpacesRequestSchema.parse(request.params.arguments); const { data, error } = await lightdashClient.GET( '/api/v1/projects/{projectUuid}/spaces', { 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:14-21 (schema)Zod schema defining the input for lightdash_list_spaces: requires a projectUuid (UUID string).
export const ListSpacesRequestSchema = z.object({ projectUuid: z .string() .uuid() .describe( 'The UUID of the project. You can obtain it from the project list.' ), }); - src/mcp.ts:59-63 (registration)Tool registration in the ListToolsRequestSchema handler, listing lightdash_list_spaces with its description and input schema.
{ name: 'lightdash_list_spaces', description: 'List all spaces in a project', inputSchema: zodToJsonSchema(ListSpacesRequestSchema), },