> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getbutter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Tool

Update an existing tool configuration. Only provided fields will be updated.

### Headers

<ParamField header="X-API-Key" type="string" required>
  Your API key for authentication.
</ParamField>

<ParamField header="X-Organization-Id" type="string" required>
  The organization ID.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`.
</ParamField>

### Path Parameters

<ParamField path="tool_id" type="string" required>
  The unique identifier of the tool.
</ParamField>

### Permissions

* `tools:update` (admin, agent\_manager)

### Request Body

All fields are optional. Only provided fields will be updated.

<ParamField body="tool_name" type="string">
  New name for the tool (pattern: `^[a-zA-Z0-9_]+$`, 1-50 characters).
</ParamField>

<ParamField body="tool_description" type="string">
  New description (1-500 characters).
</ParamField>

<ParamField body="webhook_url" type="string">
  New webhook URL (1-500 characters).
</ParamField>

<ParamField body="http_method" type="string">
  New HTTP method: `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`.
</ParamField>

<ParamField body="headers" type="object">
  New headers (replaces existing).
</ParamField>

<ParamField body="parameters" type="array">
  New parameters (replaces existing).
</ParamField>

<ParamField body="timeout_seconds" type="integer">
  New timeout in seconds (1-60).
</ParamField>

### Response

<ResponseField name="success" type="boolean">
  Indicates if the update was successful.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable success message.
</ResponseField>

<ResponseField name="data" type="object">
  The updated tool object.
</ResponseField>

<RequestExample>
  ```json Request theme={null}
  {
    "webhook_url": "https://api.shop.com/v2/orders/status",
    "timeout_seconds": 45
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "message": "Tool updated successfully",
    "data": {
      "tool_id": "tool_a1b2c3d4e5f6",
      "tool_name": "GetOrderStatus",
      "webhook_url": "https://api.shop.com/v2/orders/status",
      "timeout_seconds": 45,
      "updated_at": "2024-01-20T15:00:00Z"
    }
  }
  ```
</ResponseExample>

### Errors

<ResponseField name="404" type="object">
  Tool not found.
</ResponseField>

<ResponseField name="403" type="object">
  Tool belongs to different organization.
</ResponseField>
