Skip to content

Conversation

@ankitpro
Copy link

Add Panel Inspection Tools

Summary

This PR adds four new MCP tools for enhanced panel information retrieval, providing granular access to panel metadata without requiring full dashboard JSON.

New Tools

  • list_panels_by_type: Filter panels by visualization type (timeseries, graph, table, stat, gauge, etc.)
  • get_panel_transformations: Retrieve data transformations applied to panels
  • search_dashboard_panels: Search panels by title, description, or query content
  • get_panel_field_config: Get field configuration including units, thresholds, and field overrides

Benefits

  • 🎯 Targeted Data Retrieval: Get specific panel information without full dashboard JSON
  • 📊 Enhanced Panel Discovery: Easily find panels by type or content
  • 🔍 Better Debugging: Inspect transformations and field configurations
  • 💾 Context Window Efficiency: Reduce token usage for AI assistants
  • 🤖 Automation Friendly: Programmatic access to panel metadata

Implementation

  • ✅ Follows existing code patterns and conventions
  • ✅ Support for nested panels in row panels
  • ✅ Comprehensive error handling
  • ✅ Type-safe implementations with dedicated structs
  • ✅ Read-only operations (requires only dashboards:read permission)

Testing

  • ✅ 8 integration tests covering happy paths and error cases
  • ✅ All unit tests passing (make test-unit)
  • ✅ No linter errors (jsonschema linter passed)
  • ✅ Build successful (go build ./...)

Changes

790 lines added across 4 files:

  • tools/dashboard.go: 359 lines (4 new tools, 6 type definitions, 3 helper functions)
  • tools/dashboard_test.go: 175 lines (8 comprehensive integration tests)
  • README.md: 8 lines (feature documentation and tools table)
  • PANEL_FEATURES_CONTRIBUTION.md: 248 lines (detailed contribution guide)

Documentation

  • ✅ README.md updated with new tools and RBAC requirements
  • ✅ All 4 tools documented in the Tools table
  • ✅ Comprehensive contribution guide included

Breaking Changes

None - All new additions, no modifications to existing functionality.

Use Cases

  • Find all time series panels in a dashboard
  • Identify panels with specific queries or metrics
  • Debug transformation pipelines
  • Audit panel field configurations and thresholds
  • Automate dashboard analysis and documentation

Checklist

  • Code follows project style guidelines
  • Tests added and passing
  • Documentation updated
  • No breaking changes
  • Commit messages follow conventional commits
  • RBAC permissions documented
Add four new MCP tools for enhanced panel information retrieval:
- list_panels_by_type: Filter panels by visualization type
- get_panel_transformations: Retrieve panel transformations
- search_dashboard_panels: Search panels by content
- get_panel_field_config: Get panel field configuration

These tools provide granular access to panel metadata without
requiring full dashboard JSON, improving context window efficiency.

Features:
- Support for nested panels in row panels
- Comprehensive error handling
- Type-safe implementations
- Read-only operations (dashboards:read permission)

Testing:
- 8 integration tests covering happy paths and error cases
- All unit tests passing
- No linter errors

Documentation:
- Updated README.md with new tools and RBAC requirements
- Added PANEL_FEATURES_CONTRIBUTION.md with detailed guide
@ankitpro ankitpro requested a review from a team as a code owner December 12, 2025 06:50
@CLAassistant
Copy link

CLAassistant commented Dec 12, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@pkalsi97 pkalsi97 Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey. I think contributors are not supposed to commit/include in the PR .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants