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

# Save provider tools

> Creates and updates a provider's tools in a single call. An entry with an `id` updates that tool, an entry without one creates it (nothing is deleted — use DELETE /v1/tools/:id). Names are made unique across the whole provider, so the saved name may differ from the one sent; the response lists every saved row so the client can reconcile. Exists because saving a provider one PATCH per tool reloaded the org tool registry and rebuilt dependent agents once per tool — here that happens ONCE, after every row is written. A row that fails is reported in `errors` and does not abort the rest.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/tool-providers/{id}/tools
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/tool-providers/{id}/tools:
    patch:
      tags:
        - Tool providers
      summary: Save provider tools
      description: >-
        Creates and updates a provider's tools in a single call. An entry with
        an `id` updates that tool, an entry without one creates it (nothing is
        deleted — use DELETE /v1/tools/:id). Names are made unique across the
        whole provider, so the saved name may differ from the one sent; the
        response lists every saved row so the client can reconcile. Exists
        because saving a provider one PATCH per tool reloaded the org tool
        registry and rebuilt dependent agents once per tool — here that happens
        ONCE, after every row is written. A row that fails is reported in
        `errors` and does not abort the rest.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            example: 8d3b1a75-6c02-4e59-b84f-27a9d5e10c63
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                tools:
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      name:
                        type: string
                        minLength: 1
                      description:
                        type: string
                        nullable: true
                      method:
                        type: string
                        enum:
                          - GET
                          - POST
                          - PUT
                          - PATCH
                          - DELETE
                      path:
                        type: string
                        minLength: 1
                      input_schema:
                        type: object
                        additionalProperties: {}
                        nullable: true
                      output_schema:
                        type: object
                        additionalProperties: {}
                        nullable: true
                      timeout_ms:
                        type: integer
                        minimum: 1000
                        maximum: 120000
                      is_enabled:
                        type: boolean
                      operation_id:
                        type: string
                      tags:
                        type: array
                        nullable: true
                        items:
                          type: string
                      deprecated:
                        type: boolean
                    additionalProperties: false
                  minItems: 1
                  maxItems: 2000
                  example:
                    - id: c07f2b95-8d41-4e63-a029-5f7b1c8d3e40
                      name: Get customer
                      method: GET
                      path: /customers/{customerId}
              required:
                - tools
              additionalProperties: false
      responses:
        '200':
          description: What was written. A partial save is still a 200 — read `errors`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  tools:
                    type: array
                    description: >-
                      The rows that were written, narrowed to the reconciliation
                      columns — `input_schema` is deliberately not echoed back,
                      since a provider holds hundreds of tools and that response
                      would be tens of megabytes.
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        name:
                          type: string
                        method:
                          type: string
                        path:
                          type: string
                        operation_id:
                          type: string
                          nullable: true
                        is_enabled:
                          type: boolean
                        updated_at:
                          type: string
                          format: date-time
                  errors:
                    type: array
                    description: >-
                      One entry per row that did not apply, indexed into the
                      array you sent.
                    items:
                      type: object
                      properties:
                        index:
                          type: integer
                        id:
                          type: string
                          format: uuid
                          description: Absent for a failed create.
                        error:
                          type: string
                  rebuild:
                    type: object
                    properties:
                      scope:
                        type: string
                        description: >-
                          Which slice of the registry was reloaded: `custom`,
                          `mcp` or `all`.
                      tools:
                        type: object
                        properties:
                          affectedToolIds:
                            type: array
                            items:
                              type: string
                          totalToolIds:
                            type: integer
                            description: Tools in the org after the reload.
                          providerCounts:
                            type: object
                            properties:
                              api:
                                type: integer
                              mcp:
                                type: integer
                              other:
                                type: integer
                          mcpErrors:
                            type: array
                            description: >-
                              MCP providers that failed to connect or list tools
                              during the reload. They contributed ZERO tools —
                              an empty array is the healthy case.
                            items:
                              type: object
                              properties:
                                providerId:
                                  type: string
                                providerName:
                                  type: string
                                error:
                                  type: string
                      rebuilt:
                        type: integer
                        description: Agents rebuilt successfully.
                      failed:
                        type: integer
                        description: Agents that failed to rebuild. Non-zero is a problem.
                      skipped:
                        type: integer
                      agents:
                        type: array
                        items:
                          type: object
                      failedAgents:
                        type: array
                        description: >-
                          Present when `failed` is non-zero: which agents, and
                          why.
                        items:
                          type: object
                          properties:
                            agentVersionId:
                              type: string
                              format: uuid
                            mastraId:
                              type: string
                            error:
                              type: string
                      totalBuildTime:
                        type: integer
                        description: Milliseconds spent rebuilding.
        '400':
          description: Bad request
        '404':
          description: Provider not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````