Skip to content

Add schema to creating dashboards so LLM has context on how to craft a Dashboard JSON config #28

@zhuje

Description

@zhuje

Goals

  • Give LLM context into how to create a Dashboard JSON config (enhancement of Add Tool Call: Create Dashboard  #23)
  • Use Case: Ultimately the value for perses users is not to have to create a Dashboard JSON config manually but to give minimum specifications so the LLM can do the actual config formatting

Problem

  • LLM uses the tool call perses_list_dashboards to get an example of the schema of a dashboard; this solution is brittle and incomplete
  • The LLM should have access to the actual Dashboard schema and not have to rely on perses_list_dashboards to give it context on how to create a Dashboard JSON config

Example of Problem
Currently, the LLM is only guessing at how to create the JSON config. How it can correctly guess the JSON is that it uses the perses_list_dashboards tool call to get the list of dashboards and then uses this example as a context for creating a new JSON config (e.g., it is using the API response to understand what the specifications required in the schema). However, this is not ideal. We want the LLM not to have to use the perses_list_dashboards tool call because this method is brittle and incomplete. For example, the current Perses instance might not have any dashboards, so there is no context for the LLM to create an accurate JSON config.

Image

Figure 1. A chat with Claude attempts to create a dashboard JSON config but initially fails due to an incorrect panel structure. To fix this, it searches for existing projects and calls perses_list_dashboards to retrieve valid JSON examples. Using the returned dashboard list, Claude generates a corrected JSON config—something it couldn't do without this API call.

Solutions to Explore
The goal is to provide the MCP server with context for the dashboard schema without needing to use perses_list_dashboards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions