Update a tool Technical Preview

View as Markdown
PUT /api/agent_builder/tools/{toolId}

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.

Headers

  • kbn-xsrf string Required

    A required header to protect against CSRF attacks

Path parameters

  • toolId string Required

    The unique identifier of the tool to update.

application/json

Body

  • configuration object

    Updated tool-specific configuration parameters. See examples for details.

    Additional properties are allowed.

  • description string

    Updated description of what the tool does.

  • tags array[string]

    Updated tags for categorizing and organizing tools.

Responses

  • 200 application/json

    Indicates a successful response

PUT /api/agent_builder/tools/{toolId}
curl \
 --request PUT 'https://<KIBANA_URL>/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
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)
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_*"
  }
}