Get a tool by id
Technical Preview; added in 9.2.0
Spaces method and path for this operation:
get /s/{space_id}/api/agent_builder/tools/{toolId}
Refer to Spaces for more information.
Get a specific tool by ID. Use this endpoint to retrieve the complete tool definition including its schema and configuration requirements.
[Required authorization] Route required privileges: read_onechat.
GET
/api/agent_builder/tools/{toolId}
curl \
--request GET 'https://localhost:5601/api/agent_builder/tools/{toolId}' \
--header "Authorization: $API_KEY"
Response examples (200)
Get builtin tool example
Example response returning built-in platform.core.search tool
{
"id": "platform.core.search",
"tags": [],
"type": "builtin",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"query"
],
"properties": {
"index": {
"type": "string",
"description": "(optional) Index to search against. If not provided, will automatically select the best index to use based on the query."
},
"query": {
"type": "string",
"description": "A natural language query expressing the search request"
}
},
"additionalProperties": false
},
"readonly": true,
"description": "A powerful tool for searching and analyzing data within your Elasticsearch cluster.\nIt supports both full-text relevance searches and structured analytical queries.\n\nUse this tool for any query that involves finding documents, counting, aggregating, or summarizing data from a known index.\n\nExamples of queries:\n- \"find articles about serverless architecture\"\n- \"search for support tickets mentioning 'billing issue' or 'refund request'\"\n- \"what is our policy on parental leave?\"\n- \"list all products where the category is 'electronics'\"\n- \"show me the last 5 documents from that index\"\n- \"show me the sales over the last year break down by month\"\n\nNote:\n- The 'index' parameter can be used to specify which index to search against.\n If not provided, the tool will decide itself which is the best index to use.\n- It is perfectly fine not to specify the 'index' parameter. It should only be specified when you already\n know about the index and fields you want to search on, e.g. if the user explicitly specified it.",
"configuration": {}
}
Example response returning custom example-esql-tool tool
{
"id": "example-esql-tool",
"tags": [
"analytics",
"finance"
],
"type": "esql",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"required": [
"startTime",
"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"
}
},
"description": "Parameters needed to execute the query",
"additionalProperties": false
},
"readonly": false,
"description": "Example ES|QL query tool for analyzing financial trades with time filtering",
"configuration": {
"query": "FROM financial_trades | WHERE execution_timestamp >= ?startTime | STATS trade_count=COUNT(*), avg_price=AVG(execution_price) 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"
}
}
}
}
Example response returning custom example-index-search-tool tool
{
"id": "example-index-search-tool",
"tags": [
"search",
"finance"
],
"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": "Search tool specifically for financial data analysis and reporting",
"configuration": {
"pattern": "financial_*"
}
}