Function Plotter
plot_functionPlot any mathematical function by providing an expression and X-axis range. Visualize curves like x**2 or sin(x) to analyze their behavior.
Instructions
Generate mathematical function plots (requires matplotlib).
Examples: plot_function("x**2", (-5, 5)) plot_function("sin(x)", (-3.14, 3.14))
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expression": "<expression>",
"x_range": "<x_range>"
},
"name": "plot_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x_range | Yes | X-axis range as (min, max), e.g., (-5.0, 5.0) | |
| expression | Yes | Mathematical expression to plot, e.g., "x**2" or "sin(x)". Must be <= MAX_EXPRESSION_LENGTH characters. Example: "x**2" | |
| num_points | No | Number of sample points to plot along x_range, e.g., 100 |