feat: Add dashboard builder tools with validation framework#81
Open
daniel-edgedelta wants to merge 10 commits into
Open
feat: Add dashboard builder tools with validation framework#81daniel-edgedelta wants to merge 10 commits into
daniel-edgedelta wants to merge 10 commits into
Conversation
Add 6 new MCP tools for dashboard management: - CRUD tools: create_dashboard, update_dashboard, delete_dashboard - Builder workflow: get_dashboard_schema, create_widget, assemble_dashboard The builder workflow provides a guided 3-step process for LLM-friendly dashboard construction with cross-parameter validation, v4 schema support for all 26 widget types, and an 8-rule validation framework covering version checks, unique IDs, grid overlap detection, hierarchy cycle detection, variable reference integrity, and content sanitization.
- Fix metric queries using {*} instead of variable references
- Fix group_by silently dropped for metric data sources
- Add buildFilterFromVariables() to construct CQL filters from dashboard variables
- Thread rawVariables through buildV4Widgets -> buildVisuals call chain
- Add custom grid positioning (column, column_span, row, row_span) to WidgetConfig
- Rewrite buildV4Widgets to use custom positions with auto-layout fallback
- Calculate root grid rows from actual widget extents
- Update create_widget tool with position parameters
- Update schema examples with new position fields
- Refactor validation rules for cleaner error handling
- Add 24 unit tests: query building, variable filters, custom positioning
Add save_pipeline tool wrapping existing SavePipeline() with guidance
pointing to deploy_pipeline as next step. Add get_lookups,
create_lookup, and update_lookup tools using multipart/form-data file
upload matching the /v1/orgs/{orgID}/lookup_tables API.
All tools tested against live API with JSON schema CSV content.
The EdgeDelta API requires version: v3, ed_self_telemetry_input node, and links: (not routing:) in all pipeline YAML. Updated the tool description so LLM callers know the requirements upfront.
Include all pipeline validation rules from the EdgeDelta pipelines skill: settings.tag required, sequence-compatible processors only, final/deotel ordering, persisting_cursor_settings warning, Unicode and json_field_path restrictions, link reference validation.
…ipeline Client-side YAML validation catches common v3 format errors before hitting the API, replacing cryptic 500s with actionable messages. Validates version, settings.tag, required nodes, field names, headers format, sequence processors, link references, and more.
- get_pipeline_history: strip full YAML content from entries (108KB→1.4KB), add limit parameter (default 5, max 50) - save_pipeline: add node type field reference for http_pull_input, http_workflow_input, and lookup processor with correct field names - pipeline_validation: fix http_workflow_input fields (steps not initial_request, workflow_pull_interval not interval), add initial_request and log_level to common field mistakes - Fix remaining %v→%w error wrapping in pipelines.go
Adds optional deploy=true parameter that automatically deploys after saving, eliminating the 3-step save→get_history→deploy workflow. On deploy failure, save still succeeds and error is returned in the response for manual retry.
Replace hand-curated list with the exact 23 processors from configv3/config_validation.go validateSequenceNode(). Adds lookup, suppress, split_with_delimiter, extract_json_field, tail_sample, ottl_context_filter, compound, quota, rate_limit, cumulative_to_delta. Removes incorrect entries that aren't in the backend validator.
…r tools
VS Code MCP client validates tool schemas strictly per JSON Schema spec.
Array-type parameters without an 'items' field fail validation with:
"tool parameters array type must have items"
Five WithArray calls in dashboard_builder.go were missing items:
- create_widget: group_by, tab_labels → WithStringItems()
- assemble_dashboard: widgets, variables → Items({"type":"object"})
- assemble_dashboard: tags → WithStringItems()
No behavior change — schema metadata fix only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
create_dashboard,update_dashboard,delete_dashboardfor direct API-backed dashboard operationsget_dashboard_schema,create_widget,assemble_dashboardproviding a guided 3-step process for LLM-friendly dashboard constructionpkg/tools/validation/) with 8 rules: version check, root widget existence, unique IDs, widget type validation, variable reference integrity, grid overlap detection, hierarchy cycle detection, and markdown content sanitizationTest plan
go build ./...passes cleango fmt ./...passes cleango test -v ./...— all 28 validation tests passcreate_widget+assemble_dashboardworkflowcreate_dashboard,update_dashboard,delete_dashboard