Skip to main content
Glama

Function Plotter

plot_function
Read-onlyIdempotent

Plot mathematical functions by providing an expression and x-axis range. Visualize equations like x**2 or sin(x) quickly.

Instructions

Generate mathematical function plots (requires matplotlib).

Examples: plot_function("x**2", (-5, 5)) plot_function("sin(x)", (-3.14, 3.14))

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
x_rangeYesX-axis range as (min, max), e.g., (-5.0, 5.0)
expressionYesMathematical expression to plot, e.g., "x**2" or "sin(x)". Must be <= MAX_EXPRESSION_LENGTH characters. Example: "x**2"
num_pointsNoNumber of sample points to plot along x_range, e.g., 100
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, covering safety and idempotency. The description adds the 'requires matplotlib' dependency, which is valuable beyond annotations. No contradiction or additional hidden behavior is disclosed.

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 extremely concise: one sentence plus two illustrative examples. Every element earns its place with no redundancy, making it easy to parse quickly.

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 rich input schema (all parameters described) and annotations (safety profile), the description is largely complete. It adds the matplotlib dependency and usage examples. However, it does not specify the return type (e.g., plot object or display), which is a minor gap in the absence of an output schema.

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% with clear descriptions for all three parameters. The description reiterates parameter usage through examples (e.g., plot_function('x**2', (-5, 5))), adding minimal new semantic value beyond the schema.

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 clearly states the verb 'generate' and the resource 'mathematical function plots', with examples showing usage for expressions like 'x**2' and 'sin(x)'. It distinguishes from sibling plot tools (e.g., plot_histogram, plot_line_chart) by focusing on mathematical expressions rather than data-based plots.

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?

The description provides basic context ('requires matplotlib') and usage examples, but does not explicitly state when to use this tool versus alternatives like plot_scatter or calc_expression. No exclusions or when-not-to-use guidance is given.

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/clouatre-labs/math-mcp-learning-server'

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