Attach a skill to an agent
attach_skillAttach a skill to an agent so the agent can use it. Give skill as org: or a bare name for a skill the organization published. The agent always follows the skill's latest version, so a skill with a version pin such as @v2 is refused before anything changes; give the ref without the pin. An org skill must already exist and be published (create_service with kind skill, then publish_skill), except a built-in such as governance or security: when the organization has published no skill of that name, the agent holds Valet's default, follows it, and moves to the organization's own skill once one is published. Give catalog: for a skill from Valet's curated catalog: it installs a copy into the organization, or reuses the copy installed before, and attaches it at its latest version. A catalog skill whose name the organization's own skill holds is refused. The agent is rebuilt so the change takes effect. A skill that is already attached answers that nothing changed, without a rebuild; one whose name another attached skill holds is refused with nothing changed. Skills attach to agents only. Returns the agent, the skill's name, its source (org, or default for a built-in's Valet default), the latest version it follows, and whether it was already attached. Requires connecting a Valet account.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"skill": "<skill>"
},
"name": "attach_skill"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The agent's name, as list_services shows it: the agent to attach the skill to. | |
| skill | Yes | The skill to attach, as a ref. org:<name> or a bare name picks an organization skill; catalog:<name> installs a catalog skill and attaches it. The agent follows the latest version, so a ref with a @v<N> pin is refused. | |
| org_name | No | The Valet organization the agent belongs to. Omit to use the organization the account joined first. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| org | Yes | Name of the Valet organization the call acted in. | |
| kind | Yes | Kind of the service the skill attaches to. Always agent: skills attach to agents only. | |
| name | Yes | Name of the agent. | |
| skill | Yes | The skill's own name. | |
| source | Yes | org for an organization skill, default for a built-in whose Valet default the agent holds because the organization has published no skill of that name. | |
| latest_version | No | The skill's newest version, which the agent follows. Absent when the skill has no version, as a default has none. | |
| already_attached | No | True when the skill was already on the agent and nothing changed. Absent otherwise. |