Skip to content
Get started

Update a tool set

client.ToolSets.Update(ctx, workspaceID, id, body) (*ToolSet, error)
PUT/v1/workspaces/{workspaceId}/tool_sets/{id}

Updates a tool set in the workspace

ParametersExpand Collapse
workspaceID string
id string
body ToolSetUpdateParams
Metadata param.Field[UpdateResourceMetadata]Optional

UpdateResourceMetadata contains the user-provided fields for updating a workspace-scoped resource. Read-only fields (id, account_id, workspace_id, profile_id, created_at) are excluded since they are set by the server.

Spec param.Field[ToolSetSpec]Optional
UpdateMask param.Field[string]Optional
ReturnsExpand Collapse
type ToolSet struct{…}

Standard metadata for persistent, named resources (e.g., agents, tools, prompts)

ID string

Unique identifier for the resource (prefixed ULID, e.g., “agent_01HXK…”)

AccountID string

Account this resource belongs to for multi-tenant isolation (prefixed ULID)

CreatedAt Time

Timestamp when this resource was created

formatdate-time
Name string

Human-readable name for the resource (e.g., “Customer Support Agent”, “Email Tool”) Required for resources that users interact with directly

ProfileID string

ID of the actor (user or service account) that created this resource

WorkspaceID string

Workspace this resource belongs to for organizational grouping (prefixed ULID)

BundleKey stringOptional

Optional bundle ownership key. When set, indicates the resource is managed by a configuration bundle identified by this key. Used by BulkWorkspaceResources.Apply to track which resources belong to which bundle for reconciliation / soft-delete on re-apply.

ExternalID stringOptional

External ID for the resource (e.g., a workflow ID from an external system)

Labels map[string, string]Optional

Arbitrary key-value pairs for categorization and filtering Examples: {“environment”: “production”, “team”: “platform”, “version”: “v2”}

Adapter ToolSetAdapterOptional
HTTP ToolSetAdapterHTTPOptional
BaseURL stringOptional
Headers map[string, string]Optional
Mcp ToolSetAdapterMcpOptional
ExcludeTools ToolFilterOptional

Top-level filter with simple boolean logic (no nesting)

Operator ToolFilterOperator
formatenum
One of the following:
const ToolFilterOperatorOperatorUnspecified ToolFilterOperator = "OPERATOR_UNSPECIFIED"
const ToolFilterOperatorOperatorAnd ToolFilterOperator = "OPERATOR_AND"
const ToolFilterOperatorOperatorOr ToolFilterOperator = "OPERATOR_OR"
Filters []AttributeFilterOptional
Attribute AttributeFilterAttribute
formatenum
One of the following:
const AttributeFilterAttributeAttributeUnspecified AttributeFilterAttribute = "ATTRIBUTE_UNSPECIFIED"
const AttributeFilterAttributeAttributeName AttributeFilterAttribute = "ATTRIBUTE_NAME"
const AttributeFilterAttributeAttributeTitle AttributeFilterAttribute = "ATTRIBUTE_TITLE"
const AttributeFilterAttributeAttributeDescription AttributeFilterAttribute = "ATTRIBUTE_DESCRIPTION"
Matcher StringMatcherOptional

String matching operations

CaseSensitive boolOptional
Contains stringOptional
EndsWith stringOptional
Exact stringOptional
Regex stringOptional
StartsWith stringOptional
Headers map[string, string]Optional
IncludeTools ToolFilterOptional

Top-level filter with simple boolean logic (no nesting)

Operator ToolFilterOperator
formatenum
One of the following:
const ToolFilterOperatorOperatorUnspecified ToolFilterOperator = "OPERATOR_UNSPECIFIED"
const ToolFilterOperatorOperatorAnd ToolFilterOperator = "OPERATOR_AND"
const ToolFilterOperatorOperatorOr ToolFilterOperator = "OPERATOR_OR"
Filters []AttributeFilterOptional
Attribute AttributeFilterAttribute
formatenum
One of the following:
const AttributeFilterAttributeAttributeUnspecified AttributeFilterAttribute = "ATTRIBUTE_UNSPECIFIED"
const AttributeFilterAttributeAttributeName AttributeFilterAttribute = "ATTRIBUTE_NAME"
const AttributeFilterAttributeAttributeTitle AttributeFilterAttribute = "ATTRIBUTE_TITLE"
const AttributeFilterAttributeAttributeDescription AttributeFilterAttribute = "ATTRIBUTE_DESCRIPTION"
Matcher StringMatcherOptional

