Math & Numbers
Forward, backward, and central finite differences for f′(x₀) plus the central second derivative, with optional per-method error against the exact derivative.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/numerical-differentiation' \
-H 'Content-Type: application/json' \
-d '{"fx":"x^2","x0":1,"h":0.1,"exactDy":"2x","decimalPlaces":6}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST http://127.0.0.1:3003/en/api/tools/numerical-differentiation| Name | Type | Required | Description |
|---|---|---|---|
| fx | text | Yes | Function of x (functions: sin, cos, exp, ln, sqrt, …). |
| x0 | number | Yes | — |
| h | number | Yes | Difference step, 0 < h ≤ 1. Central differences: truncation O(h²); too small an h amplifies round-off. |
| exactDy | text | No | Exact derivative in x; the tool reports the absolute error of each method. Leave empty to skip. |
| decimalPlaces | number | No |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-numerical-differentiation": {
"name": "numerical-differentiation",
"description": "Forward, backward, and central finite differences for f′(x₀) plus the central second derivative, with optional per-method error against the exact derivative.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=numerical-differentiation",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "numerical-differentiation",
"arguments": {
"fx": "x^2",
"x0": 1,
"h": 0.1,
"exactDy": "2x",
"decimalPlaces": 6
}
}
}Questions or issues? Contact [email protected]
| — |
Text result
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}