# Tool Sets ## List tool sets `client.toolSets.list(ToolSetListParamsquery?, RequestOptionsoptions?): CursorPagination` **get** `/v1/tool_sets` Lists all tool sets in the workspace ### Parameters - `query: ToolSetListParams` - `cursor?: string` Pagination cursor from previous response - `includeInfo?: boolean` When set to true you may use more of your alloted API rate-limit - `limit?: number` Maximum number of results to return - `prefix?: string` Filter expression (query param: prefix) - `sortOrder?: string` Sort order for results (asc or desc by creation time) ### Returns - `ToolSet` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSetSpec` - `adapter?: ToolSetAdapter` - `http?: ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` - `mcp?: ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` - `description?: string` - `info?: ToolSetInfo` Tool set information - `agentCount?: number` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `lastSync?: string` - `toolCount?: number` ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const toolSet of client.toolSets.list()) { console.log(toolSet.metadata); } ``` #### Response ```json { "items": [ { "metadata": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "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" } }, "description": "description" }, "info": { "agentCount": 0, "createdBy": { "metadata": { "id": "id", "accountId": "accountId", "name": "name", "profileId": "profileId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "type": "PROFILE_TYPE_USER", "email": "email", "name": "name" } }, "lastSync": "2019-12-27T18:11:19.117Z", "toolCount": 0 } } ], "pagination": { "nextCursor": "nextCursor", "total": 0 } } ``` ## Create a new tool set `client.toolSets.create(ToolSetCreateParamsbody, RequestOptionsoptions?): ToolSet` **post** `/v1/tool_sets` Creates a new tool set in the workspace ### Parameters - `body: ToolSetCreateParams` - `metadata: CreateResourceMetadata` CreateResourceMetadata contains the user-provided fields for creating 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. - `name: string` Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSetSpec` - `adapter?: ToolSetAdapter` - `http?: ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` - `mcp?: ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` - `description?: string` ### Returns - `ToolSet` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSetSpec` - `adapter?: ToolSetAdapter` - `http?: ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` - `mcp?: ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` - `description?: string` - `info?: ToolSetInfo` Tool set information - `agentCount?: number` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `lastSync?: string` - `toolCount?: number` ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); const toolSet = await client.toolSets.create({ metadata: { name: 'name' }, spec: {}, }); console.log(toolSet.metadata); ``` #### Response ```json { "metadata": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "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" } }, "description": "description" }, "info": { "agentCount": 0, "createdBy": { "metadata": { "id": "id", "accountId": "accountId", "name": "name", "profileId": "profileId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "type": "PROFILE_TYPE_USER", "email": "email", "name": "name" } }, "lastSync": "2019-12-27T18:11:19.117Z", "toolCount": 0 } } ``` ## Get a tool set by ID `client.toolSets.retrieve(stringid, RequestOptionsoptions?): ToolSet` **get** `/v1/tool_sets/{id}` Retrieves a tool set by ID from the workspace ### Parameters - `id: string` ### Returns - `ToolSet` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSetSpec` - `adapter?: ToolSetAdapter` - `http?: ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` - `mcp?: ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` - `description?: string` - `info?: ToolSetInfo` Tool set information - `agentCount?: number` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `lastSync?: string` - `toolCount?: number` ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); const toolSet = await client.toolSets.retrieve('id'); console.log(toolSet.metadata); ``` #### Response ```json { "metadata": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "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" } }, "description": "description" }, "info": { "agentCount": 0, "createdBy": { "metadata": { "id": "id", "accountId": "accountId", "name": "name", "profileId": "profileId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "type": "PROFILE_TYPE_USER", "email": "email", "name": "name" } }, "lastSync": "2019-12-27T18:11:19.117Z", "toolCount": 0 } } ``` ## Update a tool set `client.toolSets.update(stringid, ToolSetUpdateParamsbody, RequestOptionsoptions?): ToolSet` **put** `/v1/tool_sets/{id}` Updates a tool set in the workspace ### Parameters - `id: string` - `body: ToolSetUpdateParams` - `metadata?: UpdateResourceMetadata` 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. - `name: string` Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec?: ToolSetSpec` - `adapter?: ToolSetAdapter` - `http?: ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` - `mcp?: ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` - `description?: string` - `updateMask?: string` ### Returns - `ToolSet` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSetSpec` - `adapter?: ToolSetAdapter` - `http?: ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` - `mcp?: ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` - `description?: string` - `info?: ToolSetInfo` Tool set information - `agentCount?: number` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `lastSync?: string` - `toolCount?: number` ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); const toolSet = await client.toolSets.update('id'); console.log(toolSet.metadata); ``` #### Response ```json { "metadata": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "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" } }, "description": "description" }, "info": { "agentCount": 0, "createdBy": { "metadata": { "id": "id", "accountId": "accountId", "name": "name", "profileId": "profileId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "type": "PROFILE_TYPE_USER", "email": "email", "name": "name" } }, "lastSync": "2019-12-27T18:11:19.117Z", "toolCount": 0 } } ``` ## Delete a tool set `client.toolSets.delete(stringid, RequestOptionsoptions?): void` **delete** `/v1/tool_sets/{id}` Deletes a tool set in the workspace ### Parameters - `id: string` ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); await client.toolSets.delete('id'); ``` ## List tool set events `client.toolSets.listEvents(stringtoolSetID, ToolSetListEventsParamsquery?, RequestOptionsoptions?): CursorPagination` **get** `/v1/tool_sets/{toolSetId}/events` Lists all events (including sync status) for a tool set ### Parameters - `toolSetID: string` - `query: ToolSetListEventsParams` - `cursor?: string` Pagination cursor from previous response - `includeInfo?: boolean` When set to true you may use more of your alloted API rate-limit - `limit?: number` Maximum number of results to return - `sortOrder?: string` Sort order for results (asc or desc by creation time) ### Returns - `ToolSetEvent` ToolSetEvent represents a single event in the tool set's operation timeline - `metadata: OperationMetadata` Metadata for ephemeral operations and activities (e.g., objectives, executions, runs) - `id: string` Unique identifier for the operation (prefixed ULID, e.g., "obj_01HXK...") - `accountId: string` Account this operation belongs to for multi-tenant isolation (prefixed ULID) - `createdAt: string` Timestamp when this operation was created ULID includes timestamp information, but this explicit field enables easier querying - `profileId: string` ID of the actor (user or service account) that created this operation - `workspaceId: string` Workspace this operation belongs to for organizational grouping (prefixed ULID) - `externalId?: string` External ID for the operation (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"priority": "high", "source": "api", "workflow": "onboarding"} - `event?: ToolSetEventData` ToolSetEventData represents the actual event payload for tool set operations - `syncCompleted?: SyncCompleted` SyncCompleted is emitted when a tool set sync operation completes successfully - `message?: string` Optional message with additional details - `toolsSynced?: number` Number of tools synced - `syncFailed?: SyncFailed` SyncFailed is emitted when a tool set sync operation fails - `error?: boolean` Indicates this is an error event - `errorType?: string` Optional error type/code for programmatic handling - `message?: string` Error message describing what went wrong - `syncStarted?: SyncStarted` SyncStarted is emitted when a tool set sync operation begins - `message?: string` Timestamp when the sync was initiated - `type?: string` Type of the event (e.g., "sync_started", "sync_completed", "sync_failed") - `info?: Info` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `toolSet?: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `toolSetId?: string` The tool set this event is associated with ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const toolSetEvent of client.toolSets.listEvents('toolSetId')) { console.log(toolSetEvent.metadata); } ``` #### Response ```json { "items": [ { "metadata": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } }, "event": { "syncCompleted": { "message": "message", "toolsSynced": 0 }, "syncFailed": { "error": true, "errorType": "errorType", "message": "message" }, "syncStarted": { "message": "message" }, "type": "type" }, "info": { "createdBy": { "metadata": { "id": "id", "accountId": "accountId", "name": "name", "profileId": "profileId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "type": "PROFILE_TYPE_USER", "email": "email", "name": "name" } }, "toolSet": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } } }, "toolSetId": "toolSetId" } ], "pagination": { "nextCursor": "nextCursor", "total": 0 } } ``` ## Domain Types ### Mcp Tool Filter - `McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` ### Sync Completed - `SyncCompleted` SyncCompleted is emitted when a tool set sync operation completes successfully - `message?: string` Optional message with additional details - `toolsSynced?: number` Number of tools synced ### Sync Failed - `SyncFailed` SyncFailed is emitted when a tool set sync operation fails - `error?: boolean` Indicates this is an error event - `errorType?: string` Optional error type/code for programmatic handling - `message?: string` Error message describing what went wrong ### Sync Started - `SyncStarted` SyncStarted is emitted when a tool set sync operation begins - `message?: string` Timestamp when the sync was initiated ### Tool Set - `ToolSet` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSetSpec` - `adapter?: ToolSetAdapter` - `http?: ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` - `mcp?: ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` - `description?: string` - `info?: ToolSetInfo` Tool set information - `agentCount?: number` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `lastSync?: string` - `toolCount?: number` ### Tool Set Adapter - `ToolSetAdapter` - `http?: ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` - `mcp?: ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` ### Tool Set Adapter HTTP - `ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` ### Tool Set Adapter Mcp - `ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` ### Tool Set Event - `ToolSetEvent` ToolSetEvent represents a single event in the tool set's operation timeline - `metadata: OperationMetadata` Metadata for ephemeral operations and activities (e.g., objectives, executions, runs) - `id: string` Unique identifier for the operation (prefixed ULID, e.g., "obj_01HXK...") - `accountId: string` Account this operation belongs to for multi-tenant isolation (prefixed ULID) - `createdAt: string` Timestamp when this operation was created ULID includes timestamp information, but this explicit field enables easier querying - `profileId: string` ID of the actor (user or service account) that created this operation - `workspaceId: string` Workspace this operation belongs to for organizational grouping (prefixed ULID) - `externalId?: string` External ID for the operation (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"priority": "high", "source": "api", "workflow": "onboarding"} - `event?: ToolSetEventData` ToolSetEventData represents the actual event payload for tool set operations - `syncCompleted?: SyncCompleted` SyncCompleted is emitted when a tool set sync operation completes successfully - `message?: string` Optional message with additional details - `toolsSynced?: number` Number of tools synced - `syncFailed?: SyncFailed` SyncFailed is emitted when a tool set sync operation fails - `error?: boolean` Indicates this is an error event - `errorType?: string` Optional error type/code for programmatic handling - `message?: string` Error message describing what went wrong - `syncStarted?: SyncStarted` SyncStarted is emitted when a tool set sync operation begins - `message?: string` Timestamp when the sync was initiated - `type?: string` Type of the event (e.g., "sync_started", "sync_completed", "sync_failed") - `info?: Info` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `toolSet?: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `toolSetId?: string` The tool set this event is associated with ### Tool Set Event Data - `ToolSetEventData` ToolSetEventData represents the actual event payload for tool set operations - `syncCompleted?: SyncCompleted` SyncCompleted is emitted when a tool set sync operation completes successfully - `message?: string` Optional message with additional details - `toolsSynced?: number` Number of tools synced - `syncFailed?: SyncFailed` SyncFailed is emitted when a tool set sync operation fails - `error?: boolean` Indicates this is an error event - `errorType?: string` Optional error type/code for programmatic handling - `message?: string` Error message describing what went wrong - `syncStarted?: SyncStarted` SyncStarted is emitted when a tool set sync operation begins - `message?: string` Timestamp when the sync was initiated - `type?: string` Type of the event (e.g., "sync_started", "sync_completed", "sync_failed") ### Tool Set Info - `ToolSetInfo` - `agentCount?: number` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `lastSync?: string` - `toolCount?: number` ### Tool Set Spec - `ToolSetSpec` - `adapter?: ToolSetAdapter` - `http?: ToolSetAdapterHTTP` - `baseUrl?: string` - `headers?: Record` - `mcp?: ToolSetAdapterMcp` - `excludeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `operator: "OPERATOR_UNSPECIFIED" | "OPERATOR_AND" | "OPERATOR_OR"` - `"OPERATOR_UNSPECIFIED"` - `"OPERATOR_AND"` - `"OPERATOR_OR"` - `filters?: Array` - `attribute: "ATTRIBUTE_UNSPECIFIED" | "ATTRIBUTE_NAME" | "ATTRIBUTE_TITLE" | "ATTRIBUTE_DESCRIPTION"` - `"ATTRIBUTE_UNSPECIFIED"` - `"ATTRIBUTE_NAME"` - `"ATTRIBUTE_TITLE"` - `"ATTRIBUTE_DESCRIPTION"` - `matcher?: Matcher` String matching operations - `caseSensitive?: boolean` - `contains?: string` - `endsWith?: string` - `exact?: string` - `regex?: string` - `startsWith?: string` - `headers?: Record` - `includeTools?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `toolApprovals?: ToolApprovals` Approval filters that will automatically set the approval requirement on the tools synced from the MCP server - `always?: boolean` - `only?: McpToolFilter` Top-level filter with simple boolean logic (no nesting) - `url?: string` - `description?: string` # Tools ## List tools `client.toolSets.tools.list(stringtoolSetID, ToolListParamsquery?, RequestOptionsoptions?): CursorPagination` **get** `/v1/tool_sets/{toolSetId}/tools` Lists all tools in the tool set ### Parameters - `toolSetID: string` - `query: ToolListParams` - `cursor?: string` Pagination cursor from previous response - `includeInfo?: boolean` When set to true you may use more of your alloted API rate-limit - `limit?: number` Maximum number of results to return - `prefix?: string` Filter expression (query param: prefix) - `sortOrder?: string` Sort order for results (asc or desc by creation time) ### Returns - `Tool` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSpec` - `config: ToolSpecConfig` Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline. - `http?: ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. - `mcp?: ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string` - `description: string` - `parameters: Record` - `status: "TOOL_STATUS_UNSPECIFIED" | "TOOL_STATUS_AVAILABLE" | "TOOL_STATUS_FILTERED" | "TOOL_STATUS_ARCHIVED"` - `"TOOL_STATUS_UNSPECIFIED"` - `"TOOL_STATUS_AVAILABLE"` - `"TOOL_STATUS_FILTERED"` - `"TOOL_STATUS_ARCHIVED"` - `requiresApproval?: boolean` - `info?: ToolInfo` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `toolSet?: ResourceMetadata` Standard metadata for persistent, named resources (e.g., agents, tools, prompts) ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); // Automatically fetches more pages as needed. for await (const tool of client.toolSets.tools.list('toolSetId')) { console.log(tool.metadata); } ``` #### Response ```json { "items": [ { "metadata": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "config": { "http": { "requestMethod": "GET", "headers": { "foo": "string" }, "path": "path", "query": "query", "requestBodyContentType": "requestBodyContentType", "requestBodyTemplate": "requestBodyTemplate", "toolName": "toolName" }, "mcp": { "toolDescription": "toolDescription", "toolName": "toolName", "toolTitle": "toolTitle" } }, "description": "description", "parameters": { "foo": "bar" }, "status": "TOOL_STATUS_UNSPECIFIED", "requiresApproval": true }, "info": { "createdBy": { "metadata": { "id": "id", "accountId": "accountId", "name": "name", "profileId": "profileId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "type": "PROFILE_TYPE_USER", "email": "email", "name": "name" } }, "toolSet": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } } } } ], "pagination": { "nextCursor": "nextCursor", "total": 0 } } ``` ## Create a new tool `client.toolSets.tools.create(stringtoolSetID, ToolCreateParamsbody, RequestOptionsoptions?): Tool` **post** `/v1/tool_sets/{toolSetId}/tools` Creates a new tool in the tool set ### Parameters - `toolSetID: string` - `body: ToolCreateParams` - `metadata: CreateResourceMetadata` CreateResourceMetadata contains the user-provided fields for creating 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. - `name: string` Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSpec` - `config: ToolSpecConfig` Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline. - `http?: ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. - `mcp?: ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string` - `description: string` - `parameters: Record` - `status: "TOOL_STATUS_UNSPECIFIED" | "TOOL_STATUS_AVAILABLE" | "TOOL_STATUS_FILTERED" | "TOOL_STATUS_ARCHIVED"` - `"TOOL_STATUS_UNSPECIFIED"` - `"TOOL_STATUS_AVAILABLE"` - `"TOOL_STATUS_FILTERED"` - `"TOOL_STATUS_ARCHIVED"` - `requiresApproval?: boolean` ### Returns - `Tool` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSpec` - `config: ToolSpecConfig` Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline. - `http?: ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. - `mcp?: ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string` - `description: string` - `parameters: Record` - `status: "TOOL_STATUS_UNSPECIFIED" | "TOOL_STATUS_AVAILABLE" | "TOOL_STATUS_FILTERED" | "TOOL_STATUS_ARCHIVED"` - `"TOOL_STATUS_UNSPECIFIED"` - `"TOOL_STATUS_AVAILABLE"` - `"TOOL_STATUS_FILTERED"` - `"TOOL_STATUS_ARCHIVED"` - `requiresApproval?: boolean` - `info?: ToolInfo` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `toolSet?: ResourceMetadata` Standard metadata for persistent, named resources (e.g., agents, tools, prompts) ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); const tool = await client.toolSets.tools.create('toolSetId', { metadata: { name: 'name' }, spec: { config: {}, description: 'description', parameters: { foo: 'bar' }, status: 'TOOL_STATUS_UNSPECIFIED', }, }); console.log(tool.metadata); ``` #### Response ```json { "metadata": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "config": { "http": { "requestMethod": "GET", "headers": { "foo": "string" }, "path": "path", "query": "query", "requestBodyContentType": "requestBodyContentType", "requestBodyTemplate": "requestBodyTemplate", "toolName": "toolName" }, "mcp": { "toolDescription": "toolDescription", "toolName": "toolName", "toolTitle": "toolTitle" } }, "description": "description", "parameters": { "foo": "bar" }, "status": "TOOL_STATUS_UNSPECIFIED", "requiresApproval": true }, "info": { "createdBy": { "metadata": { "id": "id", "accountId": "accountId", "name": "name", "profileId": "profileId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "type": "PROFILE_TYPE_USER", "email": "email", "name": "name" } }, "toolSet": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } } } } ``` ## Get a tool by ID `client.toolSets.tools.retrieve(stringid, ToolRetrieveParamsparams, RequestOptionsoptions?): Tool` **get** `/v1/tool_sets/{toolSetId}/tools/{id}` Retrieves a tool by ID from the workspace ### Parameters - `id: string` - `params: ToolRetrieveParams` - `toolSetId: string` ### Returns - `Tool` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSpec` - `config: ToolSpecConfig` Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline. - `http?: ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. - `mcp?: ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string` - `description: string` - `parameters: Record` - `status: "TOOL_STATUS_UNSPECIFIED" | "TOOL_STATUS_AVAILABLE" | "TOOL_STATUS_FILTERED" | "TOOL_STATUS_ARCHIVED"` - `"TOOL_STATUS_UNSPECIFIED"` - `"TOOL_STATUS_AVAILABLE"` - `"TOOL_STATUS_FILTERED"` - `"TOOL_STATUS_ARCHIVED"` - `requiresApproval?: boolean` - `info?: ToolInfo` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `toolSet?: ResourceMetadata` Standard metadata for persistent, named resources (e.g., agents, tools, prompts) ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); const tool = await client.toolSets.tools.retrieve('id', { toolSetId: 'toolSetId' }); console.log(tool.metadata); ``` #### Response ```json { "metadata": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "config": { "http": { "requestMethod": "GET", "headers": { "foo": "string" }, "path": "path", "query": "query", "requestBodyContentType": "requestBodyContentType", "requestBodyTemplate": "requestBodyTemplate", "toolName": "toolName" }, "mcp": { "toolDescription": "toolDescription", "toolName": "toolName", "toolTitle": "toolTitle" } }, "description": "description", "parameters": { "foo": "bar" }, "status": "TOOL_STATUS_UNSPECIFIED", "requiresApproval": true }, "info": { "createdBy": { "metadata": { "id": "id", "accountId": "accountId", "name": "name", "profileId": "profileId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "type": "PROFILE_TYPE_USER", "email": "email", "name": "name" } }, "toolSet": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } } } } ``` ## Update a tool `client.toolSets.tools.update(stringid, ToolUpdateParamsparams, RequestOptionsoptions?): Tool` **put** `/v1/tool_sets/{toolSetId}/tools/{id}` Updates a tool in the tool set ### Parameters - `id: string` - `params: ToolUpdateParams` - `toolSetId: string` Path param - `metadata?: UpdateResourceMetadata` Body param: 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. - `name: string` Human-readable name for the resource (e.g., "Customer Support Agent", "Email Tool") - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec?: ToolSpec` Body param - `config: ToolSpecConfig` Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline. - `http?: ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. - `mcp?: ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string` - `description: string` - `parameters: Record` - `status: "TOOL_STATUS_UNSPECIFIED" | "TOOL_STATUS_AVAILABLE" | "TOOL_STATUS_FILTERED" | "TOOL_STATUS_ARCHIVED"` - `"TOOL_STATUS_UNSPECIFIED"` - `"TOOL_STATUS_AVAILABLE"` - `"TOOL_STATUS_FILTERED"` - `"TOOL_STATUS_ARCHIVED"` - `requiresApproval?: boolean` - `updateMask?: string` Body param ### Returns - `Tool` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSpec` - `config: ToolSpecConfig` Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline. - `http?: ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. - `mcp?: ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string` - `description: string` - `parameters: Record` - `status: "TOOL_STATUS_UNSPECIFIED" | "TOOL_STATUS_AVAILABLE" | "TOOL_STATUS_FILTERED" | "TOOL_STATUS_ARCHIVED"` - `"TOOL_STATUS_UNSPECIFIED"` - `"TOOL_STATUS_AVAILABLE"` - `"TOOL_STATUS_FILTERED"` - `"TOOL_STATUS_ARCHIVED"` - `requiresApproval?: boolean` - `info?: ToolInfo` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `toolSet?: ResourceMetadata` Standard metadata for persistent, named resources (e.g., agents, tools, prompts) ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); const tool = await client.toolSets.tools.update('id', { toolSetId: 'toolSetId' }); console.log(tool.metadata); ``` #### Response ```json { "metadata": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "config": { "http": { "requestMethod": "GET", "headers": { "foo": "string" }, "path": "path", "query": "query", "requestBodyContentType": "requestBodyContentType", "requestBodyTemplate": "requestBodyTemplate", "toolName": "toolName" }, "mcp": { "toolDescription": "toolDescription", "toolName": "toolName", "toolTitle": "toolTitle" } }, "description": "description", "parameters": { "foo": "bar" }, "status": "TOOL_STATUS_UNSPECIFIED", "requiresApproval": true }, "info": { "createdBy": { "metadata": { "id": "id", "accountId": "accountId", "name": "name", "profileId": "profileId", "externalId": "externalId", "labels": { "foo": "string" } }, "spec": { "type": "PROFILE_TYPE_USER", "email": "email", "name": "name" } }, "toolSet": { "id": "id", "accountId": "accountId", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "profileId": "profileId", "workspaceId": "workspaceId", "externalId": "externalId", "labels": { "foo": "string" } } } } ``` ## Delete a tool `client.toolSets.tools.delete(stringid, ToolDeleteParamsparams, RequestOptionsoptions?): void` **delete** `/v1/tool_sets/{toolSetId}/tools/{id}` Deletes a tool in the tool set ### Parameters - `id: string` - `params: ToolDeleteParams` - `toolSetId: string` ### Example ```typescript import Cadenya from '@cadenya/cadenya'; const client = new Cadenya({ apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted }); await client.toolSets.tools.delete('id', { toolSetId: 'toolSetId' }); ``` ## Domain Types ### Config HTTP - `ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. ### Config Mcp - `ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string` ### Tool - `Tool` - `metadata: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ToolSpec` - `config: ToolSpecConfig` Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline. - `http?: ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. - `mcp?: ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string` - `description: string` - `parameters: Record` - `status: "TOOL_STATUS_UNSPECIFIED" | "TOOL_STATUS_AVAILABLE" | "TOOL_STATUS_FILTERED" | "TOOL_STATUS_ARCHIVED"` - `"TOOL_STATUS_UNSPECIFIED"` - `"TOOL_STATUS_AVAILABLE"` - `"TOOL_STATUS_FILTERED"` - `"TOOL_STATUS_ARCHIVED"` - `requiresApproval?: boolean` - `info?: ToolInfo` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `toolSet?: ResourceMetadata` Standard metadata for persistent, named resources (e.g., agents, tools, prompts) ### Tool Info - `ToolInfo` - `createdBy?: Profile` Profile represents a human user at the account level. Profiles are account-scoped resources that can be associated with multiple workspaces through the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS). - `metadata: AccountResourceMetadata` 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?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} - `spec: ProfileSpec` ProfileSpec contains the profile-specific fields - `type: "PROFILE_TYPE_USER" | "PROFILE_TYPE_API_KEY" | "PROFILE_TYPE_SYSTEM"` Type is the type of profile. User's are humans, API keys are computers. You know the deal. - `"PROFILE_TYPE_USER"` - `"PROFILE_TYPE_API_KEY"` - `"PROFILE_TYPE_SYSTEM"` - `email?: string` Email address of the user (required, unique per account) - `name?: string` Display name for the user (e.g., "Bobby Tables") - `toolSet?: ResourceMetadata` 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: string` Timestamp when this resource was created - `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) - `externalId?: string` External ID for the resource (e.g., a workflow ID from an external system) - `labels?: Record` Arbitrary key-value pairs for categorization and filtering Examples: {"environment": "production", "team": "platform", "version": "v2"} ### Tool Spec - `ToolSpec` - `config: ToolSpecConfig` Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline. - `http?: ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. - `mcp?: ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string` - `description: string` - `parameters: Record` - `status: "TOOL_STATUS_UNSPECIFIED" | "TOOL_STATUS_AVAILABLE" | "TOOL_STATUS_FILTERED" | "TOOL_STATUS_ARCHIVED"` - `"TOOL_STATUS_UNSPECIFIED"` - `"TOOL_STATUS_AVAILABLE"` - `"TOOL_STATUS_FILTERED"` - `"TOOL_STATUS_ARCHIVED"` - `requiresApproval?: boolean` ### Tool Spec Config - `ToolSpecConfig` Config defines the adapter to use for the tool. This is used to determine how the tool is called. For example, if the tool is an HTTP tool, the adapter will be Http. If the tool is an inline tool, the adapter will be Inline. - `http?: ConfigHTTP` - `requestMethod: "GET" | "POST" | "PUT" | 2 more` - `"GET"` - `"POST"` - `"PUT"` - `"PATCH"` - `"DELETE"` - `headers?: Record` - `path?: string` - `query?: string` - `requestBodyContentType?: string` - `requestBodyTemplate?: string` These are only used when the request method is a POST, PUT, or PATCH - `toolName?: string` The tool name (commonly an "operation id" in OpenAPI specs) to call on the HTTP adapter. This is used to match the tool spec to the correct endpoint on the HTTP adapter. it will be derived from the name of the tool if not provided. - `mcp?: ConfigMcp` - `toolDescription?: string` - `toolName?: string` - `toolTitle?: string`