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

# Toggle Tool

### Description

Enable or disable a tool dynamically.

### Endpoint

**PATCH** `/v3/tools/{tool_id}`

### Authentication

API Key (x-api-key) must be included in the header.

### Path Parameters

* `tool_id` (string) - The ID of the tool to update.

### Query Parameters

* `enabled` (boolean) - Set `true` to enable or `false` to disable the tool.

### Response

A message confirming that the tool was updated.

### Example Request

```sh theme={null}
curl -X PATCH "https://agent-prod.studio.lyzr.ai/v3/tools/tool_id?enabled=1" ^
-H "accept: application/json" ^
-H "x-api-key: sk-default-EXAMPLEKEY123"
```


## OpenAPI

````yaml patch /tools/{tool_id}
openapi: 3.0.3
info:
  title: Lyzr Tool Management API
  version: 1.0.0
servers:
  - url: https://agent-prod.studio.lyzr.ai/v3
security: []
paths:
  /tools/{tool_id}:
    patch:
      tags:
        - Tools
      summary: Toggle Tool
      description: Enable or disable a tool dynamically.
      operationId: toggleTool
      parameters:
        - name: tool_id
          in: path
          required: true
          description: The ID of the tool to update.
          schema:
            type: string
        - name: enabled
          in: query
          required: true
          description: Set true to enable or false to disable the tool.
          schema:
            type: boolean
      responses:
        '200':
          description: Tool updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Tool updated successfully.
        '401':
          description: Unauthorized - Invalid API key
        '404':
          description: Tool not found
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````