Skip to main content
Glama
sirjebbington

mcp-server-starrocks

Query And Plotly Chart

query_and_plotly_chart

Execute SQL queries against StarRocks and generate interactive Plotly charts for immediate visualization. Transform database results into graphical insights using a single function call.

Instructions

using sql query to extract data from database, then using python plotly_expr to generate a chart for UI to display. Use set_session_db to set a per-session default database

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbNodatabase
queryYesSQL query to execute
formatNochart output format: json | png | jpeg | html. 'html' writes an interactive Plotly file to disk and returns its path plus a PNG preview. Defaults to the STARROCKS_CHART_DEFAULT_FORMAT env var, or 'jpeg' if unset.jpeg
plotly_exprYesa one function call expression, with 2 vars binded: `px` as `import plotly.express as px`, and `df` as dataframe generated by query `plotly_expr` example: `px.scatter(df, x="sepal_width", y="sepal_length", color="species", marginal_y="violin", marginal_x="box", trendline="ols", template="simple_white")`

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states the query-then-chart flow but omits whether the operation is read-only, any side effects, or error behavior. Disclosure is minimal beyond the basic purpose.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences and front-loads the core purpose. The second sentence about set_session_db is a useful hint but not essential to the tool's core operation; still, the overall structure is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description is thin. It covers the basic flow but lacks usage alternatives, behavioral details, and what the chart output actually looks like (though format param hints at options). Adequate but not comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All four parameters have schema descriptions, so the description adds little beyond naming query and plotly_expr. The format parameter's full behavior is in the schema, and the description doesn't expand on any parameter semantics. Baseline 3 applies due to 100% schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool queries the database via SQL and generates a Plotly chart for UI display. It distinguishes itself as a combined operation, though it doesn't explicitly contrast with siblings like read_query or analyze_query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool instead of the many sibling tools. The only note about set_session_db is a peripheral tip for setting a default database, not a condition for selecting this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.