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

# Update a tool

> Updates a tool's information (partial updates supported).



## OpenAPI

````yaml https://api-trial.cognigy.ai/swagger/openapi.json patch /tools/{id}
openapi: 3.0.3
info:
  contact:
    email: support@example.com
    name: API Support
  description: API for managing agents and related resources
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://swagger.io/terms/
  title: Agents API
  version: '1.0'
servers:
  - url: https://api-trial.cognigy.ai/v1
security:
  - ApiKey: []
tags:
  - name: Agents
  - name: Brand personas
  - name: Tools
  - name: Built-in tools
  - name: Skills
  - name: Built-in skills
  - name: MCP servers
  - name: Tool references
paths:
  /tools/{id}:
    patch:
      tags:
        - Tools
      summary: Update a tool
      description: Updates a tool's information (partial updates supported).
      parameters:
        - description: The unique identifier for the tool.
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_tools.UpdateToolRequest'
        description: Tool update data
        required: true
        x-originalParamName: tool
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_tools.UpdateToolResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailBadRequest
          description: Invalid request body or validation error
        '403':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailForbidden
          description: Access denied
        '404':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailNotFound
          description: Tool not found
        '409':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailConflict
          description: A tool with this name already exists in this project
        '500':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailInternalError
          description: Internal server error
components:
  schemas:
    internal_tools.UpdateToolRequest:
      properties:
        description:
          example: An updated tool description
          type: string
        extension:
          example: my-extension
          type: string
        name:
          example: Updated Tool
          type: string
        parameters:
          items:
            $ref: '#/components/schemas/internal_tools.ToolParameterRequest'
          type: array
        source:
          example: extension
          type: string
        type:
          example: action
          type: string
      type: object
    internal_tools.UpdateToolResponse:
      properties:
        builtinSlug:
          example: my-tool-slug
          type: string
        createdAt:
          example: 1694518620
          type: integer
        createdBy:
          example: ^[a-z0-9]{24}$
          type: string
        description:
          example: An updated tool description
          type: string
        extension:
          example: my-extension
          type: string
        id:
          example: ^[a-z0-9]{24}$
          type: string
        lastChangedAt:
          example: 1694518620
          type: integer
        lastChangedBy:
          example: ^[a-z0-9]{24}$
          type: string
        mcp:
          allOf:
            - $ref: '#/components/schemas/internal_tools.MCPBindingResponse'
          description: >-
            MCP is present only for source "mcp". Single-resource shape — the
            server,

            the remote tool and its input schema.
        name:
          example: Updated Tool
          type: string
        organisationId:
          example: ^[a-z0-9]{24}$
          type: string
        parameters:
          items:
            $ref: '#/components/schemas/internal_tools.ToolParameterResponse'
          type: array
        projectId:
          example: ^[a-z0-9]{24}$
          type: string
        referenceId:
          example: 550e8400-e29b-41d4-a716-446655440000
          type: string
        source:
          example: extension
          type: string
        type:
          example: action
          type: string
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailBadRequest:
      properties:
        detail:
          example: request body validation failed
          type: string
        errors:
          items:
            $ref: >-
              #/components/schemas/github_com_cognigy_ai-agents-v2_internal_middleware.FieldError
          type: array
        instance:
          example: /v1/{resource}
          type: string
        status:
          example: 400
          type: integer
        title:
          example: Bad Request
          type: string
        traceId:
          example: api--a4d2f126-bec4-4544-a049-7c0cf08524ed
          type: string
        type:
          example: about:blank
          type: string
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailForbidden:
      properties:
        detail:
          example: 'access denied: insufficient permissions'
          type: string
        instance:
          example: /v1/{resource}/{id}
          type: string
        status:
          example: 403
          type: integer
        title:
          example: Forbidden
          type: string
        traceId:
          example: api--a4d2f126-bec4-4544-a049-7c0cf08524ed
          type: string
        type:
          example: about:blank
          type: string
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailNotFound:
      properties:
        detail:
          example: the requested resource does not exist
          type: string
        instance:
          example: /v1/{resource}/{id}
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not Found
          type: string
        traceId:
          example: api--a4d2f126-bec4-4544-a049-7c0cf08524ed
          type: string
        type:
          example: about:blank
          type: string
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailConflict:
      properties:
        detail:
          example: a resource with this identifier already exists
          type: string
        instance:
          example: /v1/{resource}
          type: string
        status:
          example: 409
          type: integer
        title:
          example: Conflict
          type: string
        traceId:
          example: api--a4d2f126-bec4-4544-a049-7c0cf08524ed
          type: string
        type:
          example: about:blank
          type: string
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.ProblemDetailInternalError:
      properties:
        detail:
          example: internal server error
          type: string
        instance:
          example: /v1/{resource}
          type: string
        status:
          example: 500
          type: integer
        title:
          example: Internal Server Error
          type: string
        traceId:
          example: api--a4d2f126-bec4-4544-a049-7c0cf08524ed
          type: string
        type:
          example: about:blank
          type: string
      type: object
    internal_tools.ToolParameterRequest:
      properties:
        connectionTypes:
          description: |-
            ConnectionTypes is the allow-list of connection schema type slugs
            accepted by this parameter. Only valid when type is "connection" —
            a non-empty value on any other parameter type is rejected with 400.
            An empty (or omitted) list on a connection parameter means "accept
            any connection type".
          example:
            - http_basic
            - http_oauth2
          items:
            type: string
          type: array
        description:
          example: The input parameter
          type: string
        key:
          example: input
          type: string
        mode:
          example: dynamic
          type: string
        name:
          example: input
          type: string
        type:
          example: string
          type: string
        value: {}
      required:
        - key
        - mode
        - name
        - type
      type: object
    internal_tools.MCPBindingResponse:
      properties:
        inputSchema:
          additionalProperties: {}
          description: >-
            InputSchema is the remote tool's JSON Schema, verbatim. Free of

            references — the write-time gate refuses $ref, $dynamicRef,

            $recursiveRef, $defs and definitions anywhere in the tree — so a
            renderer

            has nothing to resolve. It MAY contain oneOf/allOf/anyOf/not: those

            survive forwarding intact and are no longer refused, so a renderer
            has to

            handle polymorphic unions. Property ORDER is not recoverable, so a
            view

            must impose its own (alphabetical, or required-first).
          type: object
        serverReferenceId:
          example: 550e8400-e29b-41d4-a716-446655440000
          type: string
        toolName:
          example: search_issues
          type: string
      type: object
    internal_tools.ToolParameterResponse:
      properties:
        connectionTypes:
          example:
            - http_basic
            - http_oauth2
          items:
            type: string
          type: array
        description:
          example: The input parameter
          type: string
        key:
          example: input
          type: string
        mode:
          example: dynamic
          type: string
        name:
          example: input
          type: string
        type:
          example: string
          type: string
        value: {}
      type: object
    github_com_cognigy_ai-agents-v2_internal_middleware.FieldError:
      properties:
        field:
          type: string
        message:
          type: string
      type: object
  securitySchemes:
    ApiKey:
      description: '[Production] API key for production authentication'
      in: header
      name: X-API-Key
      type: apiKey

````