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

# Run a tool

`POST /api/agent_builder/tools/_execute`

**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/_execute</span></div>

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

Run a tool with parameters. Use this endpoint to run a tool directly with specified inputs and optional external connector integration. 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:read.

## Headers

- `kbn-xsrf` string, required

## Request body

- object
  - `connector_id` string — Optional connector ID for tools that require external integrations.
  - `tool_id` string, required — The ID of the tool to execute.
  - `tool_params` object, required — Parameters to pass to the tool execution. See examples for details

## 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)