String matching operations

CaseSensitive boolOptional
Contains stringOptional
EndsWith stringOptional
Exact stringOptional
Regex stringOptional
StartsWith stringOptional
ToolApprovals ApprovalRequirementFilterOptional

Approval filters that will automatically set the approval requirement on tools synced from an external source

Always boolOptional
Only ToolFilterOptional

Top-level filter with simple boolean logic (no nesting)

Operator ToolFilterOperator
formatenum
One of the following:
const ToolFilterOperatorOperatorUnspecified ToolFilterOperator = "OPERATOR_UNSPECIFIED"
const ToolFilterOperatorOperatorAnd ToolFilterOperator = "OPERATOR_AND"
const ToolFilterOperatorOperatorOr ToolFilterOperator = "OPERATOR_OR"
Filters []AttributeFilterOptional
Attribute AttributeFilterAttribute
formatenum
One of the following:
const AttributeFilterAttributeAttributeUnspecified AttributeFilterAttribute = "ATTRIBUTE_UNSPECIFIED"
const AttributeFilterAttributeAttributeName AttributeFilterAttribute = "ATTRIBUTE_NAME"
const AttributeFilterAttributeAttributeTitle AttributeFilterAttribute = "ATTRIBUTE_TITLE"
const AttributeFilterAttributeAttributeDescription AttributeFilterAttribute = "ATTRIBUTE_DESCRIPTION"
Matcher StringMatcherOptional

String matching operations

CaseSensitive boolOptional
Contains stringOptional
EndsWith stringOptional
Exact stringOptional
Regex stringOptional
StartsWith stringOptional
URL stringOptional
OpenAPI ToolSetAdapterOpenAPIOptional
BaseURL stringOptional

Base URL for dispatching tool calls. If set, overrides the server resolved from the spec’s servers array.

ExcludeTools ToolFilterOptional

Top-level filter with simple boolean logic (no nesting)

Operator ToolFilterOperator
formatenum
One of the following:
const ToolFilterOperatorOperatorUnspecified ToolFilterOperator = "OPERATOR_UNSPECIFIED"
const ToolFilterOperatorOperatorAnd ToolFilterOperator = "OPERATOR_AND"
const ToolFilterOperatorOperatorOr ToolFilterOperator = "OPERATOR_OR"
Filters []AttributeFilterOptional
Attribute AttributeFilterAttribute
formatenum
One of the following:
const AttributeFilterAttributeAttributeUnspecified AttributeFilterAttribute = "ATTRIBUTE_UNSPECIFIED"
const AttributeFilterAttributeAttributeName AttributeFilterAttribute = "ATTRIBUTE_NAME"
const AttributeFilterAttributeAttributeTitle AttributeFilterAttribute = "ATTRIBUTE_TITLE"
const AttributeFilterAttributeAttributeDescription AttributeFilterAttribute = "ATTRIBUTE_DESCRIPTION"
Matcher StringMatcherOptional

String matching operations

CaseSensitive boolOptional
Contains stringOptional
EndsWith stringOptional
Exact stringOptional
Regex stringOptional
StartsWith stringOptional
Headers map[string, string]Optional

Headers sent when fetching the spec from a URL and when dispatching tool calls.

IncludeTools ToolFilterOptional

Top-level filter with simple boolean logic (no nesting)

Operator ToolFilterOperator
formatenum
One of the following:
const ToolFilterOperatorOperatorUnspecified ToolFilterOperator = "OPERATOR_UNSPECIFIED"
const ToolFilterOperatorOperatorAnd ToolFilterOperator = "OPERATOR_AND"
const ToolFilterOperatorOperatorOr ToolFilterOperator = "OPERATOR_OR"
Filters []AttributeFilterOptional
Attribute AttributeFilterAttribute
formatenum
One of the following:
const AttributeFilterAttributeAttributeUnspecified AttributeFilterAttribute = "ATTRIBUTE_UNSPECIFIED"
const AttributeFilterAttributeAttributeName AttributeFilterAttribute = "ATTRIBUTE_NAME"
const AttributeFilterAttributeAttributeTitle AttributeFilterAttribute = "ATTRIBUTE_TITLE"
const AttributeFilterAttributeAttributeDescription AttributeFilterAttribute = "ATTRIBUTE_DESCRIPTION"
Matcher StringMatcherOptional

