[Sprint 1] feat: Implement layout tools (3 tools) #174

Closed
opened 2026-01-26 16:21:08 +00:00 by lmiranda · 1 comment
Owner

Description

Implement dashboard layout composition tools for building structured dashboards.

Acceptance Criteria

  • Create mcp_server/layout_tools.py
  • Implement layout_create tool:
    • Input: name: string, template?: string
    • Templates: "dashboard", "report", "form", "blank"
    • Output: Layout container reference
  • Implement layout_add_filter tool:
    • Input: layout_ref: string, filter_type: string, options: object
    • Filter types: dropdown, date_range, search, checkbox_group
    • Position: top, sidebar
  • Implement layout_set_grid tool:
    • Input: layout_ref: string, grid: object
    • Configure responsive grid (cols, rows, breakpoints)
    • Support Mantine Grid/SimpleGrid patterns
  • All tools registered in server.py

Technical Notes

Layouts are containers that hold charts and components. The grid system should map to DMC's Grid component.

# Example layout creation
layout_create(name="sales_dashboard", template="dashboard")
layout_add_filter(layout_ref="sales_dashboard", filter_type="date_range", options={"label": "Period"})
layout_set_grid(layout_ref="sales_dashboard", grid={"cols": 12, "spacing": "md"})

Dependencies

  • Depends on #170 (MCP server foundation)
## Description Implement dashboard layout composition tools for building structured dashboards. ## Acceptance Criteria - [ ] Create `mcp_server/layout_tools.py` - [ ] Implement `layout_create` tool: - Input: `name: string, template?: string` - Templates: "dashboard", "report", "form", "blank" - Output: Layout container reference - [ ] Implement `layout_add_filter` tool: - Input: `layout_ref: string, filter_type: string, options: object` - Filter types: dropdown, date_range, search, checkbox_group - Position: top, sidebar - [ ] Implement `layout_set_grid` tool: - Input: `layout_ref: string, grid: object` - Configure responsive grid (cols, rows, breakpoints) - Support Mantine Grid/SimpleGrid patterns - [ ] All tools registered in server.py ## Technical Notes Layouts are containers that hold charts and components. The grid system should map to DMC's Grid component. ```python # Example layout creation layout_create(name="sales_dashboard", template="dashboard") layout_add_filter(layout_ref="sales_dashboard", filter_type="date_range", options={"label": "Period"}) layout_set_grid(layout_ref="sales_dashboard", grid={"cols": 12, "spacing": "md"}) ``` ## Dependencies - Depends on #170 (MCP server foundation)
Author
Owner

Completed: Layout tools implemented.

Tools Added:

  1. layout_create - Create layouts with templates (dashboard, report, form, blank)
  2. layout_add_filter - Add filter controls (dropdown, date_range, search, slider, etc.)
  3. layout_set_grid - Configure responsive grid system (1-24 cols, breakpoints)

Features:

  • 4 templates: dashboard, report, form, blank
  • 9 filter types: dropdown, multi_select, date_range, date, search, checkbox_group, radio_group, slider, range_slider
  • Maps to DMC Grid/AppShell component patterns
  • Responsive breakpoints support

Commit: 057c61f

Completed: Layout tools implemented. **Tools Added:** 1. `layout_create` - Create layouts with templates (dashboard, report, form, blank) 2. `layout_add_filter` - Add filter controls (dropdown, date_range, search, slider, etc.) 3. `layout_set_grid` - Configure responsive grid system (1-24 cols, breakpoints) **Features:** - 4 templates: dashboard, report, form, blank - 9 filter types: dropdown, multi_select, date_range, date, search, checkbox_group, radio_group, slider, range_slider - Maps to DMC Grid/AppShell component patterns - Responsive breakpoints support **Commit:** 057c61f
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#174