Tools
Update tool
/api/v1/agents/{agentId}/tools/{toolId}
Update tool
Updates one or more tool fields. The HMAC secret is stored but not returned. If you rotate hmacSecret, update your webhook verification code to use the new secret before relying on future tool calls.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
agentId * |
path | integer | Internal agent id that owns the tool. |
toolId * |
path | integer | Internal tool id. |
Request body
UpdateTool
| Field | Type | Description |
|---|---|---|
name |
string | Tool name. Must start with a lowercase letter and use lowercase letters, numbers, or underscores. |
description |
string | Description that explains when and how the model should use the tool. |
schema |
object | JSON Schema object that defines the tool input parameters. When the agent uses the tool, Eloquent sends a JSON body matching this schema to the configured endpoint. |
endpointUrl |
string | HTTPS webhook endpoint called with a POST request when the tool executes. Eloquent sends the tool input as JSON and signs the raw request body with HMAC-SHA256. |
hmacSecret |
string | Secret used to sign tool execution requests. Use this value on your server to verify the |
Responses
| Status | Schema | Description |
|---|---|---|
200 |
Tool | Updated tool |
400 |
ToolError | Invalid request body or tool schema |
401 |
ToolError | Missing or invalid auth |
403 |
ToolError | Caller cannot update tools for this agent |
404 |
ToolError | Tool not found |
Example 200 response
{
"id": 1,
"name": "string",
"description": "string",
"schema": [],
"endpointUrl": "string",
"createdAt": "string",
"updatedAt": "string"
}
Example 400 response
{
"error": "string",
"message": "string",
"issues": [
{
"path": [
"string"
],
"message": "string",
"code": "string"
}
]
}
Example 401 response
{
"error": "string",
"message": "string",
"issues": [
{
"path": [
"string"
],
"message": "string",
"code": "string"
}
]
}
Example 403 response
{
"error": "string",
"message": "string",
"issues": [
{
"path": [
"string"
],
"message": "string",
"code": "string"
}
]
}
Example 404 response
{
"error": "string",
"message": "string",
"issues": [
{
"path": [
"string"
],
"message": "string",
"code": "string"
}
]
}