Skip to main content
Glama

ck_attach

Attach ControlKeel to a coding-agent host by installing host-specific hooks, skills, slash commands, and subagent profiles after a one-line MCP install.

Instructions

Wire ControlKeel into the current agent host (Claude Code, Cursor, Codex, OpenCode, etc.). Closes the gap for users who installed ControlKeel via a one-line MCP-add command but skipped controlkeel attach <host>. Installs the host-specific hooks (SessionStart, PreToolUse, PostToolUse, UserPromptSubmit), skills directory, slash commands, AGENTS.md/CLAUDE.md preamble, and subagent profiles for the requested host. Idempotent — re-running refreshes artifacts to the current version. Writes only inside project_root; no network egress. Call this once after a one-line MCP install when the host lacks ControlKeel hooks/skills. Use ck_mcp_discover first if unsure which host ID to pass.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesAgent host ID to attach. One of: claude-code, codex-cli, cursor, opencode, augment, continue, aider, cline, roo-code, kiro, goose, gemini-cli, letta-code, windsurf, vscode, copilot, pi.
scopeNoAttach scope. Defaults to project.
project_rootNoAbsolute path to the project root. Defaults to CK_PROJECT_ROOT or the MCP server's working directory.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNo
linesNo
statusNo
next_stepsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.4.13
    • removedOutput schema / properties / attached
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedOutput schema / properties / files_created
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedOutput schema / properties / hooks_installed
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • addedOutput schema / properties / lines
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / next_steps
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / status
      Added value: +{
      +  "type": "string"
      +}
  2. Addedv0.3.77
  3. Removedv0.3.77
  4. Changed1 schema field changedv0.3.38
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "attached": {
      +      "type": "boolean"
      +    },
      +    "files_created": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "hooks_installed": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "host": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  5. Addedv0.3.27

TDQS

A3.9/5.0
Behavior1/5

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

The description explicitly states 'Idempotent — re-running refreshes artifacts to the current version', but the annotations declare idempotentHint=false. This is a direct, serious conflict about a behavioral trait. Per the rules, a description that contradicts its annotations scores 1 here, despite otherwise rich disclosure (write scope, no network egress).

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?

Front-loaded with the core action, then layers the gap being closed, the installed artifacts, idempotency, write/network constraints, and the call condition. Dense but every sentence carries information relevant to invoking correctly; no filler.

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?

An output schema exists, so return values need no elaboration. The description covers the action, side effects (installed artifacts), write boundary, network behavior, and invocation timing — everything an agent needs before calling, aside from the idempotency inconsistency.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents host, scope, and project_root, including the enum values and defaults. The description adds only ambient context (writes stay inside project_root) but no syntax or selection semantics beyond the schema. Baseline 3 is appropriate.

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?

States a specific verb and object ('Wire ControlKeel into the current agent host') with concrete scope (hooks, skills dir, slash commands, AGENTS.md preamble, subagent profiles). It names the exact gap it closes and distinguishes itself from adjacent tools like ck_mcp_discover. An agent can tell what this does without opening the schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use ('Call this once after a one-line MCP install when the host lacks ControlKeel hooks/skills') and points to the alternative for host selection ('Use ck_mcp_discover first if unsure which host ID to pass'). Both the trigger condition and the fallback routing are spelled out.

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