﻿---
title: stack kb agent-builder post-agent-builder-tools-execute cli command
description: Run a tool Behaviour flags: --dry-run — validate all inputs and exit without performing any action 
url: https://www.elastic.co/elastic/docs-builder/docs/4116/reference/elastic-cli/cli/stack/kb/agent-builder/post-agent-builder-tools-execute
applies_to:
  - Elastic Cloud Serverless: Preview
  - Elastic Stack: Preview
---

# stack kb agent-builder post-agent-builder-tools-execute cli command
<cli-modifiers>
</cli-modifiers>

```bash
elastic stack kb agent-builder post-agent-builder-tools-execute \
  --tool-id <tool-id> \
  --tool-params <tool-params> \
  [options]
```

Run a tool
**Behaviour flags:**
`--dry-run` — validate all inputs and exit without performing any action

## Options

<definitions>
  <definition term="--tool-id string required">
    The ID of the tool to execute.
  </definition>
  <definition term="--tool-params string required">
    Parameters to pass to the tool execution. See examples for details
  </definition>
  <definition term="--approvals string">
    Actions the tool run may take that would otherwise need a live user to approve them. Applies to this run and any sub-agents it spawns.
  </definition>
  <definition term="--connector-id string">
    Optional connector ID for tools that require external integrations.
  </definition>
  <definition term="--input-file string">
    path to a JSON file to use as command input
  </definition>
  <definition term="--dry-run">
    validate all inputs and exit without performing any action (preview changes without applying them)
  </definition>
</definitions>


## Global Options

<definitions>
  <definition term="--json">
    output as JSON
  </definition>
</definitions>