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

# Upsert a tool's overlay

> Merge-patch the overlay row for ``tool_name`` (create it if absent). ``patch``
holds ONLY the fields the caller sent; each is applied over the current row (or
the empty defaults when none exists), absent fields unchanged. A blank
``display_name`` is refused; a present-null clears; a present ``tags`` array
replaces the set. An unknown ``folder_id`` is a loud 400.



## OpenAPI

````yaml /openapi.json patch /api/tool-meta/tools/{tool_name}
openapi: 3.1.0
info:
  description: The operator HTTP surface served under /api/*.
  title: tai42-skeleton API
  version: 0.3.0
servers: []
security: []
paths:
  /api/tool-meta/tools/{tool_name}:
    patch:
      tags:
        - tool_meta
      summary: Upsert a tool's overlay
      description: >-
        Merge-patch the overlay row for ``tool_name`` (create it if absent).
        ``patch``

        holds ONLY the fields the caller sent; each is applied over the current
        row (or

        the empty defaults when none exists), absent fields unchanged. A blank

        ``display_name`` is refused; a present-null clears; a present ``tags``
        array

        replaces the set. An unknown ``folder_id`` is a loud 400.
      operationId: patch_api_tool_meta_tools_tool_name
      parameters:
        - in: path
          name: tool_name
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ToolMetaUpsert'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data: {}
                required:
                  - data
                type: object
          description: Success.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Malformed request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid api key.
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ToolMetaUpsert:
      description: >-
        A merge-patch overlay edit. Only the fields PRESENT in the request are

        written; a present-null clears (``hidden: null`` writes the tri-state
        defer

        state); a present ``tags`` array replaces the whole set. Absent fields
        are

        unchanged — there is no full-row replace.
      properties:
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Display Name
        folder_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Folder Id
        hidden:
          anyOf:
            - type: boolean
            - type: 'null'
          default: null
          title: Hidden
        tags:
          default: []
          items:
            type: string
          title: Tags
          type: array
      title: ToolMetaUpsert
      type: object
    Error:
      properties:
        error:
          type: string
      required:
        - error
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-api-key
      type: apiKey

````