Tools API
This page is for developers who want to list, create and run tools from their own code. A tool is one thing an assistant can do in one of your systems, such as “look up an order” or “issue a refund”. For example, a test script can run the “track shipment” tool against a known order to check your order system still answers. In the app, tools live under Tools; see Tools.

REST API reference for managing tools.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | /organizations/{orgId}/tools | List tools |
POST | /organizations/{orgId}/tools | Create a tool |
GET | /tools/:id | Get tool by ID |
PATCH | /tools/:id | Update a tool |
DELETE | /tools/:id | Delete a tool |
POST | /organizations/{orgId}/tools/:id/execute | Execute 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": "function",
"executionMethod": "custom",
"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) };"
}'Execution methods
executionMethod says how the tool runs, and each method keeps its definition in its own field.
executionMethod | Required fields | Page |
|---|---|---|
http | httpConfig.method, httpConfig.path | HTTP tools |
custom | code | JavaScript tools |
graphql | graphqlConfig.endpoint, graphqlConfig.query | GraphQL tools |
soap | soapConfig.endpoint, soapConfig.operation | SOAP tools |
grpc | grpcConfig.endpoint, grpcConfig.serviceName, grpcConfig.methodName, grpcConfig.protoDefinition | gRPC tools |
llm | llmConfig.providerId, llmConfig.promptTemplate | LLM tools |
sdk | sdkConfig | SDK tools |
For graphql, soap and grpc, a create without the matching config, or with code, is refused with a 400. The endpoint (and for grpc the proto) may be left out when the tool is linked to a connected API with apiId.
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"
}
}