Skip to main content
Glama

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

NameRequiredDescriptionDefault
envNoConfig branch: which `environment` rows of the AI config DB to read/write. staging = the editable working set (default); prod = what production serves.staging
idsNoadd/remove: the ids to attach or detach.
kindYesWhat 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).
actionNolist = current items; add/remove = change ONLY the given ids, keeping everything else attached.list
profile_idYesProfile to change.
tool_subsetNokind=mcp add only: pin these tool names on every MCP being added (omit = all of the MCP's tools).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden and does so: atomic validation before any write ('unknown/deprecated tools, missing KB sources/profiles, non-attachable MCPs ... are refused with nothing written'), idempotency semantics (re-add/remove-absent is a no-op reported in 'unchanged'), ordering and tool_subset preservation, plus audit trail and cache invalidation side effects. This discloses mutation risk and failure modes that structured fields cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The differentiator and the core add/remove contract are front-loaded in the first two sentences, followed by failure behavior and alternatives. Backticked field names make it scannable, and no sentence is filler — even the closing return shape is compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter mutation tool with no annotations, the description covers validation, atomicity, idempotency, ordering preservation, audit/cache effects, and alternative tools. The final return-shape sentence is slightly redundant given the declared output schema, but nothing an agent needs to invoke this safely is absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so a 3 is the floor, but the description adds real semantics: 'add' appends while preserving existing item order and tool_subset, 'remove' drops only the given ids, and the no-op case surfaces in `unchanged`. The `env` staging/prod branch is left entirely to the schema, which prevents a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb pair and resource scope ('Attach or detach individual tools, KB sources, MCP servers, skills or sub-agents on a profile') and immediately contrasts that with 'WITHOUT re-sending the whole list', which distinguishes it from the replace-all siblings. It even names the specific alternative paths (update_profile(tool_ids=...), profile_mcp_attachments(set), profile_skill_attachments(set)), so an agent can route without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It clearly states the selection condition (incremental edits where you don't want to resend the full list) and names the replace-all alternatives that 'still work'. What's missing is the reverse routing rule — no explicit statement of when the caller should prefer the replace-all paths over this one, or preconditions such as profile existence requirements. Clear context, but not a full when/when-not matrix.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.