---
type: api
title: Update a tool
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-put-agent-builder-tools-toolid
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana/v9/operation/operation-put-agent-builder-tools-toolid
products:
  - Kibana
---

# Update a tool

Availability: 9.2+

- Server: `https://{kibana_url}`

## Paths

- `PUT` `/api/agent_builder/tools/{toolId}`
- `PUT` `/s/{space_id}/api/agent_builder/tools/{toolId}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#apikeyauth)
- [Basic auth](/elastic/docs-builder/docs/4371/api/doc/kibana/v9/authentication#basicauth)

#### Path Parameters

- `toolId` (string)
  The unique identifier of the tool to update.

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Update an existing tool. Use this endpoint to modify any aspect of the tool's configuration or metadata. To learn more about Agent Builder tools, refer to the [tools documentation](https://www.elastic.co/docs/explore-analyze/ai-features/agent-builder/tools).<br/><br/>[Required authorization] Route required privileges: agentBuilder:manageTools.

## Request Body

`application/json`

- `configuration` (map string to object) — optional
  Updated tool-specific configuration parameters. See examples for details.
- `confirmation` (object) — optional
  Updated tool call policy to control tool call confirmation behavior
  - `askUser` (enum) — optional
    Values: `once`, `always`, `never`
- `description` (string) — optional
  Updated description of what the tool does.
- `tags` ([] string) — optional
  Updated tags for categorizing and organizing tools.

## Response

Indicates a successful response

## Code Examples

#### Console

```console
PUT kbn:/api/agent_builder/tools/{toolId}
{
  "description": "Updated ES|QL query tool for analyzing financial trades with time filtering",
  "tags": ["analytics", "finance", "updated"],
  "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": {
      "startTime": {
        "type": "date",
        "description": "Start time for the analysis in ISO format"
      },
      "limit": {
        "type": "integer",
        "description": "Maximum number of results to return"
      }
    }
  }
}
```

#### curl

```curl
curl \
 -X PUT "https://${KIBANA_URL}/api/agent_builder/tools/{toolId}" \
 -H "Authorization: ApiKey ${API_KEY}" \
 -H "kbn-xsrf: true" \
 -H "Content-Type: application/json" \
 -d '{
   "description": "Updated ES|QL query tool for analyzing financial trades with time filtering",
   "tags": ["analytics", "finance", "updated"],
   "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": {
       "startTime": {
         "type": "date",
         "description": "Start time for the analysis in ISO format"
       },
       "limit": {
         "type": "integer",
         "description": "Maximum number of results to return"
       }
     }
   }
 }'
```

## Response Examples

#### Update ES|QL tool

Example response showing the updated ESQL tool

```json
{
  "configuration": {
    "params": {
      "limit": {
        "description": "Maximum number of results to return",
        "type": "integer"
      },
      "startTime": {
        "description": "Start time for the analysis in ISO format",
        "type": "date"
      },
      "symbolPattern": {
        "description": "Pattern to filter symbols (e.g., \u0027US_*\u0027 for US instruments)",
        "type": "keyword"
      }
    },
    "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"
  },
  "description": "Updated ES|QL query tool for comprehensive financial analysis with enhanced filtering",
  "id": "example-esql-tool",
  "readonly": false,
  "schema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "description": "Parameters needed to execute the enhanced query",
    "type": "object",
    "properties": {
      "limit": {
        "description": "Maximum number of results to return",
        "type": "integer"
      },
      "startTime": {
        "description": "Start time for the analysis in ISO format",
        "format": "date-time",
        "type": "string"
      },
      "symbolPattern": {
        "description": "Pattern to filter symbols (e.g., \u0027US_*\u0027 for US instruments)",
        "type": "string"
      }
    },
    "required": [
      "startTime",
      "symbolPattern",
      "limit"
    ]
  },
  "tags": [
    "analytics",
    "finance",
    "reporting"
  ],
  "type": "esql"
}
```

#### Update index search tool

Example response showing the updated Search tool

```json
{
  "configuration": {
    "pattern": "financial_*"
  },
  "description": "Updated search tool for comprehensive financial data analysis, reporting, and compliance monitoring",
  "id": "example-index-search-tool",
  "readonly": false,
  "schema": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "additionalProperties": false,
    "type": "object",
    "properties": {
      "nlQuery": {
        "description": "A natural language query expressing the search request",
        "type": "string"
      }
    },
    "required": [
      "nlQuery"
    ]
  },
  "tags": [
    "search",
    "finance",
    "compliance",
    "reporting"
  ],
  "type": "index_search"
}
```

