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

# Update Agent Tool

> Patch a specific tool instance.



## OpenAPI

````yaml https://api.mrassistant.ai/openapi.json patch /agents/{agent_id}/tools/{instance_name}
openapi: 3.1.0
info:
  title: Backend - Multilingual Voice Agent System
  description: FastAPI backend for multilingual voice agents with tool use
  version: 1.0.0
servers: []
security: []
paths:
  /agents/{agent_id}/tools/{instance_name}:
    patch:
      tags:
        - Agent Tools
      summary: Update Agent Tool
      description: Patch a specific tool instance.
      operationId: update_agent_tool_agents__agent_id__tools__instance_name__patch
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Agent Id
        - name: instance_name
          in: path
          required: true
          schema:
            type: string
            title: Instance Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ToolUpdate:
      properties:
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
        instance_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance Name
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        tool_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Type
        config:
          anyOf:
            - $ref: '#/components/schemas/app__controllers__agent_tools__ToolConfig'
            - type: 'null'
        config_patch:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Config Patch
      type: object
      title: ToolUpdate
      description: Schema for updating an existing agent_tool instance (partial).
    ToolResponse:
      properties:
        id:
          type: string
          title: Id
        agent_id:
          type: string
          title: Agent Id
        tool_key:
          type: string
          title: Tool Key
        instance_name:
          type: string
          title: Instance Name
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
        tool_type:
          type: string
          title: Tool Type
        enabled:
          type: boolean
          title: Enabled
        is_active:
          type: boolean
          title: Is Active
        version:
          type: integer
          title: Version
        config:
          additionalProperties: true
          type: object
          title: Config
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        created_at:
          type: string
          format: date-time
          title: Created At
        raw_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Raw Schema
        rpc_method:
          anyOf:
            - type: string
            - type: 'null'
          title: Rpc Method
        parameters_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parameters Schema
        registry_info:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Registry Info
      type: object
      required:
        - id
        - agent_id
        - tool_key
        - instance_name
        - display_name
        - tool_type
        - enabled
        - is_active
        - version
        - config
        - description
        - created_at
      title: ToolResponse
      description: Schema for tool response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    app__controllers__agent_tools__ToolConfig:
      properties:
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        disallow_interruptions:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Disallow Interruptions
          description: >-
            If true, the tool runs uninterrupted. Default: false for read-only,
            true for mutating.
        requires_caller_consent:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Requires Caller Consent
          description: If true, the agent prompts the caller for consent before invoking.
        pii_classification:
          anyOf:
            - type: string
              enum:
                - none
                - low
                - medium
                - high
            - type: 'null'
          title: Pii Classification
          description: Drives logging redaction policy.
        cost_unit:
          anyOf:
            - type: string
            - type: 'null'
          title: Cost Unit
          description: Billing meter slug (e.g. 'lookup', 'sms', 'transfer').
        goodbye_instructions:
          anyOf:
            - type: string
            - type: 'null'
          title: Goodbye Instructions
        goodbye_max_duration_ms:
          anyOf:
            - type: integer
              maximum: 20000
              minimum: 500
            - type: 'null'
          title: Goodbye Max Duration Ms
        delete_room:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Delete Room
        wait_for_playout:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Wait For Playout
        record_end_reason:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Record End Reason
        default_inter_digit_ms:
          anyOf:
            - type: integer
              maximum: 2000
              minimum: 0
            - type: 'null'
          title: Default Inter Digit Ms
        inter_digit_ms:
          anyOf:
            - type: integer
              maximum: 2000
              minimum: 0
            - type: 'null'
          title: Inter Digit Ms
        default_duration_ms:
          anyOf:
            - type: integer
              maximum: 2000
              minimum: 40
            - type: 'null'
          title: Default Duration Ms
        default_volume:
          anyOf:
            - type: number
              maximum: 100
              minimum: 0
            - type: 'null'
          title: Default Volume
        ivr_detection:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Ivr Detection
        allowed_digits:
          anyOf:
            - type: string
            - type: 'null'
          title: Allowed Digits
        max_sequence_length:
          anyOf:
            - type: integer
              maximum: 128
              minimum: 1
            - type: 'null'
          title: Max Sequence Length
        sip_trunk_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Sip Trunk Id
        sip_trunk_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Sip Trunk Address
        sip_headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Sip Headers
        hold_audio_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Hold Audio Url
        hold_audio_loop:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hold Audio Loop
        transfer_briefing_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Transfer Briefing Prompt
        transfer_briefing_voice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Transfer Briefing Voice Id
        transfer_announcement_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Transfer Announcement Prompt
        transfer_announcement:
          anyOf:
            - type: string
            - type: 'null'
          title: Transfer Announcement
        transfer_timeout_s:
          anyOf:
            - type: integer
              maximum: 300
              minimum: 1
            - type: 'null'
          title: Transfer Timeout S
        transfer_max_attempts:
          anyOf:
            - type: integer
              maximum: 10
              minimum: 1
            - type: 'null'
          title: Transfer Max Attempts
        fallback_target_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Fallback Target Name
        take_message_on_failure:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Take Message On Failure
        target_directory:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Target Directory
        target_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Number
        targets:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Targets
        play_dialtone:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Play Dialtone
        cold_transfer_announcement_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Cold Transfer Announcement Prompt
        specialists:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Specialists
        prefer_warm:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Prefer Warm
        handoff_announcement_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: Handoff Announcement Prompt
        preserve_chat_ctx:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Preserve Chat Ctx
        chat_ctx_token_cap:
          anyOf:
            - type: integer
              maximum: 64000
              minimum: 256
            - type: 'null'
          title: Chat Ctx Token Cap
        auth_mode:
          anyOf:
            - type: string
              enum:
                - service_account
                - oauth_user
                - bearer
                - basic
                - api_key_header
                - mtls
                - none
                - hmac_signed
            - type: 'null'
          title: Auth Mode
        service_account_email:
          anyOf:
            - type: string
            - type: 'null'
          title: Service Account Email
        oauth_refresh_token_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Oauth Refresh Token Ref
        default_spreadsheet_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Spreadsheet Id
        allowed_spreadsheet_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Spreadsheet Ids
        max_rows_per_read:
          anyOf:
            - type: integer
              maximum: 10000
              minimum: 1
            - type: 'null'
          title: Max Rows Per Read
        max_rows_per_write:
          anyOf:
            - type: integer
              maximum: 5000
              minimum: 1
            - type: 'null'
          title: Max Rows Per Write
        result_summarization:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Result Summarization
        spreadsheet_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Spreadsheet Id
        sheet_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Sheet Name
        credentials_json:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Credentials Json
        column_mapping:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Column Mapping
        data_source_type:
          anyOf:
            - type: string
              enum:
                - rest_api
                - graphql
                - sql_readonly
                - vector_search
            - type: 'null'
          title: Data Source Type
        data_source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Data Source Url
        auth_secret_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Auth Secret Ref
        query_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Query Template
        allowed_filters:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Filters
        default_limit:
          anyOf:
            - type: integer
              maximum: 500
              minimum: 1
            - type: 'null'
          title: Default Limit
        max_limit:
          anyOf:
            - type: integer
              maximum: 1000
              minimum: 1
            - type: 'null'
          title: Max Limit
        pii_redaction:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Pii Redaction
        cache_ttl_s:
          anyOf:
            - type: integer
              maximum: 86400
              minimum: 0
            - type: 'null'
          title: Cache Ttl S
        top_k_default:
          anyOf:
            - type: integer
              maximum: 20
              minimum: 1
            - type: 'null'
          title: Top K Default
        similarity_threshold:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Similarity Threshold
        knowledge_namespace:
          anyOf:
            - type: string
            - type: 'null'
          title: Knowledge Namespace
        provider:
          anyOf:
            - type: string
              enum:
                - twilio
                - infobip
                - telnyx
                - messagebird
                - aws_sns
            - type: 'null'
          title: Provider
        account_sid_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Account Sid Ref
        auth_token_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Auth Token Ref
        from_e164:
          anyOf:
            - type: string
            - type: 'null'
          title: From E164
        default_from:
          anyOf:
            - type: string
            - type: 'null'
          title: Default From
        allowed_destination_country_codes:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Destination Country Codes
        allow_send_to_caller_only:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Allow Send To Caller Only
        max_message_length:
          anyOf:
            - type: integer
              maximum: 2000
              minimum: 1
            - type: 'null'
          title: Max Message Length
        template_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Template Id
        template:
          anyOf:
            - type: string
            - type: 'null'
          title: Template
        daily_quota_per_number:
          anyOf:
            - type: integer
              maximum: 1000
              minimum: 0
            - type: 'null'
          title: Daily Quota Per Number
        require_explicit_consent:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Require Explicit Consent
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
        url_allowlist:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Url Allowlist
        default_method:
          anyOf:
            - type: string
              enum:
                - GET
                - POST
                - PUT
                - PATCH
                - DELETE
            - type: 'null'
          title: Default Method
        allowed_methods:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Allowed Methods
        default_headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Default Headers
        method:
          anyOf:
            - type: string
            - type: 'null'
          title: Method
        headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Headers
        auth:
          anyOf:
            - $ref: '#/components/schemas/HttpWebhookAuthConfig'
            - type: 'null'
        signing_secret_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Signing Secret Ref
        timeout_s:
          anyOf:
            - type: integer
              maximum: 120
              minimum: 1
            - type: 'null'
          title: Timeout S
        timeout_seconds:
          anyOf:
            - type: integer
              maximum: 120
              minimum: 1
            - type: 'null'
          title: Timeout Seconds
        max_retries:
          anyOf:
            - type: integer
              maximum: 10
              minimum: 0
            - type: 'null'
          title: Max Retries
        max_body_bytes:
          anyOf:
            - type: integer
              maximum: 10000000
              minimum: 128
            - type: 'null'
          title: Max Body Bytes
        redact_response_pii:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Redact Response Pii
        body_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Body Template
        retry_policy:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Retry Policy
        response_format:
          anyOf:
            - type: string
              enum:
                - json
                - text
            - type: 'null'
          title: Response Format
        simulate_latency_ms:
          anyOf:
            - type: integer
              maximum: 30000
              minimum: 0
            - type: 'null'
          title: Simulate Latency Ms
        simulate_error_rate:
          anyOf:
            - type: number
              maximum: 1
              minimum: 0
            - type: 'null'
          title: Simulate Error Rate
        expected_inputs:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Expected Inputs
        canned_response:
          anyOf:
            - type: string
            - type: 'null'
          title: Canned Response
        response_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Response Template
        latency_ms:
          anyOf:
            - type: integer
              maximum: 30000
              minimum: 0
            - type: 'null'
          title: Latency Ms
        handler_kind:
          anyOf:
            - type: string
              enum:
                - local_python
                - mcp_server_tool
                - http_webhook_passthrough
            - type: 'null'
          title: Handler Kind
        handler_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Handler Ref
        raw_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Raw Schema
        parameters_schema:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Parameters Schema
        execution_endpoint:
          anyOf:
            - type: string
            - type: 'null'
          title: Execution Endpoint
        python_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Python Code
        rpc_method:
          anyOf:
            - type: string
            - type: 'null'
          title: Rpc Method
        mcp_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Mcp Url
        mcp_allowlist:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Mcp Allowlist
        bearer_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Bearer Token
        extra_headers:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Extra Headers
        is_end_call:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is End Call
        is_transfer:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Transfer
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
        auth_config:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Auth Config
      additionalProperties: true
      type: object
      title: ToolConfig
      description: >-
        Aggregate config for a tool instance — full v2 Field Reference superset.


        Frontend may submit any subset of these fields. Whatever is non-None is

        persisted into the agent_tool.config JSON blob. The runtime reads only
        the

        fields relevant to the resolved tool_type.


        Section numbers below cite mr-assistant-tools-field-reference v2.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HttpWebhookAuthConfig:
      properties:
        type:
          anyOf:
            - type: string
              enum:
                - none
                - bearer
                - basic
                - api_key
            - type: 'null'
          title: Type
          default: none
        token:
          anyOf:
            - type: string
            - type: 'null'
          title: Token
        username:
          anyOf:
            - type: string
            - type: 'null'
          title: Username
        password:
          anyOf:
            - type: string
            - type: 'null'
          title: Password
        api_key_header:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key Header
          default: X-API-Key
        api_key_value:
          anyOf:
            - type: string
            - type: 'null'
          title: Api Key Value
      type: object
      title: HttpWebhookAuthConfig
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````