Skip to Content
almyty docs — v1
API ReferenceTools API

Tools API

This is the HTTP API reference. For UI walkthroughs, see Getting Started and the feature guides above.

REST API reference for managing tools.

Endpoints

MethodEndpointDescription
GET/organizations/{orgId}/toolsList tools
POST/organizations/{orgId}/toolsCreate a tool
GET/tools/:idGet tool by ID
PATCH/tools/:idUpdate a tool
DELETE/tools/:idDelete a tool
POST/organizations/{orgId}/tools/:id/executeExecute a tool

List Tools

curl https://api.almyty.com/organizations/{orgId}/tools \ -H "Authorization: Bearer $TOKEN"

Response

{ "success": true, "data": { "tools": [ { "id": "tool-uuid", "name": "get_users", "description": "Retrieve a list of users", "type": "api", "status": "active", "parameters": { "type": "object", "properties": { "page": { "type": "integer" } } } } ] } }

Create a Tool

curl -X POST https://api.almyty.com/organizations/{orgId}/tools \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "calculate_total", "description": "Calculate order total with tax", "type": "javascript", "parameters": { "type": "object", "properties": { "price": { "type": "number" }, "quantity": { "type": "integer" }, "taxRate": { "type": "number", "default": 0.1 } }, "required": ["price", "quantity"] }, "code": "return { total: parameters.price * parameters.quantity * (1 + parameters.taxRate) };" }'

Tool Types

TypeRequired Fields
httpexecutionConfig.method, executionConfig.url
javascriptcode
graphqlexecutionConfig.endpoint, executionConfig.query
llmexecutionConfig.providerId, executionConfig.promptTemplate

Execute a Tool

curl -X POST https://api.almyty.com/organizations/{orgId}/tools/{id}/execute \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "parameters": { "price": 29.99, "quantity": 3 } }'

Response

{ "success": true, "data": { "result": { "total": 98.97 }, "duration": 12, "status": "success" } }