Update a tool
tool_sets.tools.update(id, **kwargs) -> Tool { metadata, spec, info }
PUT/v1/workspaces/{workspaceId}/tool_sets/{toolSetId}/tools/{id}
Updates a tool in the tool set
Update a tool
require "cadenya"
cadenya = Cadenya::Client.new(api_key: "My API Key")
tool = cadenya.tool_sets.tools.update("id", workspace_id: "workspaceId", tool_set_id: "toolSetId")
puts(tool){
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"config": {
"http": {
"requestMethod": "HTTP_METHOD_UNSPECIFIED",
"headers": {
"foo": "string"
},
"path": "path",
"query": "query",
"requestBodyContentType": "requestBodyContentType",
"requestBodyTemplate": "requestBodyTemplate",
"toolName": "toolName"
},
"mcp": {
"toolDescription": "toolDescription",
"toolName": "toolName",
"toolTitle": "toolTitle"
},
"openapi": {
"method": "method",
"operationId": "operationId",
"path": "path"
}
},
"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_UNSPECIFIED",
"email": "email",
"name": "name"
}
},
"toolSet": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
}
}Returns Examples
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"config": {
"http": {
"requestMethod": "HTTP_METHOD_UNSPECIFIED",
"headers": {
"foo": "string"
},
"path": "path",
"query": "query",
"requestBodyContentType": "requestBodyContentType",
"requestBodyTemplate": "requestBodyTemplate",
"toolName": "toolName"
},
"mcp": {
"toolDescription": "toolDescription",
"toolName": "toolName",
"toolTitle": "toolTitle"
},
"openapi": {
"method": "method",
"operationId": "operationId",
"path": "path"
}
},
"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_UNSPECIFIED",
"email": "email",
"name": "name"
}
},
"toolSet": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"bundleKey": "bundleKey",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
}
}