Skip to main content
Glama
Ian3738
by Ian3738

plot

Draw publication-style ggplot2 charts from R session data. Supports histograms, density, box, violin, scatter, line, bar, QQ, and heatmap plots with grouping, faceting, and error bars.

Instructions

Draw a publication-style ggplot2 chart and return it as an image. Types: histogram, density, box, violin, scatter, line, bar, qq, heatmap.

x is the main variable (the grouping variable for box/violin plots), y the outcome, group adds colour, facet splits into panels. For scatter plots set smooth=true to overlay a fitted line; for bar plots giving y shows group means (with error_bars=true for standard errors) instead of counts. For anything more specific, write ggplot2 code in r_run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xNoMain variable; the grouping variable for box/violin plots.
yNoOutcome variable.
binsNoHistogram bin count.
dataYesDataset name in the session.
flipNoSwap the axes.
statNoSummary for bar charts with a `y`: mean or median.mean
typeNohistogram, density, box, violin, scatter, line, bar, qq or heatmap.scatter
xlabNoX axis label.
ylabNoY axis label.
facetNoSplit into one panel per level of this column.
groupNoColour/fill by this column.
log_yNoUse a log scale on the y axis.
titleNoPlot title.
pointsNoOverlay raw data points on a box plot, or markers on a line.
smoothNoAdd a fitted line to a scatter plot.
positionNododge, stack or fill, for grouped bars.dodge
subtitleNoPlot subtitle.
save_pathNoAlso write the plot to this path as PNG.
sort_barsNoOrder bars by descending count.
error_barsNoAdd standard-error bars to a summary bar chart.
plot_widthNoWidth in inches.
plot_heightNoHeight in inches.
smooth_methodNolm, loess, gam or glm.lm

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden for behavioral disclosure. It does disclose that the tool returns an image and explains special behavior for scatter (smooth) and bar (summary means vs counts) plots. However, it does not describe what happens on error, how the image is delivered or rendered, whether any session state is changed, or limitations around data requirements.

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

Conciseness5/5

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

The description is compact and front-loaded: the first sentence states the main purpose and supported types. The second paragraph efficiently groups related parameters and their roles, and the final sentence routes complex needs to r_run. Every sentence earns its place, and there is no redundant repetition of schema content.

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

Completeness4/5

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

Given the tool has 23 parameters and no output schema, the description is reasonably complete: it covers the key semantic roles and tells the agent when to defer to r_run. All parameters are already documented in the schema with 100% coverage, so the description does not need to repeat them. The main gap is the absence of detail on the returned image format or in-session behavior, which would be helpful but is not critical for selecting and invoking the tool.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3, but the description adds meaningful semantic context beyond the schema. It clarifies that x is the grouping variable for box/violin plots, y is the outcome, group adds colour, and facet splits panels. It also explains that giving y to a bar plot produces group means rather than counts, which is not obvious from the parameter descriptions alone.

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

Purpose5/5

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

The description opens with a specific verb and resource: 'Draw a publication-style ggplot2 chart and return it as an image.' It lists the supported chart types, making the tool's scope immediately clear. It also distinguishes itself from the sibling r_run by designating plot for standard charts and r_run for more specific custom ggplot2 code.

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

Usage Guidelines4/5

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

The description gives clear context for when to use the tool: for standard chart types like histogram, scatter, and bar, and for common variations like smooth lines or error bars. It explicitly names the alternative r_run for 'anything more specific', which is a strong usage boundary. However, it does not enumerate all the situations where a different sibling (e.g., correlation, regression) might be more appropriate for the underlying analysis.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ian3738/r-stats-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server