Skip to main content
Glama

profile_mcp_attachments

List or replace an agent profile's attached MCP servers and optional tool subsets, validating selections before any config write.

Instructions

Manage a profile's MCP attachments (agent_profile_mcp_servers — the source the flag-on MCP resolver reads). action: list → current attachments + the attachable MCP set for this profile; set → REPLACE the profile's attachments with attachments, a list of {mcp_server_id, tool_subset?} (tool_subset omitted/null = all of the MCP's tools). Detaches any MCP not in the list. Each MCP must be attachable (scope-visible) and every pinned tool_subset name must be one of that MCP's real tools; validated before any write.

No confirm gate — matches the portal, which reconciles this join
freely (it's reversible config, not a destructive delete).

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>"
    },
    "name": "profile_mcp_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
actionNoOperation to run: list | set. The tool description lists what each action needs.list
profile_idYesAgent profile UUID (list_profiles / get_profile).
attachmentsNoFull attachment list [{mcp_server_id, tool_subset?}] — REPLACES the current set.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that set REPLACES the whole set, detaches anything omitted, validates before writing, and that there is no confirm gate because the change is reversible config. It does not describe the return payload of set or any error behavior on validation failure, keeping it just under top marks.

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

Conciseness4/5

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

The text is dense but front-loaded with the resource and the action semantics before validation and confirm-gate details. Some parenthetical asides (table name, portal reconciliation) are informative but add length; overall nearly every clause earns its place.

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

Completeness4/5

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

For a two-action mutation tool with a full output schema, the description covers the write semantics, validation rules, and confirm-gate behavior sufficiently for correct invocation. Minor gap: it does not say what the mutating action returns or how validation errors surface.

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 the baseline is 3, but the description adds real meaning beyond the schema — notably that tool_subset omitted/null means 'all of the MCP's tools'. The env and profile_id parameters are left to their schema descriptions.

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

Purpose4/5

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

The description names a specific verb and resource ('Manage a profile's MCP attachments') and identifies the underlying table and the resolver that reads it (agent_profile_mcp_servers / flag-on MCP resolver). It clearly separates itself from skill or plain profile attachments by consistently scoping to MCP, though it never explicitly contrasts the adjacent siblings (profile_attachments, profile_skill_attachments).

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 explains both modes — list returns current attachments plus the attachable set, while set performs a full replacement — and states the validation precondition (scope-visible MCP, tool_subset names must be real tools). It stops short of explicit when-not guidance or naming an alternative tool for partial edits.

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