Math & Numbers
Calculate the perimeter of various geometric shapes
Call this tool from your code in three languages.
curl -X POST 'https://api.elysiatools.com/en/api/tools/perimeter-calculator' \
-H 'Content-Type: application/json' \
-d '{"shape":"rectangle","length":10,"width":5,"radius":5,"side":5,"sideA":3,"sideB":4,"sideC":5,"base":10,"height":6,"side1":4,"side2":4}'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/perimeter-calculator| Name | Type | Required | Description |
|---|---|---|---|
| shape | select | Yes | — |
| length | number | No | — |
| width | number | No | — |
| radius | number | No | — |
| side | number | No | — |
| sideA | number |
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-perimeter-calculator": {
"name": "perimeter-calculator",
"description": "Calculate the perimeter of various geometric shapes",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=perimeter-calculator",
"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": "perimeter-calculator",
"arguments": {
"shape": "rectangle",
"length": 10,
"width": 5,
"radius": 5,
"side": 5,
"sideA": 3,
"sideB": 4,
"sideC": 5,
"base": 10,
"height": 6,
"side1": 4,
"side2": 4
}
}
}Questions or issues? Contact [email protected]
| No |
| — |
| sideB | number | No | — |
| sideC | number | No | — |
| base | number | No | — |
| height | number | No | — |
| side1 | number | No | — |
| side2 | number | No | — |
JSON result
{
"key": {...},
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}