Skip to main content
Glama

plot_expression

Plot a mathematical expression and receive a base64-encoded PNG image. Set the variable and range to visualize functions within a named workspace.

Instructions

Plot an expression and return a base64-encoded PNG image

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionNoNamed workspace to use. Workspaces have independent variables; omit for 'default'.default
variableNoPlot variablex
range_maxNoUpper bound of plot range
range_minNoLower bound of plot range
expressionYesExpression to plot

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states that the tool returns a base64-encoded PNG, but does not mention whether it requires an active Sage session, how it interacts with session state, how range and variable defaults affect the result, or any error behavior. This is a significant gap for a tool that likely depends on session context.

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 a single sentence of nine words, front-loaded with the key action and output format. Every word earns its place; there is no repetition of schema information or unnecessary filler.

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 100% parameter schema coverage, an existing output schema, and the moderate complexity of a 2D plotting tool, the description is largely sufficient. It adds the critical return format (base64 PNG) and combined with the schema, an agent can likely invoke the tool correctly. The main omission is usage context relative to sibling plotting tools, but that is covered under usage_guidelines.

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 description coverage is 100%, so all five parameters already have descriptions. The tool description adds no extra parameter semantics beyond the action of plotting; it does not clarify parameter interplay or provide examples. Baseline 3 is appropriate because the schema does the heavy lifting.

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 action ('Plot'), the resource ('an expression'), and the return format ('base64-encoded PNG image'). It is specific enough to distinguish from some siblings via the singular 'an expression,' but it does not explicitly contrast with plot_multi_expression or plot3d_expression, so it lacks full sibling differentiation.

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 provided on when to use this tool versus alternatives such as plot_multi_expression or plot3d_expression. The description does not mention exclusions, prerequisites (like needing an active session), or recommended scenarios, so an agent must infer usage entirely from the tool name and parameter names.

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

Install Server

Other Tools

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/XBP-Europe/sagemath-mcp'

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