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

# Update tool configuration

> Updates the configuration of an existing tool. You can modify the
parameters schema, webhook URL, headers, and other settings.




## OpenAPI

````yaml patch /tool/{id}
openapi: 3.0.3
info:
  title: iwy API
  description: >
    API for managing AI agents and custom tools. Create conversational AI agents
    with custom capabilities,

    manage tool integrations, and embed AI avatars in your applications.


    ## Authentication

    All endpoints require authentication using a Bearer token
    (IWY_SERVICE_API_KEY).

    You can find your API key at
    [app.iwy.ai/settings](https://app.iwy.ai/settings).


    ## Base URL

    ```

    https://api.iwy.ai/v1

    ```
  version: 1.0.0
  contact:
    name: iwy Support
    url: https://www.iwy.ai/contact
servers:
  - url: https://api.iwy.ai/v1
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Ephemeral Agents
    description: Create one-time use agents with automatic expiration
  - name: Agents
    description: Manage AI agents and their configurations
  - name: Tools
    description: Manage custom tools and functions for agents
  - name: Sessions
    description: Start and manage agent video call sessions
paths:
  /tool/{id}:
    patch:
      tags:
        - Tools
      summary: Update tool configuration
      description: |
        Updates the configuration of an existing tool. You can modify the
        parameters schema, webhook URL, headers, and other settings.
      operationId: updateTool
      parameters:
        - $ref: '#/components/parameters/ToolId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateToolRequest'
            example:
              description: Fetches current weather and 3-day forecast
              timeout_seconds: 20
      responses:
        '200':
          description: Tool updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tool'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    ToolId:
      name: id
      in: path
      required: true
      description: The unique identifier (UUID) of the tool
      schema:
        type: string
        format: uuid
      example: dcfae097-1b37-4444-bb0c-1a6abb0320fd
  schemas:
    UpdateToolRequest:
      type: object
      description: Fields to update (all optional)
      properties:
        name:
          type: string
        description:
          type: string
        server_url:
          type: string
          format: uri
        parameters_schema:
          type: object
        method:
          type: string
          enum:
            - POST
            - GET
            - PUT
            - PATCH
            - DELETE
        headers:
          type: object
          additionalProperties: true
        timeout_seconds:
          type: integer
          minimum: 1
          maximum: 300
        is_async:
          type: boolean
        strict_params:
          type: boolean
        auth_config:
          type: object
          nullable: true
        tags:
          type: array
          items:
            type: string
    Tool:
      type: object
      description: Complete tool configuration
      required:
        - id
        - user_id
        - name
        - description
        - server_url
        - parameters_schema
        - method
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the tool
        user_id:
          type: string
          format: uuid
          description: ID of the user who owns this tool
        name:
          type: string
          description: Function name (snake_case)
          example: get_weather
        description:
          type: string
          description: Clear explanation of what the tool does
          example: Fetches the current weather for a given city
        server_url:
          type: string
          format: uri
          description: Webhook endpoint URL
          example: https://webhook.example.com/weather
        parameters_schema:
          type: object
          description: JSON Schema defining the tool's parameters
          example:
            type: object
            required:
              - city
            properties:
              city:
                type: string
                description: The name of the city
            additionalProperties: false
        method:
          type: string
          enum:
            - POST
            - GET
            - PUT
            - PATCH
            - DELETE
          description: HTTP method
          default: POST
        headers:
          type: object
          description: Custom HTTP headers
          additionalProperties: true
          example:
            Content-Type: application/json
            x-api-key: your-key
        timeout_seconds:
          type: integer
          description: Request timeout in seconds
          default: 20
          minimum: 1
          maximum: 300
        is_async:
          type: boolean
          description: Whether the tool runs asynchronously
          default: false
        strict_params:
          type: boolean
          description: Whether to strictly validate parameters
          default: true
        auth_config:
          type: object
          description: Authentication configuration
          nullable: true
        tags:
          type: array
          description: Tags for organization
          items:
            type: string
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Error message
          example: Parameter validation failed
        details:
          description: Additional error details
          oneOf:
            - type: string
            - type: object
        execution_time_ms:
          type: integer
          description: Execution time before error occurred
  responses:
    BadRequestError:
      description: Invalid request - validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Bad request
            details: 'Missing required field: name'
    UnauthorizedError:
      description: Authentication failed - invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Unauthorized
            details: Invalid or missing API key
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Not found
            details: The requested resource does not exist
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Internal server error
            details: An unexpected error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Your iwy Service API Key. Find it at
        [app.iwy.ai/settings](https://app.iwy.ai/settings).


        Include it in the Authorization header:

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````