Skip to main content
Glama

plot_expression

Idempotent

Plot a mathematical expression over a specified variable and range, returning the rendered result as a PNG or SVG image.

Instructions

Plot an expression and return it as a rendered image (PNG or SVG)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoWorkspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'.default
variableNoPlot variablex
range_maxNoUpper bound of plot range
range_minNoLower bound of plot range
expressionYesExpression to plot
image_formatNoImage format to return: 'png' (raster) or 'svg' (vector, smaller)png

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.7.0
    • addedInput schema / properties / image_format
      Added value: +{
      +  "default": "png",
      +  "description": "Image format to return: 'png' (raster) or 'svg' (vector, smaller)",
      +  "enum": [
      +    "png",
      +    "svg"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / session / description
      Previous value: -"Named workspace to use. Workspaces have independent variables; omit for 'default'."New value: +"Workspace to use, as a name or a portable handle. Workspaces have independent variables. A name is scoped to this MCP session; a handle returned by start_sage_session (workspace_token) reaches the same workspace across reconnects and is a bearer credential -- keep it secret. Omit for 'default'."
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changedv0.5.0
    • addedInput schema / properties / session
      Added value: +{
      +  "default": "default",
      +  "description": "Named workspace to use. Workspaces have independent variables; omit for 'default'.",
      +  "type": "string"
      +}
  3. First observedv0.3.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations declare idempotent, non-destructive, closed-world, so the safety profile is partially covered. But the description says nothing beyond what annotations give: it doesn't explain the range/variable defaults, the session/workspace scoping, or the output format tradeoffs already hinted by the schema. For a tool with session-scoped state, this is thin.

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?

A single short sentence, front-loaded with the verb and resource, no waste. Nothing redundant.

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

Completeness2/5

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

With no output schema, no annotations covering behavior beyond safety, and no description of the returned image or defaults, the description is too thin for a 6-parameter plotting tool operating on session-scoped workspaces. The schema carries the parameter load but the description should at least name the range/variable conventions or model of use.

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%, so every parameter is documented in the schema itself (including the image_format enum and the session bearer-credential warning). The description adds no parameter semantics beyond the schema, so the baseline of 3 applies.

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 clear verb+resource ('Plot an expression') and the return type (rendered image). It doesn't differentiate from siblings like plot3d_expression or plot_multi_expression, which a reader must infer from those names.

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 when-to-use guidance and no mention of alternatives such as plot3d_expression or plot_multi_expression. The agent gets no conditions that select this tool over its plotting siblings.

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