cadenya tool-sets tools create tool_set_123 \
--metadata '{"name":"sample"}' \
--spec '{"config":{"http":{"requestMethod":"HTTP_METHOD_UNSPECIFIED"},"type":"http"},"description":"sample","parameters":{},"requiresApproval":true}'require "cadenya"
client = Cadenya::Client.new
result = client.tool_sets.tools.create("tool_set_123", metadata: {"name" => "sample"}, spec: {"config" => {"http" => {"request_method" => "HTTP_METHOD_UNSPECIFIED"}, "type" => "http"}, "description" => "sample", "parameters" => {}, "requires_approval" => true})
puts result.inspectpackage main
import (
"context"
"fmt"
"log"
cadenya "go.cadenya.com/cadenya-go"
)
func main() {
client, err := cadenya.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &cadenya.ToolCreateParams{
Metadata: &cadenya.CreateResourceMetadata{Name: "sample"},
Spec: &cadenya.ToolSpec{Description: "sample", RequiresApproval: true, Parameters: map[string]any{}, Config: &cadenya.ToolSpec_Config{HTTP: &cadenya.ToolSpec_Config_HTTP{Type: "http", HTTP: &cadenya.Config_HTTP{RequestMethod: cadenya.ConfigHTTPRequestMethod("GET")}}}},
}
result, err := client.ToolSets().Tools().Create(ctx, "tool_set_123", params)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)
}import Cadenya from '@cadenya/cadenya';
const client = new Cadenya();
const result = await client.toolSets.tools.create('tool_set_123', { metadata: {"name":"sample"}, spec: {"config":{"http":{"requestMethod":"HTTP_METHOD_UNSPECIFIED"},"type":"http"},"description":"sample","parameters":{},"requiresApproval":true} });from cadenya import Cadenya
with Cadenya() as client:
result = client.tool_sets.tools.create("tool_set_123", metadata={"name": "sample"}, spec={"config": {"http": {"request_method": "HTTP_METHOD_UNSPECIFIED"}, "type": "http"}, "description": "sample", "parameters": {}, "requires_approval": True})
print(result){
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"spec": {
"description": "<string>",
"requiresApproval": true,
"parameters": {},
"config": {
"type": "http",
"http": {
"requestMethod": "HTTP_METHOD_UNSPECIFIED",
"path": "<string>",
"query": "<string>",
"headers": {},
"requestBodyTemplate": "<string>",
"requestBodyContentType": "<string>"
}
},
"llmToolName": "<string>"
},
"state": "STATE_UNSPECIFIED",
"info": {
"signature": "<string>",
"toolSet": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"createdBy": {
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z"
},
"spec": {
"email": "<string>",
"name": "<string>",
"type": "PROFILE_TYPE_UNSPECIFIED"
}
},
"overlays": [
"<string>"
],
"effectiveParameters": {}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Create a new tool
Creates a new tool in the tool set
cadenya tool-sets tools create tool_set_123 \
--metadata '{"name":"sample"}' \
--spec '{"config":{"http":{"requestMethod":"HTTP_METHOD_UNSPECIFIED"},"type":"http"},"description":"sample","parameters":{},"requiresApproval":true}'require "cadenya"
client = Cadenya::Client.new
result = client.tool_sets.tools.create("tool_set_123", metadata: {"name" => "sample"}, spec: {"config" => {"http" => {"request_method" => "HTTP_METHOD_UNSPECIFIED"}, "type" => "http"}, "description" => "sample", "parameters" => {}, "requires_approval" => true})
puts result.inspectpackage main
import (
"context"
"fmt"
"log"
cadenya "go.cadenya.com/cadenya-go"
)
func main() {
client, err := cadenya.NewClient()
if err != nil {
log.Fatal(err)
}
ctx := context.Background()
params := &cadenya.ToolCreateParams{
Metadata: &cadenya.CreateResourceMetadata{Name: "sample"},
Spec: &cadenya.ToolSpec{Description: "sample", RequiresApproval: true, Parameters: map[string]any{}, Config: &cadenya.ToolSpec_Config{HTTP: &cadenya.ToolSpec_Config_HTTP{Type: "http", HTTP: &cadenya.Config_HTTP{RequestMethod: cadenya.ConfigHTTPRequestMethod("GET")}}}},
}
result, err := client.ToolSets().Tools().Create(ctx, "tool_set_123", params)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%+v\n", result)
}import Cadenya from '@cadenya/cadenya';
const client = new Cadenya();
const result = await client.toolSets.tools.create('tool_set_123', { metadata: {"name":"sample"}, spec: {"config":{"http":{"requestMethod":"HTTP_METHOD_UNSPECIFIED"},"type":"http"},"description":"sample","parameters":{},"requiresApproval":true} });from cadenya import Cadenya
with Cadenya() as client:
result = client.tool_sets.tools.create("tool_set_123", metadata={"name": "sample"}, spec={"config": {"http": {"request_method": "HTTP_METHOD_UNSPECIFIED"}, "type": "http"}, "description": "sample", "parameters": {}, "requires_approval": True})
print(result){
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"spec": {
"description": "<string>",
"requiresApproval": true,
"parameters": {},
"config": {
"type": "http",
"http": {
"requestMethod": "HTTP_METHOD_UNSPECIFIED",
"path": "<string>",
"query": "<string>",
"headers": {},
"requestBodyTemplate": "<string>",
"requestBodyContentType": "<string>"
}
},
"llmToolName": "<string>"
},
"state": "STATE_UNSPECIFIED",
"info": {
"signature": "<string>",
"toolSet": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"workspaceId": "workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"createdBy": {
"metadata": {
"id": "<string>",
"accountId": "account_01HXKD2E5NQM3T9AYWCFTJHJVF",
"name": "<string>",
"externalId": "<string>",
"labels": {},
"profileId": "profile_01HXKD2E5NQM3T9AYWCFS0AP08",
"createdAt": "2023-11-07T05:31:56Z"
},
"spec": {
"email": "<string>",
"name": "<string>",
"type": "PROFILE_TYPE_UNSPECIFIED"
}
},
"overlays": [
"<string>"
],
"effectiveParameters": {}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Workspace ID.
"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"
Tool set ID. Accepts the canonical ts_… form or the external_id: form.
"toolset_01HXKD2E5NQM3T9AYWCFNRMN74"
Body
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.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
OK
Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The current lifecycle state of the tool. Output only. Use the :omit and :restore actions to transition; tool set syncs may also update it.
STATE_UNSPECIFIED, STATE_AVAILABLE, STATE_OMITTED, STATE_ARCHIVED Show child attributes
Show child attributes