profile_attachments
Attach or detach individual tools, knowledge bases, MCP servers, skills, or sub-agents on a profile without resending the full list; IDs are validated before changes are saved.
Instructions
Attach or detach individual tools, KB sources, MCP servers, skills or
sub-agents on a profile WITHOUT re-sending the whole list. add keeps
every existing item (and its order/tool_subset) and appends the new
ids; remove drops only the given ids. Re-adding an attached id or
removing one that isn't attached is a no-op, reported in unchanged.
Every id is validated before any write (unknown/deprecated tools,
missing KB sources/profiles, non-attachable MCPs, non-platform or
wrong-kind skills are refused with nothing written). Same audit trail
and cache invalidation as the replace-all paths, which still work:
update_profile(tool_ids=...), profile_mcp_attachments(set),
profile_skill_attachments(set).
Returns {kind, profile_id, items: [...] (after), added, removed,
unchanged}.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": {
"profile_id": "<profile_id>",
"kind": "<kind>"
},
"name": "profile_attachments"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | Config branch: which `environment` rows of the AI config DB to read/write. staging = the editable working set (default); prod = what production serves. | staging |
| ids | No | add/remove: the ids to attach or detach. | |
| kind | Yes | What to attach: tools (agent_tools ids, the profile's tool_ids list) | kb (agent_data_sources ids) | mcp (agent_mcp_servers ids — the attachments the runtime binds tools from) | skills (platform agent_skills ids) | downstream (sub-agent profile ids). | |
| action | No | list = current items; add/remove = change ONLY the given ids, keeping everything else attached. | list |
| profile_id | Yes | Profile to change. | |
| tool_subset | No | kind=mcp add only: pin these tool names on every MCP being added (omit = all of the MCP's tools). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |