Math & Numbers
Composite Simpson's 1/3 rule for ∫f(x)dx (even n): node table with weights, integral estimate, optional exact value, O(h⁴) accuracy.
Call this tool from your code in three languages.
curl -X POST 'http://127.0.0.1:3003/en/api/tools/numerical-integration-simpson' \
-H 'Content-Type: application/json' \
-d '{"fx":"x^2","a":0,"b":1,"n":4,"exactF":"x^3/3","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-integration-simpson| Name | Type | Required | Description |
|---|---|---|---|
| fx | text | Yes | Integrand in x (functions: sin, cos, exp, ln, sqrt, …). |
| a | number | Yes | — |
| b | number | Yes | May be less than a (the integral flips sign, as in calculus). |
| n | number | Yes | Must be even. h = (b − a)/n; global error is O(h⁴) — halving h divides the error by ~16. |
| exactF | text | 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-integration-simpson": {
"name": "numerical-integration-simpson",
"description": "Composite Simpson's 1/3 rule for ∫f(x)dx (even n): node table with weights, integral estimate, optional exact value, O(h⁴) accuracy.",
"baseUrl": "http://127.0.0.1:3003/mcp/sse?toolId=numerical-integration-simpson",
"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-integration-simpson",
"arguments": {
"fx": "x^2",
"a": 0,
"b": 1,
"n": 4,
"exactF": "x^3/3",
"decimalPlaces": 6
}
}
}Questions or issues? Contact [email protected]
| Exact antiderivative in x; the tool reports F(b) − F(a) and the absolute error. Leave empty to skip. |
| decimalPlaces | number | No | — |
Text result
{
"result": "Processed text content",
"error": "Error message (optional)",
"message": "Notification message (optional)",
"metadata": {
"key": "value"
}
}