Update a tool
Technical Preview; added in 9.2.0
Spaces method and path for this operation:
put /s/{space_id}/api/agent_builder/tools/{toolId}
Refer to Spaces for more information.
Update an existing tool. Use this endpoint to modify any aspect of the tool's configuration or metadata.
[Required authorization] Route required privileges: manage_onechat.
PUT
/api/agent_builder/tools/{toolId}
curl \
--request PUT 'https://localhost:5601/api/agent_builder/tools/{toolId}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"tags":["analytics","finance","reporting"],"description":"Updated ES|QL query tool for comprehensive financial analysis with enhanced filtering","configuration":{"query":"FROM financial_trades | WHERE execution_timestamp \u003e= ?startTime AND symbol LIKE ?symbolPattern | STATS trade_count=COUNT(*), avg_price=AVG(execution_price), total_volume=SUM(quantity) BY symbol | SORT trade_count DESC | LIMIT ?limit","params":{"limit":{"type":"integer","description":"Maximum number of results to return"},"startTime":{"type":"date","description":"Start time for the analysis in ISO format"},"symbolPattern":{"type":"keyword","description":"Pattern to filter symbols (e.g., 'US_*' for US instruments)"}}}}'
Request examples
Update esql tool request
Example request to update the custom ESQL tool
{
"tags": [
"analytics",
"finance",
"reporting"
],
"description": "Updated ES|QL query tool for comprehensive financial analysis with enhanced filtering",
"configuration": {
"query": "FROM financial_trades | WHERE execution_timestamp >= ?startTime AND symbol LIKE ?symbolPattern | STATS trade_count=COUNT(*), avg_price=AVG(execution_price), total_volume=SUM(quantity) BY symbol | SORT trade_count DESC | LIMIT ?limit",
"params": {
"limit": {
"type": "integer",
"description": "Maximum number of results to return"
},
"startTime": {
"type": "date",
"description": "Start time for the analysis in ISO format"
},
"symbolPattern": {
"type": "keyword",
"description": "Pattern to filter symbols (e.g., 'US_*' for US instruments)"
}
}
}
}
Example request to update the custom Search tool
{
"tags": [
"search",
"finance",
"compliance",
"reporting"
],
"description": "Updated search tool for comprehensive financial data analysis, reporting, and compliance monitoring"
}
Response examples (200)
Update esql tool example
Example response showing the updated ESQL tool
{
"id": "example-esql-tool",
"tags": [
"analytics",
"finance",
"reporting"
],
"type": "esql",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"startTime",
"symbolPattern",
"limit"
],
"properties": {
"limit": {
"type": "integer",
"description": "Maximum number of results to return"
},
"startTime": {
"type": "string",
"format": "date-time",
"description": "Start time for the analysis in ISO format"
},
"symbolPattern": {
"type": "string",
"description": "Pattern to filter symbols (e.g., 'US_*' for US instruments)"
}
},
"description": "Parameters needed to execute the enhanced query",
"additionalProperties": false
},
"readonly": false,
"description": "Updated ES|QL query tool for comprehensive financial analysis with enhanced filtering",
"configuration": {
"query": "FROM financial_trades | WHERE execution_timestamp >= ?startTime AND symbol LIKE ?symbolPattern | STATS trade_count=COUNT(*), avg_price=AVG(execution_price), total_volume=SUM(quantity) BY symbol | SORT trade_count DESC | LIMIT ?limit",
"params": {
"limit": {
"type": "integer",
"description": "Maximum number of results to return"
},
"startTime": {
"type": "date",
"description": "Start time for the analysis in ISO format"
},
"symbolPattern": {
"type": "keyword",
"description": "Pattern to filter symbols (e.g., 'US_*' for US instruments)"
}
}
}
}
Example response showing the updated Search tool
{
"id": "example-index-search-tool",
"tags": [
"search",
"finance",
"compliance",
"reporting"
],
"type": "index_search",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"nlQuery"
],
"properties": {
"nlQuery": {
"type": "string",
"description": "A natural language query expressing the search request"
}
},
"additionalProperties": false
},
"readonly": false,
"description": "Updated search tool for comprehensive financial data analysis, reporting, and compliance monitoring",
"configuration": {
"pattern": "financial_*"
}
}