Command lineCommands
Tools
The tools of a project: the HTTP APIs, MCP servers and sets of environment variables the project offers its agents. The panel does the same on the Tools tab of a project.
Step 1: List the tools
The command shows the tools of the project with their kind and the slug that names them in other commands.
$ kcloud tools list --project sandboxOutput
SLUG NAME KIND SECRETS AGENTS ID issue-tracker Issue tracker http_api complete 1 0195a3c4-7e21-7b6d-9f40-3c81a4d2e600
Step 2: Show a tool
The command shows the configuration of the tool and the names of its secrets, without their values.
$ kcloud tools show issue-tracker --project sandboxOutput
FIELD VALUE
name Issue tracker
slug issue-tracker
kind http_api
version 1
complete yes
agents 1
id 0195a3c4-7e21-7b6d-9f40-3c81a4d2e600
{
"kind": "http_api",
"baseUrl": "https://tracker.example.com/api/v1",
"auth": {
"kind": "bearer",
"headerName": null,
"queryParam": null
},
"docsUrl": null
}
A JSON file describes a tool with the fields kind, name, description, config and secrets. A tool of the kind environment gives its agents environment variables; a variable whose value is null is a secret, and its value goes in secrets under the key env:<NAME>. The file build-settings.json of the example reads: {"kind": "environment", "name": "Build settings", "description": "The settings of the release build.", "config": {"kind": "environment", "variables": [{"name": "BUILD_CHANNEL", "value": "beta"}, {"name": "SENTRY_TOKEN", "value": null}]}, "secrets": {"env:SENTRY_TOKEN": "sntrys_acme_0000000000000000"}}.
Step 3: Create a tool from a file
The command creates the tool the file describes. In place of a path, - reads the file from stdin.
$ kcloud tools create --project sandbox --file build-settings.jsonOutput
Created Build settings (build-settings) as 0195a3c4-7e21-7b6d-9f40-3c81a4d2e600.
Step 4: Change a tool
The file of a change holds the sections to change alone, under sections. Here change.json sets a new value of the secret: {"sections": {"secrets": {"env:SENTRY_TOKEN": "sntrys_acme_0000000000000000"}}}. The secret then need not sit in the file of the tool in a repository.
$ kcloud tools update build-settings --project sandbox --file - < change.jsonOutput
Changed Build settings.
Step 5: Copy a tool to another project
The copy gets the configuration and leaves the secrets behind. Fill them in, in the target project, in the panel or with kcloud tools update.
$ kcloud tools copy issue-tracker --project sandbox --to mobile-appOutput
Copied Issue tracker to mobile-app as 0195a3c4-7e21-7b6d-9f40-3c81a4d2e600. Its secrets stay behind. kcloud tools update --file sets them.
Step 6: Delete a tool
The platform deletes only a tool that no agent uses.
$ kcloud tools delete build-settings --project sandbox --yesOutput
Deleted the tool Build settings.
Matches the panel at cloud.kikimora.dev.