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

# Update Agent Tool

> Update Agent Tool.

### Authorizations

<ParamField header="X-Api-Key" type="string" required>
  Your Agni API key used to authenticate the request. Pass it in the `X-Api-Key` header. Find or rotate it from your Ravan AI account settings.
</ParamField>

***

### Path Parameters

<ParamField path="id" type="string" required>
  The unique ID of the resource in the path. Use the ID returned by the related create or list endpoint.
</ParamField>

***

### Body

<ParamField body="name" type="string">
  The internal name of the resource. Use a clear name that your team can recognize in the dashboard and API responses.
</ParamField>

<ParamField body="description" type="string">
  A short description of the resource. Use it to explain the purpose, behavior, or usage context.
</ParamField>

<ParamField body="type" type="string">
  The tool type. Use the value that matches how the agent should execute the tool, such as an API or integration tool.
</ParamField>

<ParamField body="definition" type="object">
  The tool definition object. Include the schema, parameters, and execution details required by the tool type.
</ParamField>

***

### Response

<ResponseField name="success" type="boolean">
  Whether the request succeeded.
</ResponseField>

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

<ResponseField name="data" type="object">
  Returned data.

  <Expandable title="data">
    <ResponseField name="id" type="string">
      Unique tool ID
    </ResponseField>

    <ResponseField name="name" type="string">
      Tool name
    </ResponseField>

    <ResponseField name="description" type="string">
      Tool description
    </ResponseField>

    <ResponseField name="type" type="string">
      Tool type (e.g. webhook, function)
    </ResponseField>

    <ResponseField name="definition" type="object">
      Tool definition schema
    </ResponseField>

    <ResponseField name="organizationId" type="string">
      Organization this tool belongs to
    </ResponseField>

    <ResponseField name="isActive" type="boolean">
      Whether the tool is active
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Request completed successfully",
    "data": {
      "id": "id_123",
      "organizationId": "organization_123",
      "name": "Support Bot",
      "description": "Example description",
      "type": "twilio",
      "definition": {},
      "isActive": true
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml PATCH /api/v1/tools/{id}/
openapi: 3.0.1
info:
  title: Agni API
  version: 1.0.0
  description: >-
    Agni API for managing agents, tools, widget settings, telephony, and
    integrations.
servers:
  - url: https://api.ravan.ai
security:
  - X-Api-Key: []
tags:
  - name: AgentService
  - name: AgentToolService
  - name: WidgetSettingsService
  - name: PhoneService
  - name: AppointmentService
  - name: GHLService
  - name: CalComService
  - name: CampaignService
  - name: ContactService
  - name: CallingService
  - name: RAGService
  - name: ModelService
  - name: HealthService
paths:
  /api/v1/tools/{id}/:
    patch:
      tags:
        - AgentToolService
      summary: Update Agent Tool
      operationId: UpdateAgentTool
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Tool ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAgentToolRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateAgentToolResponse'
components:
  schemas:
    UpdateAgentToolRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        type:
          type: string
        definition:
          type: object
    UpdateAgentToolResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
        data:
          $ref: '#/components/schemas/AgentTool'
    AgentTool:
      type: object
      properties:
        id:
          type: string
          description: Tool UUID
        organizationId:
          type: string
          description: Organization UUID
        name:
          type: string
          description: Tool name
        description:
          type: string
          description: Tool description
        type:
          type: string
          description: Tool type
        definition:
          $ref: '#/components/schemas/AgentToolDefinition'
        isActive:
          type: boolean
          description: Whether the tool is active
        agentId:
          type: string
          description: Agent UUID attached to the tool
        enabledFunctions:
          $ref: '#/components/schemas/AgentToolEnabledFunctions'
    AgentToolDefinition:
      type: object
      description: Tool definition payload.
      properties:
        url:
          type: string
          example: https://example.com/book
        method:
          type: string
          example: POST
        parameters:
          type: object
          properties:
            type:
              type: string
              example: object
            properties:
              type: object
              additionalProperties:
                type: object
                properties:
                  type:
                    type: string
                    example: string
      additionalProperties: true
    AgentToolEnabledFunctions:
      type: object
      properties:
        values:
          type: array
          items:
            type: string
  securitySchemes:
    X-Api-Key:
      type: apiKey
      in: header
      name: X-Api-Key

````