Skip to main content
Glama
eng-toolkit

eng-toolkit

by Lin830326

Plot Xy

plot_xy

Create line, scatter, step, or stem charts from CSV or inline JSON data and export deterministic SVG/PNG files for engineering analysis.

Instructions

Draw a line, scatter, step or stem chart of up to 20 series as a deterministic SVG (plot.svg; inline in data.svg_inline when <= 150 kB) and, by default, plot.png 1600 px wide (data.png_path; needs the png extra). The PNG also comes back as an image in the reply (inline_image): hand over the PNG, not the SVG path. Also plot_data.json. Data: a CSV with a header row (e.g. another tool's CSV artifact) or inline JSON series. Log axes, fixed ranges, a right axis, reference lines, a band, one marked point, fill to zero, themes, unwrap_phase for a Bode phase. Dense series are min/max decimated.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "plot_xy"
  }
}

Input Schema

NameRequiredDescriptionDefault
bandNoOne shaded horizontal band 'lo,hi,label' in left-axis units, e.g. '-100,100,allowable'; blank = none.
fillNonone, or zero = shade between each line and y = 0, positive and negative in two tints (shear/moment diagrams).none
gridNotrue draws grid lines at the major ticks (and log minor ticks); false draws none.
kindNoline, scatter, step (value holds until the next x) or stem; or one per series in order, e.g. 'line,scatter'.line
themeNoauto (follows the viewer's light/dark setting), light, dark, or print (black and grey with dash patterns).auto
titleNoChart title, plain text of at most 120 characters, e.g. 'Beam shear force'; blank = none.
widthNoSVG width in px, 200..2400, e.g. 800.
formatNoPicture file: both (default: plot.svg + plot.png 1600 px wide; PNG needs the png extra), svg (no PNG) or png (no SVG).both
heightNoSVG height in px, 200..2400, e.g. 500.
hlinesNoHorizontal reference lines 'value,label;...' in left-axis units, e.g. '250,yield;-250,'; at most 10.
legendNoauto (2+ series, emptiest corner), off, top_right, top_left, bottom_right, bottom_left or right (outside).auto
markerNoOptional: ring one point 'x,y,label' in x and left-axis units, e.g. '1200,45.5,duty point' (operating point); blank = none.
seriesNoInline JSON instead of a file: [{"name":"a","x":[0,1],"y":[2,3]}]; <=20 series, <=200000 points each; x optional.
vlinesNoVertical reference lines 'value,label;...' in x units, e.g. '1000,cutoff'; at most 10.
markersNotrue puts a marker on every drawn point of line/step series (scatter and stem always have markers).
x_labelNox axis title including its unit, plain text <= 120 characters, e.g. 'Frequency (Hz)'.
x_rangeNoFixed x axis 'min,max': plain numbers in the axis unit, no unit text, e.g. '0,4000' (not '0,10 s'); blank = automatic.
x_scaleNolinear or log; a log x axis refuses zero or negative x values (nothing is dropped silently).linear
y_labelNoLeft axis title including its unit, e.g. 'Magnitude (dB)'; plain text <= 120 characters.
y_rangeNoFixed left-axis 'min,max': plain numbers in the axis unit, no unit text, e.g. '-80,5'; blank = automatic; outside points are clipped.
y_scaleNolinear or log for the left axis; log refuses zero or negative y values.linear
x_columnNoCSV header name of the x column, e.g. 'frequency_hz'; blank = the first column. CSV mode only.
y2_labelNoRight axis title including its unit, e.g. 'Phase (deg)'; used together with y2_columns.
data_fileNoCSV/TXT path with a header row, e.g. a tool's ws/<job>/filter_response.csv artifact. Give this or 'series'.
y_columnsNoComma-separated CSV columns for the left axis, e.g. 'magnitude_db'; blank = every other numeric column.
y2_columnsNoColumns (CSV) or series names (inline) drawn against a right-hand axis, e.g. 'phase_deg'; blank = none.
inline_imageNotrue (default): the PNG also comes back as an image block in the reply when it is <= 600 kB; false: path only.
unwrap_phaseNotrue unwraps every series whose name contains 'phase' (degrees; 'rad' in the name: radians): no +-180 jumps in a Bode phase.

Output Schema

NameRequiredDescriptionDefault
okYes
dataNoNon-quantity payload (reports, listings)
errorNo
valueNoPrimary quantity result
valuesNoAll named quantity results (includes the primary)
warningsNo
artifactsNo
provenanceYesWhat produced the result and from which inputs.
review_statusNounreviewed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A3.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does it well: output filenames, the <=150 kB inline-SVG threshold, the <=600 kB inline-PNG threshold, the 'png extra' dependency, min/max decimation of dense series, and clipping of points outside y_range. It also promises no silent data loss on log axes ('a log x axis refuses zero or negative x values'), which is exactly the kind of behavior an agent needs before calling.

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?

Front-loads what is drawn and what files come back, then moves to data sources and optional features. The first sentence is a packed run-on carrying outputs, filenames, thresholds and a dependency, but with 28 parameters essentially every clause earns its place.

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?

An output schema exists, yet the description still clarifies which artifact to surface (PNG as inline_image rather than the SVG path), which is the key ambiguity for this tool. Given its complexity, the main remaining gap is the absence of selection guidance versus sibling plotting tools.

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?

Schema coverage is 100% and the per-parameter descriptions are already rich, so the baseline is 3. The description's feature list (log axes, fixed ranges, right axis, reference lines, band, marked point, fill to zero, themes, unwrap_phase for Bode phase) mostly maps back to fields the schema documents better, adding little beyond a one-line reminder of unwrap_phase's Bode intent.

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?

States a concrete verb (draw) and the exact chart kinds it produces (line, scatter, step, stem), plus the output artifacts (plot.svg, plot.png, plot_data.json). The listed chart types implicitly separate it from plot_bar and plot_panels, but no sibling is named, so the differentiation is left to inference.

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

Usage Guidelines3/5

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

Gives input guidance (a CSV with a header row, e.g. another tool's artifact, or inline JSON) and a delivery rule ('hand over the PNG, not the SVG path'), which implies when to use it. It never states when to prefer plot_bar or plot_panels, nor any exclusions, so usage is only implied.

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

Deploy Server

Other Tools