> ## 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.

# Update tool provider

> Updates provider fields. Send `auth_secret` to rotate stored credentials. Reloads the org tools and rebuilds dependent agents.



## OpenAPI

````yaml /api-reference/openapi.json patch /v1/tool-providers/{id}
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}:
    patch:
      tags:
        - Tool providers
      summary: Update tool provider
      description: >-
        Updates provider fields. Send `auth_secret` to rotate stored
        credentials. Reloads the org tools and rebuilds dependent agents.
      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:
                name:
                  type: string
                  minLength: 1
                  example: Acme CRM
                base_url:
                  type: string
                  format: uri
                  example: https://api.acme.example
                description:
                  type: string
                  nullable: true
                  example: Customer records
                auth_type:
                  type: string
                  enum:
                    - basic
                    - bearer
                    - api-key
                    - oauth2
                    - custom
                  nullable: true
                auth_config:
                  type: object
                  additionalProperties: {}
                  nullable: true
                  example:
                    header: Authorization
                    scheme: Bearer
                default_headers:
                  type: object
                  additionalProperties:
                    type: string
                  nullable: true
                  example:
                    X-Acme-Version: '2026-01-01'
                runtime_auth:
                  type: boolean
                  example: false
                timeout_ms:
                  type: integer
                  minimum: 1000
                  maximum: 30000
                  example: 30000
                mcp_transport:
                  type: string
                  enum:
                    - streamable_http
                    - sse
                  nullable: true
                auth_secret:
                  type: object
                  additionalProperties: {}
                  example:
                    token: the API key to store in the vault
              additionalProperties: false
      responses:
        '200':
          description: The updated provider, and the rebuild that followed
          content:
            application/json:
              schema:
                type: object
                properties:
                  provider:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      org_id:
                        type: string
                        format: uuid
                      name:
                        type: string
                      type:
                        type: string
                        enum:
                          - api
                          - mcp
                          - sidenet
                      description:
                        type: string
                        nullable: true
                      base_url:
                        type: string
                        nullable: true
                      auth_type:
                        type: string
                        nullable: true
                      auth_config:
                        type: object
                        nullable: true
                        description: >-
                          Non-sensitive auth settings only. Credentials are
                          redacted out of this.
                      has_vault_secret:
                        type: boolean
                        description: >-
                          A credential is stored. The value itself is never
                          returned.
                      runtime_auth:
                        type: boolean
                      mcp_transport:
                        type: string
                        nullable: true
                      created_at:
                        type: string
                        format: date-time
                      updated_at:
                        type: string
                        format: date-time
                  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.
                  warning:
                    type: string
                    description: >-
                      Present only when an MCP provider was saved but its tools
                      failed to load. The row IS persisted — it just has zero
                      tools until the config is fixed.
        '400':
          description: Bad request
        '404':
          description: Not found
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.

````