---
title: "Create a tool"
method: POST
path: "/api/agent_builder/tools"
tags: ["agent builder"]
---

# Create a tool

`POST /api/agent_builder/tools`

**Spaces method and path for this operation:**

<div><span class="operation-verb post">post</span>&nbsp;<span class="operation-path">/s/{space_id}/api/agent_builder/tools</span></div>

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

Create a new tool. Use this endpoint to define a custom tool with specific functionality and configuration for use by agents. 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.

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `configuration` object, required — Tool-specific configuration parameters. See examples for details.
  - `confirmation` object — Optional tool call policy to control tool call confirmation behavior
    - `askUser` 'once' | 'always' | 'never'
  - `description` string — Description of what the tool does.
  - `id` string, required — Unique identifier for the tool.
  - `tags` string[] — Optional tags for categorizing and organizing tools.
  - `type` 'esql' | 'index_search' | 'workflow' | 'mcp', required — The type of tool to create (e.g., esql, index_search).

## Response `200`

Indicates a successful response

---

[API](https://skmtc.net/elastic/apis/kibana-apis.md) · [All operations](https://skmtc.net/elastic/apis/kibana-apis/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elastic/kibana-apis/versions/531c9e2a7d23/schema)
