> ## Documentation Index
> Fetch the complete documentation index at: https://guide.omnia-voice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a tool (partial)

> Send only what changes. Several fields accept `null` to clear —
see `UpdateToolRequest`.




## OpenAPI

````yaml /openapi.yaml patch /agent-tools/{id}
openapi: 3.0.0
info:
  title: Omnia Voice API
  description: >
    The Omnia Voice API allows you to programmatically manage voice agents,
    tools, phone numbers, and call logs.


    ## Authentication

    All API requests require an API key to be passed in the `X-API-Key` header.


    ## Rate Limiting

    API requests are rate limited to 1000 requests per hour per API key.
  version: 1.0.0
  contact:
    email: support@omnia-voice.com
servers:
  - url: https://api.omnia-voice.com/api/v1
    description: Production
  - url: https://dashboard.omnia-voice.com/api/v1
    description: Production (alias — same service)
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Manage voice agents
  - name: Tools
    description: Manage agent tools and actions
  - name: Phone Numbers
    description: Manage phone number assignments
  - name: Calls
    description: Create and manage voice calls
  - name: Call Logs
    description: View call history and details
  - name: Pricing
    description: Get pricing information and calculate call costs
  - name: Configuration
    description: Get configuration options (voices, languages)
paths:
  /agent-tools/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    patch:
      tags:
        - Tools
      summary: Update a tool (partial)
      description: |
        Send only what changes. Several fields accept `null` to clear —
        see `UpdateToolRequest`.
      operationId: updateTool
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateToolRequest'
      responses:
        '200':
          description: Tool updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tool'
        '400':
          description: Validation failed
        '404':
          description: Tool not found
        '409':
          description: A tool with that `modelToolName` already exists.
components:
  schemas:
    UpdateToolRequest:
      type: object
      description: |
        Partial update. Several fields accept **`null` to clear** a previously
        set value — `agentReaction`, `httpSecurityOptions`, `authTokens`
        (clears every slot at once), and `timeout`. On create those same fields
        reject null, since omitting them already means "unset".
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        description:
          type: string
        modelToolName:
          type: string
          pattern: ^[a-zA-Z][a-zA-Z0-9_]*$
        httpMethod:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
        baseUrlPattern:
          type: string
          format: uri
        dynamicParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DynamicParameter'
        automaticParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AutomaticParameter'
        staticParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/StaticParameter'
        agentReaction:
          type: string
          allOf:
            - $ref: '#/components/schemas/AgentReaction'
          nullable: true
        timeout:
          type: string
          allOf:
            - $ref: '#/components/schemas/ToolTimeout'
          nullable: true
        readOnly:
          type: boolean
        httpSecurityOptions:
          type: object
          allOf:
            - $ref: '#/components/schemas/HttpSecurityOptions'
          nullable: true
        authTokens:
          type: object
          nullable: true
          additionalProperties:
            type: string
    Tool:
      type: object
      description: A tool the agent can invoke during a call.
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        modelToolName:
          type: string
          description: The function name the model sees.
        type:
          type: string
          enum:
            - http
            - client
        httpMethod:
          type: string
          enum:
            - GET
            - POST
            - PUT
            - PATCH
            - DELETE
          description: HTTP tools only.
        baseUrlPattern:
          type: string
          description: HTTP tools only.
        dynamicParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DynamicParameter'
        automaticParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/AutomaticParameter'
        staticParameters:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/StaticParameter'
        agentReaction:
          type: string
          allOf:
            - $ref: '#/components/schemas/AgentReaction'
          nullable: true
        httpSecurityOptions:
          type: object
          allOf:
            - $ref: '#/components/schemas/HttpSecurityOptions'
          nullable: true
        setCredentials:
          type: object
          additionalProperties:
            type: boolean
          description: |
            Which credential slots hold a stored value. **Credential values are
            never returned by this API** — this map exists so a UI can render
            `••••••••` for a set slot and an empty field for an unset one.
        timeout:
          type: string
          allOf:
            - $ref: '#/components/schemas/ToolTimeout'
          nullable: true
        readOnly:
          type: boolean
          default: false
          description: |
            Attests the tool is side-effect free, letting the runtime run it
            **eagerly** while the agent is still speaking and discard the result
            if the conversation turns elsewhere. Set it only on lookups — never
            on a booking or a payment.
        agentCount:
          type: integer
          description: How many agents this tool is attached to.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    DynamicParameter:
      type: object
      description: The model fills this in from the conversation.
      required:
        - schema
      properties:
        location:
          $ref: '#/components/schemas/ParameterLocation'
        required:
          type: boolean
        schema:
          type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - string
                - number
                - boolean
                - object
                - array
            description:
              type: string
              description: |
                Written for the model, not for a developer. "The customer's
                order number, usually eight digits" beats "order identifier".
            enum:
              type: array
              items:
                type: string
            required:
              type: boolean
    AutomaticParameter:
      type: object
      description: Injected by the platform at call time.
      required:
        - knownValue
      properties:
        location:
          $ref: '#/components/schemas/ParameterLocation'
        knownValue:
          type: string
          description: e.g. `KNOWN_PARAM_CALL_ID` to receive the live call's ID.
    StaticParameter:
      type: object
      description: |
        Sent on every invocation and **never exposed to the model**. Use for
        tenant IDs, API versions, feature flags — things your endpoint needs but
        the agent has no business knowing or inventing.
      required:
        - value
      properties:
        location:
          $ref: '#/components/schemas/ParameterLocation'
        value:
          description: Any JSON value.
    AgentReaction:
      type: string
      enum:
        - speaks
        - listens
        - speaks-once
      description: |
        What the agent does when the tool returns.
        `speaks` narrates the result (default). `listens` stays silent and waits
        — right for tools that hand off, like a transfer. `speaks-once` speaks
        only if it did not already speak just before invoking, which prevents
        "Checking that for you… here is the result…" double-talk.
    ToolTimeout:
      type: string
      pattern: ^\d+(\.\d+)?s$
      description: |
        Seconds with an `s` suffix, e.g. `"2.5s"` or `"10s"`. Must be greater
        than 0 and at most **40s**. Defaults to 2.5s when unset.
      example: 5s
    HttpSecurityOptions:
      type: object
      description: |
        Declares which credentials the tool needs and how each is sent. The
        secret values themselves live in `authTokens`.

        `options` is a list of **acceptable alternatives** — satisfying any one
        entry is enough, which is how you offer "either an API key or a bearer
        token".
      required:
        - options
      properties:
        options:
          type: array
          minItems: 1
          items:
            type: object
            required:
              - requirements
            properties:
              requirements:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/CredentialRequirement'
                description: Credential name → how it is sent.
    ParameterLocation:
      type: string
      description: |
        Where the value goes in the HTTP request. Both the short and the
        canonical long form are accepted on input; the long form is what is
        sent to the runtime.
      enum:
        - header
        - query
        - path
        - body
        - PARAMETER_LOCATION_HEADER
        - PARAMETER_LOCATION_QUERY
        - PARAMETER_LOCATION_PATH
        - PARAMETER_LOCATION_BODY
    CredentialRequirement:
      type: object
      description: |
        How one credential is transmitted. Declare **exactly one** of the three.
      properties:
        queryApiKey:
          type: object
          description: Sent as a query-string parameter.
          properties:
            name:
              type: string
        headerApiKey:
          type: object
          description: Sent as a request header.
          properties:
            name:
              type: string
        httpAuth:
          type: object
          description: Sent via the Authorization header with a scheme.
          properties:
            scheme:
              type: string
              example: Bearer
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````