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

# Update Voice Agent Tool

> Patch tool fields; omitted fields keep their value (null is rejected —
send an empty string to clear a text field).



## OpenAPI

````yaml patch /v1/agent/tools/{tool_id}
openapi: 3.1.0
info:
  title: FishAudio OpenAPI
  version: '1'
servers:
  - description: Fish Audio API
    url: https://api.fish.audio
security: []
tags: []
paths:
  /v1/agent/tools/{tool_id}:
    patch:
      tags:
        - Agent Tools
      summary: Update Tool
      description: >-
        Patch tool fields; omitted fields keep their value (null is rejected —

        send an empty string to clear a text field). `headers` replaces the
        header

        list wholesale — include credential values again whenever you send it,

        since reads never return them. Attached agents' drafts pick up the
        change

        immediately; published versions stay frozen until re-published, except

        for credential values: a new authorization_bearer / authorization_basic

        value reaches published versions at their next session, as long as the

        header keeps its name and kind. Calls already in progress keep the value

        they started with.
      parameters:
        - in: path
          name: tool_id
          description: ''
          required: true
          schema:
            title: Tool Id
            type: string
          deprecated: false
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicAgentToolUpdatePayload'
      responses:
        '200':
          description: Request fulfilled, document follows
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  tool_id:
                    title: Tool Id
                    type: string
                  workspace_id:
                    title: Workspace Id
                    type: string
                  name:
                    title: Name
                    type: string
                  description:
                    default: ''
                    title: Description
                    type: string
                  tool_type:
                    enum:
                      - webhook
                      - client
                    title: Tool Type
                    type: string
                  method:
                    enum:
                      - GET
                      - POST
                      - PUT
                      - PATCH
                      - DELETE
                    title: Method
                    type: string
                  url:
                    title: Url
                    type: string
                  used_by:
                    default: 0
                    description: >-
                      How many agents reference this tool in their draft
                      configuration.
                    title: Used By
                    type: integer
                  created_at:
                    format: date-time
                    title: Created At
                    type: string
                  updated_at:
                    format: date-time
                    title: Updated At
                    type: string
                  arguments:
                    description: >-
                      Older shape of `parameters`: each entry becomes a required
                      string parameter. Mutually exclusive with `parameters` in
                      one request. Reads return both, `arguments` being the
                      string parameters of the schema.
                    items:
                      $ref: '#/components/schemas/AgentWebhookArgumentPayload'
                    title: Arguments
                    type: array
                  parameters:
                    additionalProperties:
                      $ref: '#/components/schemas/JsonValue'
                    description: >-
                      Call parameters as a JSON Schema object (draft 2020-12):
                      `type: object` (filled in when omitted), `properties`,
                      `required`. Standard meaning throughout: `required` means
                      the key must be present, `type: ["string", "null"]` allows
                      null, `minLength: 1` makes a string non-empty, `enum` and
                      `pattern` constrain the value, `default` fills a key the
                      model left out. Mutually exclusive with `arguments` in one
                      request. A tool created with `parameters` starts in
                      `parameter_mode: strict`.
                    title: Parameters
                    type: object
                  parameter_mode:
                    default: legacy
                    description: >-
                      Whether the agent runtime checks each call's arguments
                      against `parameters` before running the tool. `legacy`
                      (the default for tools created with `arguments`, and every
                      tool from before this field existed): no check, the
                      model's arguments run as sent. `strict` (the default for
                      tools created with `parameters`): a call that does not
                      satisfy the schema is refused and the model is told to ask
                      the caller for the missing information, and the LLM
                      provider's constrained decoding is turned on where the
                      model supports it (OpenAI models and a custom
                      OpenAI-compatible endpoint receive the tool with `strict:
                      true`, Gemini on the platform's native channel runs
                      validated function calling). Changing `parameters` never
                      changes the mode, and the mode can be changed on its own.
                    enum:
                      - legacy
                      - strict
                    title: Parameter Mode
                    type: string
                  content_type:
                    title: Content Type
                    type: string
                  body_template:
                    default: ''
                    title: Body Template
                    type: string
                  headers:
                    items:
                      $ref: '#/components/schemas/PublicToolHeader'
                    title: Headers
                    type: array
                  timeout_seconds:
                    title: Timeout Seconds
                    type: integer
                  error_handling:
                    enum:
                      - passthrough
                      - hide
                    title: Error Handling
                    type: string
                  mock_responses:
                    items:
                      $ref: '#/components/schemas/AgentWebhookMockResponsePayload'
                    title: Mock Responses
                    type: array
                  expects_response:
                    default: true
                    title: Expects Response
                    type: boolean
                  execution_mode:
                    default: blocking
                    enum:
                      - blocking
                      - fire_and_forget
                      - background
                    title: Execution Mode
                    type: string
                  pre_tool_speech:
                    $ref: '#/components/schemas/AgentToolPreToolSpeech'
                    description: >-
                      What the caller hears as this tool starts, when the
                      agent's own reply has not said anything yet. `auto` (the
                      default for a new tool): the platform decides for each
                      call whether a line is worth saying, and the model writes
                      the line when one is said. `static`: the agent says
                      `message` as written (required, one language). `off`:
                      nothing (what a tool created before this field reads as).
                      Applies to blocking webhook tools and to client tools with
                      `expects_response: true`. It is stored but not used for
                      other tools.
                  signing:
                    $ref: '#/components/schemas/AgentWebhookToolSigningStatus'
                    description: >-
                      Request signing state. Secrets are write-only: rotate
                      returns the new one once.
                  warnings:
                    description: >-
                      Problems with a saved tool that do not stop it from being
                      saved. Empty when there are none.
                    items:
                      $ref: '#/components/schemas/PublicAgentToolWarning'
                    title: Warnings
                    type: array
                required:
                  - tool_id
                  - workspace_id
                  - name
                  - tool_type
                  - method
                  - url
                  - created_at
                  - updated_at
                  - parameters
                  - content_type
                  - timeout_seconds
                  - error_handling
                type: object
        '400':
          description: Bad request syntax or unsupported method
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '401':
          description: No permission -- see authorization schemes
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '404':
          description: Nothing matches the given URI
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '422':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
        '503':
          description: The server cannot process the request due to a high load
          headers: {}
          content:
            application/json:
              schema:
                properties:
                  status:
                    title: Status
                    type: integer
                  message:
                    title: Message
                    type: string
                  reason:
                    anyOf:
                      - type: string
                      - type: 'null'
                    default: null
                    title: Reason
                required:
                  - status
                  - message
                type: object
      security:
        - BearerAuth: []