String matching operations

CaseSensitive boolOptional
Contains stringOptional
EndsWith stringOptional
Exact stringOptional
Regex stringOptional
StartsWith stringOptional
ServerName stringOptional

Name of the server entry in the spec’s servers array (OpenAPI 3.2 server.name field). Used to select which server URL to dispatch to when base_url is not set. If unset, the first server is used. Ignored when base_url is set.

ToolApprovals ApprovalRequirementFilterOptional

Approval filters that will automatically set the approval requirement on tools synced from an external source

Always boolOptional
Only ToolFilterOptional

Top-level filter with simple boolean logic (no nesting)

Operator ToolFilterOperator
formatenum
One of the following:
const ToolFilterOperatorOperatorUnspecified ToolFilterOperator = "OPERATOR_UNSPECIFIED"
const ToolFilterOperatorOperatorAnd ToolFilterOperator = "OPERATOR_AND"
const ToolFilterOperatorOperatorOr ToolFilterOperator = "OPERATOR_OR"
Filters []AttributeFilterOptional
Attribute AttributeFilterAttribute
formatenum
One of the following:
const AttributeFilterAttributeAttributeUnspecified AttributeFilterAttribute = "ATTRIBUTE_UNSPECIFIED"
const AttributeFilterAttributeAttributeName AttributeFilterAttribute = "ATTRIBUTE_NAME"
const AttributeFilterAttributeAttributeTitle AttributeFilterAttribute = "ATTRIBUTE_TITLE"
const AttributeFilterAttributeAttributeDescription AttributeFilterAttribute = "ATTRIBUTE_DESCRIPTION"
Matcher StringMatcherOptional

String matching operations

CaseSensitive boolOptional
Contains stringOptional
EndsWith stringOptional
Exact stringOptional
Regex stringOptional
StartsWith stringOptional
UploadID stringOptional

ID of a COMPLETE Upload containing the OpenAPI spec document.

URL stringOptional

URL to fetch the OpenAPI spec from. Synced automatically every hour.

Description stringOptional
Info ToolSetInfoOptional

Tool set information

AgentCount int64Optional
CreatedBy ProfileOptional

A profile identifies a user or non-human principal (such as an API key) at the account level. Profiles are account-scoped and can be granted access to multiple workspaces.

AccountResourceMetadata is used to represent a resource that is associated to an account but not to a workspace.

ID string

Unique identifier for the resource (prefixed ULID, e.g., “apikey_01HXK…”)

AccountID string

Account this resource belongs to for multi-tenant isolation (prefixed ULID)

Name string

Human-readable name for the resource (e.g., “Customer Support Agent”, “Email Tool”) Required for resources that users interact with directly

ProfileID string
ExternalID stringOptional

External ID for the resource (e.g., a workflow ID from an external system)

Labels map[string, string]Optional

Arbitrary key-value pairs for categorization and filtering Examples: {“environment”: “production”, “team”: “platform”, “version”: “v2”}

Configuration for a profile.

Type ProfileSpecType

Whether this profile represents a human user, an API key, or a system principal.

formatenum
One of the following:
const ProfileSpecTypeProfileTypeUnspecified ProfileSpecType = "PROFILE_TYPE_UNSPECIFIED"
const ProfileSpecTypeProfileTypeUser ProfileSpecType = "PROFILE_TYPE_USER"
const ProfileSpecTypeProfileTypeAPIKey ProfileSpecType = "PROFILE_TYPE_API_KEY"
const ProfileSpecTypeProfileTypeSystem ProfileSpecType = "PROFILE_TYPE_SYSTEM"
Email stringOptional

Email address of the profile. Required and unique within an account for user profiles.

Name stringOptional

Display name (e.g., “Bobby Tables”).