components:
  schemas:
    PublicAgentToolUpdatePayload:
      additionalProperties: false
      properties:
        name:
          anyOf:
            - maxLength: 120
              minLength: 1
              type: string
            - type: 'null'
          default: null
          title: Name
        description:
          anyOf:
            - maxLength: 2000
              type: string
            - type: 'null'
          default: null
          title: Description
        arguments:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentWebhookArgumentPayload'
              type: array
            - type: 'null'
          default: null
          description: >-
            Older shape of `parameters`: each entry becomes a required string
            parameter. Mutually exclusive with `parameters` in one request.
            Reads return both, `arguments` being the string parameters of the
            schema.
          title: Arguments
        parameters:
          anyOf:
            - additionalProperties:
                $ref: '#/components/schemas/JsonValue'
              type: object
            - type: 'null'
          default: null
          description: >-
            Call parameters as a JSON Schema object (draft 2020-12): `type:
            object` (filled in when omitted), `properties`, `required`. Standard
            meaning throughout: `required` means the key must be present, `type:
            ["string", "null"]` allows null, `minLength: 1` makes a string
            non-empty, `enum` and `pattern` constrain the value, `default` fills
            a key the model left out. Mutually exclusive with `arguments` in one
            request. A tool created with `parameters` starts in `parameter_mode:
            strict`.
          title: Parameters
        parameter_mode:
          anyOf:
            - enum:
                - legacy
                - strict
              type: string
            - type: 'null'
          default: null
          description: >-
            Whether the agent runtime checks each call's arguments against
            `parameters` before running the tool. `legacy` (the default for
            tools created with `arguments`, and every tool from before this
            field existed): no check, the model's arguments run as sent.
            `strict` (the default for tools created with `parameters`): a call
            that does not satisfy the schema is refused and the model is told to
            ask the caller for the missing information, and the LLM provider's
            constrained decoding is turned on where the model supports it
            (OpenAI models and a custom OpenAI-compatible endpoint receive the
            tool with `strict: true`, Gemini on the platform's native channel
            runs validated function calling). Changing `parameters` never
            changes the mode, and the mode can be changed on its own.
          title: Parameter Mode
        method:
          anyOf:
            - enum:
                - GET
                - POST
                - PUT
                - PATCH
                - DELETE
              type: string
            - type: 'null'
          default: null
          title: Method
        url:
          anyOf:
            - maxLength: 4000
              minLength: 1
              type: string
            - type: 'null'
          default: null
          title: Url
        content_type:
          anyOf:
            - maxLength: 128
              type: string
            - type: 'null'
          default: null
          title: Content Type
        body_template:
          anyOf:
            - maxLength: 100000
              type: string
            - type: 'null'
          default: null
          description: >-
            Request body sent for non-GET calls. `{{argument}}`, `{{system.*}}`
            and custom session variable placeholders are filled in at call time;
            a missing value becomes empty. When the body's content type is JSON
            (the default `application/json`, any `+json` type, or a
            `Content-Type` header saying so), a placeholder inside a JSON
            string, such as `{"note": "{{note}}"}`, is JSON-escaped, so quotes,
            backslashes and newlines in the value keep the body valid JSON. A
            placeholder outside a string, such as `{"count": {{count}}}`, is
            inserted as is. Other content types are filled in as is. The body is
            only this template: parameters are not added on their own. With an
            empty template a non-GET call sends no body, and a parameter that
            `url` and `headers` do not reference either never reaches the
            endpoint.
          title: Body Template
        headers:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentWebhookHeaderPayload'
              type: array
            - type: 'null'
          default: null
          title: Headers
        timeout_seconds:
          anyOf:
            - maximum: 300
              minimum: 1
              type: integer
            - type: 'null'
          default: null
          title: Timeout Seconds
        error_handling:
          anyOf:
            - enum:
                - passthrough
                - hide
              type: string
            - type: 'null'
          default: null
          title: Error Handling
        mock_responses:
          anyOf:
            - items:
                $ref: '#/components/schemas/AgentWebhookMockResponsePayload'
              type: array
            - type: 'null'
          default: null
          title: Mock Responses
        expects_response:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Expects Response
        execution_mode:
          anyOf:
            - enum:
                - blocking
                - fire_and_forget
                - background
              type: string
            - type: 'null'
          default: null
          title: Execution Mode
        pre_tool_speech:
          anyOf:
            - $ref: '#/components/schemas/AgentToolPreToolSpeech'
            - type: 'null'
          default: null
          description: >-
            What the caller hears as this tool starts, when the agent's own
            reply has not said anything yet. `auto` (the default for a new
            tool): the platform decides for each call whether a line is worth
            saying, and the model writes the line when one is said. `static`:
            the agent says `message` as written (required, one language). `off`:
            nothing (what a tool created before this field reads as). Applies to
            blocking webhook tools and to client tools with `expects_response:
            true`. It is stored but not used for other tools.
      title: PublicAgentToolUpdatePayload
      type: object
    AgentWebhookArgumentPayload:
      properties:
        name:
          maxLength: 64
          minLength: 1
          title: Name
          type: string
        description:
          default: ''
          maxLength: 500
          title: Description
          type: string
      required:
        - name
      title: AgentWebhookArgumentPayload
      type: object
    JsonValue: {}
    PublicToolHeader:
      properties:
        name:
          title: Name
          type: string
        kind:
          enum:
            - custom
            - authorization_bearer
            - authorization_basic
          title: Kind
          type: string
        value:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: >-
            Header value; null for write-only headers: the credential kinds
            (authorization_bearer / authorization_basic) and custom headers
            whose name looks like a credential (containing auth, token, secret,
            password, cookie, signature, credential, bearer, jwt, api-key or a
            standalone key).
          title: Value
        has_secret:
          default: false
          description: >-
            Whether a write-only header has a stored value; the value itself is
            never returned.
          title: Has Secret
          type: boolean
      required:
        - name
        - kind
      title: PublicToolHeader
      type: object
    AgentWebhookMockResponsePayload:
      properties:
        name:
          default: ''
          maxLength: 120
          title: Name
          type: string
        status_code:
          default: 200
          maximum: 599
          minimum: 100
          title: Status Code
          type: integer
        content_type:
          default: application/json
          maxLength: 128
          title: Content Type
          type: string
        body:
          default: ''
          maxLength: 100000
          title: Body
          type: string
      title: AgentWebhookMockResponsePayload
      type: object
    AgentToolPreToolSpeech:
      additionalProperties: false
      properties:
        mode:
          enum:
            - auto
            - 'off'
            - static
          title: Mode
          type: string
        message:
          default: ''
          description: What to say. Required, and only used, when `mode` is `static`.
          maxLength: 500
          title: Message
          type: string
      required:
        - mode
      title: AgentToolPreToolSpeech
      type: object
    AgentWebhookToolSigningStatus:
      description: |-
        Request signing state of a webhook tool. Secret values never appear in
        reads: the rotate call returns the new secret once.
      properties:
        enabled:
          default: false
          description: >-
            Whether requests carry `X-Fish-Webhook-Signature` (HMAC-SHA256 over
            `{t}.{body}`, the post-call webhook scheme).
          title: Enabled
          type: boolean
        secret_created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          default: null
          title: Secret Created At
        previous_secret_expires_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          default: null
          description: >-
            Set while the rotated-out secret still signs as a second `v1`; null
            once it expired or was revoked.
          title: Previous Secret Expires At
      title: AgentWebhookToolSigningStatus
      type: object
    PublicAgentToolWarning:
      properties:
        code:
          const: parameters_not_sent
          description: >-
            `parameters_not_sent`: the tool sends a request body but has no
            `body_template`, and these parameters appear in neither `url` nor
            `headers`, so they never reach the endpoint.
          title: Code
          type: string
        parameters:
          description: Names of the parameters the endpoint will not receive.
          items:
            type: string
          title: Parameters
          type: array
        message:
          title: Message
          type: string
      required:
        - code
        - parameters
        - message
      title: PublicAgentToolWarning
      type: object
    AgentWebhookHeaderPayload:
      properties:
        name:
          maxLength: 128
          minLength: 1
          title: Name
          type: string
        value:
          maxLength: 4000
          title: Value
          type: string
        kind:
          default: custom
          enum:
            - custom
            - authorization_bearer
            - authorization_basic
          title: Kind
          type: string
      required:
        - name
        - value
      title: AgentWebhookHeaderPayload
      type: object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.