LastSync TimeOptional
ToolCount int64Optional

Update a tool set

package main

import (
  "context"
  "fmt"

  "github.com/cadenya/cadenya-go"
  "github.com/cadenya/cadenya-go/option"
)

func main() {
  client := cadenya.NewClient(
    option.WithAPIKey("My API Key"),
  )
  toolSet, err := client.ToolSets.Update(
    context.TODO(),
    "workspaceId",
    "id",
    cadenya.ToolSetUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", toolSet.Metadata)
}
{
  "metadata": {
    "id": "id",
    "accountId": "accountId",
    "createdAt": "2019-12-27T18:11:19.117Z",
    "name": "name",
    "profileId": "profileId",
    "workspaceId": "workspaceId",
    "bundleKey": "bundleKey",
    "externalId": "externalId",
    "labels": {
      "foo": "string"
    }
  },
  "spec": {
    "adapter": {
      "http": {
        "baseUrl": "baseUrl",
        "headers": {
          "foo": "string"
        }
      },
      "mcp": {
        "excludeTools": {
          "operator": "OPERATOR_UNSPECIFIED",
          "filters": [
            {
              "attribute": "ATTRIBUTE_UNSPECIFIED",
              "matcher": {
                "caseSensitive": true,
                "contains": "contains",
                "endsWith": "endsWith",
                "exact": "exact",
                "regex": "regex",
                "startsWith": "startsWith"
              }
            }
          ]
        },
        "headers": {
          "foo": "string"
        },
        "includeTools": {
          "operator": "OPERATOR_UNSPECIFIED",
          "filters": [
            {
              "attribute": "ATTRIBUTE_UNSPECIFIED",
              "matcher": {
                "caseSensitive": true,
                "contains": "contains",
                "endsWith": "endsWith",
                "exact": "exact",
                "regex": "regex",
                "startsWith": "startsWith"
              }
            }
          ]
        },
        "toolApprovals": {
          "always": true,
          "only": {
            "operator": "OPERATOR_UNSPECIFIED",
            "filters": [
              {
                "attribute": "ATTRIBUTE_UNSPECIFIED",
                "matcher": {
                  "caseSensitive": true,
                  "contains": "contains",
                  "endsWith": "endsWith",
                  "exact": "exact",
                  "regex": "regex",
                  "startsWith": "startsWith"
                }
              }
            ]
          }
        },
        "url": "url"
      },
      "openapi": {
        "baseUrl": "baseUrl",
        "excludeTools": {
          "operator": "OPERATOR_UNSPECIFIED",
          "filters": [
            {
              "attribute": "ATTRIBUTE_UNSPECIFIED",
              "matcher": {
                "caseSensitive": true,
                "contains": "contains",
                "endsWith": "endsWith",
                "exact": "exact",
                "regex": "regex",
                "startsWith": "startsWith"
              }
            }
          ]
        },
        "headers": {
          "foo": "string"
        },
        "includeTools": {
          "operator": "OPERATOR_UNSPECIFIED",
          "filters": [
            {
              "attribute": "ATTRIBUTE_UNSPECIFIED",
              "matcher": {
                "caseSensitive": true,
                "contains": "contains",
                "endsWith": "endsWith",
                "exact": "exact",
                "regex": "regex",
                "startsWith": "startsWith"
              }
            }
          ]
        },
        "serverName": "serverName",
        "toolApprovals": {
          "always": true,
          "only": {
            "operator": "OPERATOR_UNSPECIFIED",
            "filters": [
              {
                "attribute": "ATTRIBUTE_UNSPECIFIED",
                "matcher": {
                  "caseSensitive": true,
                  "contains": "contains",
                  "endsWith": "endsWith",
                  "exact": "exact",
                  "regex": "regex",
                  "startsWith": "startsWith"
                }
              }
            ]
          }
        },
        "uploadId": "uploadId",
        "url": "url"
      }
    },
    "description": "description"
  },
  "info": {
    "agentCount": 0,
    "createdBy": {
      "metadata": {
        "id": "id",
        "accountId": "accountId",
        "name": "name",
        "profileId": "profileId",
        "externalId": "externalId",
        "labels": {
          "foo": "string"
        }
      },
      "spec": {
        "type": "PROFILE_TYPE_UNSPECIFIED",
        "email": "email",
        "name": "name"
      }
    },
    "lastSync": "2019-12-27T18:11:19.117Z",
    "toolCount": 0
  }
}
Returns Examples
{
  "metadata": {
    "id": "id",
    "accountId": "accountId",
    "createdAt": "2019-12-27T18:11:19.117Z",
    "name": "name",
    "profileId": "profileId",
    "workspaceId": "workspaceId",
    "bundleKey": "bundleKey",
    "externalId": "externalId",
    "labels": {
      "foo": "string"
    }
  },
  "spec": {
    "adapter": {
      "http": {
        "baseUrl": "baseUrl",
        "headers": {
          "foo": "string"
        }
      },
      "mcp": {
        "excludeTools": {
          "operator": "OPERATOR_UNSPECIFIED",
          "filters": [
            {
              "attribute": "ATTRIBUTE_UNSPECIFIED",
              "matcher": {
                "caseSensitive": true,
                "contains": "contains",
                "endsWith": "endsWith",
                "exact": "exact",
                "regex": "regex",
                "startsWith": "startsWith"
              }
            }
          ]
        },
        "headers": {
          "foo": "string"
        },
        "includeTools": {
          "operator": "OPERATOR_UNSPECIFIED",
          "filters": [
            {
              "attribute": "ATTRIBUTE_UNSPECIFIED",
              "matcher": {
                "caseSensitive": true,
                "contains": "contains",
                "endsWith": "endsWith",
                "exact": "exact",
                "regex": "regex",
                "startsWith": "startsWith"
              }
            }
          ]
        },
        "toolApprovals": {
          "always": true,
          "only": {
            "operator": "OPERATOR_UNSPECIFIED",
            "filters": [
              {
                "attribute": "ATTRIBUTE_UNSPECIFIED",
                "matcher": {
                  "caseSensitive": true,
                  "contains": "contains",
                  "endsWith": "endsWith",
                  "exact": "exact",
                  "regex": "regex",
                  "startsWith": "startsWith"
                }
              }
            ]
          }
        },
        "url": "url"
      },
      "openapi": {
        "baseUrl": "baseUrl",
        "excludeTools": {
          "operator": "OPERATOR_UNSPECIFIED",
          "filters": [
            {
              "attribute": "ATTRIBUTE_UNSPECIFIED",
              "matcher": {
                "caseSensitive": true,
                "contains": "contains",
                "endsWith": "endsWith",
                "exact": "exact",
                "regex": "regex",
                "startsWith": "startsWith"
              }
            }
          ]
        },
        "headers": {
          "foo": "string"
        },
        "includeTools": {
          "operator": "OPERATOR_UNSPECIFIED",
          "filters": [
            {
              "attribute": "ATTRIBUTE_UNSPECIFIED",
              "matcher": {
                "caseSensitive": true,
                "contains": "contains",
                "endsWith": "endsWith",
                "exact": "exact",
                "regex": "regex",
                "startsWith": "startsWith"
              }
            }
          ]
        },
        "serverName": "serverName",
        "toolApprovals": {
          "always": true,
          "only": {
            "operator": "OPERATOR_UNSPECIFIED",
            "filters": [
              {
                "attribute": "ATTRIBUTE_UNSPECIFIED",
                "matcher": {
                  "caseSensitive": true,
                  "contains": "contains",
                  "endsWith": "endsWith",
                  "exact": "exact",
                  "regex": "regex",
                  "startsWith": "startsWith"
                }
              }
            ]
          }
        },
        "uploadId": "uploadId",
        "url": "url"
      }
    },
    "description": "description"
  },
  "info": {
    "agentCount": 0,
    "createdBy": {
      "metadata": {
        "id": "id",
        "accountId": "accountId",
        "name": "name",
        "profileId": "profileId",
        "externalId": "externalId",
        "labels": {
          "foo": "string"
        }
      },
      "spec": {
        "type": "PROFILE_TYPE_UNSPECIFIED",
        "email": "email",
        "name": "name"
      }
    },
    "lastSync": "2019-12-27T18:11:19.117Z",
    "toolCount": 0
  }
}