MCP Tools API Reference
CAMI provides 19 Model Context Protocol (MCP) tools that enable Claude Code to manage agents dynamically through natural language conversation. This is CAMI's primary interface - you talk to Claude naturally, and Claude uses these tools behind the scenes to accomplish your goals.
Understanding MCP Tools
MCP tools are like API endpoints, but designed for AI assistants. When you tell Claude "deploy the frontend agent to my project," Claude translates your intent into precise tool calls with the correct parameters.
You interact naturally:
"Deploy frontend and backend agents to ~/projects/my-app"Claude uses tools:
mcp__cami__deploy_agents({ agent_names: ["frontend", "backend"], target_path: "/Users/you/projects/my-app", overwrite: false})Key Benefits:
- Natural language interface - no memorizing commands
- Context-aware - Claude understands your project structure
- Error handling - Claude interprets errors and suggests fixes
- Workflow automation - Claude chains multiple tools together
Tool Categories
CAMI's 19 tools are organized into four categories:
Agent Management (5 tools)
Core operations for discovering and deploying agents:
list_agents- Discover available agents from all sourcesdeploy_agents- Copy agents to project directoriesscan_deployed_agents- Audit deployed agents and check for updatesupdate_claude_md- Document deployed agents in CLAUDE.mdimport_agents- Bring externally-deployed agents into CAMI tracking
Source Management (5 tools)
Manage Git repositories of agent libraries:
add_source- Clone and register agent repositorieslist_sources- View configured sources with compliance statusupdate_source- Pull latest agents from Gitsource_status- Check Git status of sourcesdetect_source_state- Analyze source compliancenormalize_source- Fix compliance issues automatically
Project Management (4 tools)
Manage deployment locations and project setup:
add_location- Register project directorieslist_locations- View saved project locationsremove_location- Unregister projectscreate_project- Initialize new projects with agents
Normalization & Utility (5 tools)
Advanced features for migration and maintenance:
detect_project_state- Analyze project normalization statenormalize_project- Migrate projects to CAMI standardscleanup_backups- Remove old backup directoriesonboard- Get personalized setup guidance
Agent Management Tools
list_agents
Purpose: Discover all available agents across configured sources.
When to Use:
- Before deploying agents (to see what's available)
- Exploring available specialists for a task
- Verifying sources loaded correctly
Parameters: None
Returns:
{ agents: Array<{ name: string; // Agent identifier(e.g., "frontend") version: string; // Semantic version(e.g., "2.1.0") description: string; // One-line purpose description category: string; // Folder organization(e.g., "core") file_name: string; // Source filename(e.g., "frontend.md") }>;}Natural Language Examples:
"What agents are available?""Show me all agents in the core category""List frontend-related agents"Response Format:
Available agents (12 total):## Core (3 agents)• architect (v3.2.0) Expert application architect specializing in system design• backend (v2.1.0) Back-end specialist for Node.js and API development• frontend (v2.0.1) Front-end specialist for React and modern web UIs## Specialized (2 agents)• designer (v1.1.0) Visual design and UI/UX specialist• qa (v1.0.0) Quality assurance and testing specialistPriority-Based Deduplication:
If multiple sources contain agents with the same name, CAMI uses the agent from the source with the lowest priority number (1 = highest priority):
agent_sources: - name: my-agents # Priority 10 (highest) - name: team-agents # Priority 50 (medium) - name: official-agents # Priority 100 (lowest)If "frontend" exists in all three sources, the version from my-agents is used.
Error Conditions:
- No sources configured: Returns error with setup instructions
- Sources exist but no agents found: Returns empty list with warning
- Invalid source paths: Logs warnings, continues with valid sources
See Also:
- scan_deployed_agents - Check deployed versions
- add_source - Add agent libraries
deploy_agents
Purpose: Copy selected agents from sources to a project's .claude/agents/ directory.
When to Use:
- Adding agents to an existing project
- Setting up a new project with specialists
- Updating agents to newer versions (with overwrite)
Parameters:
{ agent_names: string[]; // Required: Agent names to deploy target_path: string; // Required: Absolute project path overwrite?: boolean; // Optional: Replace existing(default: false)}Returns:
{ results: Array<{ agent_name: string; // Agent that was deployed success: boolean; // Whether deployment succeeded message: string; // Human-readable result message conflict?: boolean; // True if file exists and overwrite=false }>;}Natural Language Examples:
"Deploy frontend and backend agents to ~/projects/my-app""Add the designer agent to this project""Update the architect agent to the latest version"Underlying Tool Call:
mcp__cami__deploy_agents({ agent_names: ["frontend", "backend"], target_path: "/Users/you/projects/my-app", overwrite: false})Response Example:
Deployed 2 agents to /Users/you/projects/my-app✓ frontend: Deployed successfully✓ backend: Deployed successfullyDeployment Behavior:
- Validates target path - Ensures directory exists
- Creates .claude/agents/ - If it doesn't exist
- Copies agent files - From source to target
- Checks for conflicts - If overwrite=false and file exists
- Updates manifests - Tracks deployment in project and central manifests
- Calculates hashes - For change detection
Conflict Handling:
When overwrite=false (default) and an agent already exists:
✗ frontend: File already exists (use overwrite=true to replace)When overwrite=true:
✓ frontend: Deployed successfully (overwrote existing)Manifest Updates:
After deployment, CAMI updates two manifests:
Project Manifest (.claude/.cami/manifest.yaml):
version: "1"state: cami-nativenormalized_at: 2025-11-24T10:30:00Zagents: - name: frontend version: "2.0.1" source: official-agents source_path: /Users/you/cami-workspace/sources/official-agents/frontend.md priority: 50 deployed_at: 2025-11-24T10:30:00Z content_hash: abc123... metadata_hash: def456... origin: camiCentral Manifest (~/cami-workspace/central-manifest.yaml):
deployments: /Users/you/projects/my-app: state: cami-native normalized_at: 2025-11-24T10:30:00Z last_scanned: 2025-11-24T10:30:00Z agents: - name: frontend version: "2.0.1" # ... same fields as project manifestError Conditions:
- Target path doesn't exist: Error with path validation message
- Agent not found: Lists missing agents by name
- Deployment fails: Returns partial results (some succeed, some fail)
- Manifest update fails: Logs warning, deployment still succeeds
Performance Notes:
- Copies files, doesn't symlink (enables version control)
- Fast for typical deployments (1-10 agents in <1 second)
- Hash calculation adds minimal overhead (<10ms per agent)
See Also:
- list_agents - Discover available agents
- scan_deployed_agents - Verify deployment
- update_claude_md - Document deployed agents
scan_deployed_agents
Purpose: Audit a project directory to discover deployed agents and compare versions with available sources.
When to Use:
- Before updating agents (to see what's deployed)
- Auditing unknown projects
- Checking if deployed agents have updates available
Parameters:
{ target_path: string; // Required: Absolute path to project}Returns:
{ statuses: Array<{ name: string; // Agent name deployed_version: string; // Version in project(empty if not deployed) available_version: string; // Latest version in sources status: string; // "up-to-date" | "update-available" | "not-deployed" }>;}Natural Language Examples:
"What agents are deployed in this project?""Check if my agents need updating""Scan ~/projects/my-app for deployed agents"Response Example:
Scanning /Users/you/projects/my-appFound 3 deployed agents✓ frontend: up-to-date (deployed: v2.0.1, available: v2.0.1)⚠ backend: update-available (deployed: v1.5.0, available: v2.1.0)○ designer: not-deployedStatus Indicators:
- up-to-date: Deployed version matches source version
- update-available: Newer version exists in sources
- not-deployed: Agent available but not deployed
Scan Algorithm:
- Find .claude/agents/: Returns empty if directory doesn't exist
- Parse agent files: Read frontmatter from each .md file
- Load available agents: From all configured sources
- Compare versions: String comparison (exact match required)
- Return status: For every available agent, not just deployed
Version Comparison:
CAMI uses exact string matching for version comparison:
"2.0.1" == "2.0.1"- up-to-date"2.0.1" != "2.1.0"- update-available- No semantic versioning logic (2.0.1 vs 2.1.0 both treated as different)
Edge Cases:
- Agent in project but not in sources: Not included in results
- Malformed agent files: Skipped with warning logged to stderr
- No .claude/agents/ directory: Returns empty list (not an error)
See Also:
- deploy_agents - Update agents
- list_agents - See available versions
update_claude_md
Purpose: Update a project's CLAUDE.md file with documentation about deployed agents.
When to Use:
- After deploying agents (to document them)
- Updating project documentation
- Onboarding new team members (they see agent info in CLAUDE.md)
Parameters:
{ target_path: string; // Required: Absolute path to project}Returns: Text confirmation with list of documented agents
Natural Language Examples:
"Update CLAUDE.md with deployed agents""Document the agents in this project""Refresh the agent documentation"Response Example:
Updated CLAUDE.md at /Users/you/projects/my-appDocumented 3 agents: • frontend (v2.0.1) • backend (v2.1.0) • designer (v1.1.0)What Gets Updated:
The tool inserts or updates a CAMI-managed section in CLAUDE.md:
<!-- CAMI-MANAGED: DEPLOYED-AGENTS | Last Updated: 2025-11-24T10:30:00Z -->## Deployed AgentsThe following Claude Code agents are available in this project:### frontend (v2.0.1)Front-end specialist for React and modern web UIs with TypeScript expertise.### backend (v2.1.0)Back-end specialist for Node.js API development with database integration.### designer (v1.1.0)Visual design and UI/UX specialist ensuring aesthetic excellence.<!-- /CAMI-MANAGED: DEPLOYED-AGENTS -->CAMI-Managed Sections:
CAMI uses special HTML comments to mark managed content:
<!-- CAMI-MANAGED: SECTION-NAME | Last Updated: timestamp -->... managed content ...<!-- /CAMI-MANAGED: SECTION-NAME -->Behavior:
- Creates CLAUDE.md if it doesn't exist
- Preserves user content outside managed sections
- Updates timestamp on each run
- Safe to run multiple times (idempotent)
File Creation:
If CLAUDE.md doesn't exist, CAMI creates it with:
# CLAUDE.mdProject documentation for Claude Code.<!-- CAMI-MANAGED: DEPLOYED-AGENTS | ... -->...<!-- /CAMI-MANAGED: DEPLOYED-AGENTS -->Error Conditions:
- Target path doesn't exist: Returns error
- No agents deployed: Creates empty section with helpful message
- CLAUDE.md read error: Returns error with file path
See Also:
- deploy_agents - Deploy before documenting
- scan_deployed_agents - Verify agents
import_agents
Purpose: Import and track agents that were deployed outside of CAMI (manual copy, other tools, etc.).
When to Use:
- You have existing .claude/agents/ from manual deployment
- Migrating from another agent management system
- Bringing pre-CAMI projects into CAMI tracking
Parameters:
{ project_path: string; // Required: Absolute path to project dry_run?: boolean; // Optional: Preview without changes(default: false)}Returns:
{ project_path: string; agents_found: number; agents_imported: number; // 0 if dry_run=true agents: Array<{ name: string; version: string; file_path: string; origin: string; // "cami" | "external" source_match: string; // Source name if matched, empty otherwise content_hash: string; metadata_hash: string; }>; dry_run: boolean;}Natural Language Examples:
"Import agents from ~/projects/legacy-app""Preview what would be imported from this project""Bring existing agents into CAMI tracking"Dry Run Example:
mcp__cami__import_agents({ project_path: "/Users/you/projects/legacy-app", dry_run: true})Response (dry run):
# Import Agents: /Users/you/projects/legacy-app**Agents Found:** 5## Matched to CAMI Sources- **frontend** (v2.0.1) - Source: `official-agents`- **backend** (v2.1.0) - Source: `official-agents`## External Agents (No Source Match)- **custom-agent** (v1.0.0)- **legacy-helper** (no version)- **temp-script** (v0.1.0)---**This is a dry run - no changes were made.**To import these agents, call this tool again with `dry_run=false`.Actual Import Example:
mcp__cami__import_agents({ project_path: "/Users/you/projects/legacy-app", dry_run: false})Response (actual import):
# Import Agents: /Users/you/projects/legacy-app**Agents Found:** 5## Matched to CAMI Sources- **frontend** (v2.0.1) - Source: `official-agents`- **backend** (v2.1.0) - Source: `official-agents`## External Agents (No Source Match)- **custom-agent** (v1.0.0)- **legacy-helper** (no version)---Import Complete!- Imported 5 agents- 2 matched to sources- 3 external agents- Created project manifest- Updated central deployment trackingThese agents are now tracked by CAMI for version management and updates!Import Algorithm:
- Scan .claude/agents/: Read all .md files
- Parse frontmatter: Extract name, version, description
- Calculate hashes: Content hash and metadata hash
- Match to sources: Compare name + content hash with available agents
- Classify origin:
origin: "cami"- Exact match to source (name + content hash)origin: "external"- No match found
- Create manifests: Project and central manifests
- Enable tracking: Agents now visible to scan_deployed_agents
Source Matching Logic:
// Pseudo-code for matchingfor each deployed_agent: for each available_agent in sources: if deployed_agent.name == available_agent.name: deployed_hash = hash(deployed_agent.content) source_hash = hash(available_agent.content) if deployed_hash == source_hash: // Exact match - originated from this source origin = "cami" source_match = source.name breakBenefits of Importing:
Before import:
- Agents exist but CAMI doesn't know about them
- No update detection
- No version tracking
- No source attribution
After import:
- Full CAMI tracking enabled
- Update detection works
- Version comparison available
- Source attribution (if matched)
Error Conditions:
- No .claude/agents/ directory: Error message
- Malformed agent files: Skipped with warning
- Manifest write fails: Error (import cancelled)
See Also:
- scan_deployed_agents - Audit imported agents
- detect_project_state - Analyze project state
Source Management Tools
add_source
Purpose: Clone a Git repository of agents and register it as a CAMI source.
When to Use:
- Adding official agent libraries
- Integrating team/company agent repositories
- Setting up CAMI for the first time
Parameters:
{ url: string; // Required: Git URL(HTTPS or SSH) name?: string; // Optional: Source name(derived from URL if omitted) priority?: number; // Optional: Priority(default: 50)}Returns: Text confirmation with clone location and agent count
Natural Language Examples:
"Add agent source from git@github.com:company/agents.git""Clone the official agents library""Add team agents with priority 10"Underlying Tool Call:
mcp__cami__add_source({ url: "git@github.com:company/agents.git", name: "company-agents", // Optional priority: 50 // Optional})Response Example:
✓ Cloned company-agents to ~/cami-workspace/sources/company-agents✓ Added source with priority 50✓ Found 12 agents## Source Compliance Check✓ **Source is fully compliant!**Or if issues detected:
✓ Cloned team-agents to ~/cami-workspace/sources/team-agents✓ Added source with priority 50✓ Found 8 agents## Source Compliance CheckThis source has compliance issues:- Missing .camiignore file- 3 agents with issues: - old-agent.md: missing version, missing description - legacy.md: missing version**Recommendation:** Use `normalize_source` to fix these issues automatically.This will add missing versions, descriptions, and create .camiignore.Name Derivation:
If name is not provided, CAMI derives it from the URL:
git@github.com:company/agents.git → "agents"https://github.com/lando/official-agents.git → "official-agents"git@gitlab.com:team/custom.git → "custom"Priority System:
Lower numbers = higher priority (1 = highest, 100 = lowest):
- 1-10: Personal overrides
- 20-40: Team standards
- 50: Default for new sources
- 60-80: Third-party libraries
- 100+: Low-priority/experimental
Clone Location:
Sources are cloned to:
~/cami-workspace/sources/<name>/Or if CAMI_DIR is set:
$CAMI_DIR/sources/<name>/Config Update:
Adds entry to ~/cami-workspace/config.yaml:
agent_sources: - name: company-agents type: local path: /Users/you/cami-workspace/sources/company-agents priority: 50 git: enabled: true remote: git@github.com:company/agents.gitAutomatic Compliance Detection:
After cloning, CAMI automatically analyzes the source for compliance issues:
- Missing .camiignore file
- Agents without version field
- Agents without description field
If issues found, CAMI suggests using normalize_source to fix them.
Error Conditions:
- Source name already exists: Error (use different name)
- Git clone fails: Error with git output
- Target directory exists: Error (prevents accidental overwrite)
- Invalid URL: Error from git clone
See Also:
- list_sources - View configured sources
- update_source - Pull latest changes
- detect_source_state - Analyze compliance
list_sources
Purpose: View all configured agent sources with compliance status and Git information.
When to Use:
- Checking what sources are configured
- Verifying source priorities
- Auditing source compliance
Parameters: None
Returns:
{ sources: Array<{ name: string; path: string; priority: number; agent_count: number; git_remote?: string; // Present if git enabled git_enabled: boolean; is_compliant: boolean; // True if passes compliance checks issue_count?: number; // Number of compliance issues issues_summary?: string; // Summary of issues }>;}Natural Language Examples:
"What agent sources are configured?""Show me all sources with their priorities""List sources that need updates"Response Example:
Agent Sources (3 total):• ✓ official-agents (priority 50) Path: /Users/you/cami-workspace/sources/official-agents Agents: 15 Git: git@github.com:lando/official-agents.git Compliance: ✓ Compliant• ⚠️ team-agents (priority 30) Path: /Users/you/cami-workspace/sources/team-agents Agents: 8 Git: git@github.com:company/team-agents.git Compliance: ⚠️ Issues (3 agents with issues)• ✓ my-agents (priority 10) Path: /Users/you/cami-workspace/sources/my-agents Agents: 2 Compliance: ✓ Compliant**Note:** 1/3 sources have compliance issues.Use `detect_source_state` and `normalize_source` to fix issues.Compliance Checks:
A source is compliant if:
- Has .camiignore file (recommended)
- All agents have
versionfield - All agents have
descriptionfield
Priority Display:
Sources are listed in config order (not sorted by priority). To see effective priority for duplicate agents, use list_agents which applies priority-based deduplication.
Error Conditions:
- No config found: Error with setup instructions
- Config exists but no sources: Helpful message with add_source command
See Also:
- add_source - Add new sources
- detect_source_state - Detailed compliance analysis
- normalize_source - Fix compliance issues
update_source
Purpose: Pull latest changes from Git for agent sources (runs git pull).
When to Use:
- Updating to latest agent versions
- Pulling team changes to shared sources
- Regular maintenance (weekly/monthly)
Parameters:
{ name?: string; // Optional: Specific source name(updates all if omitted)}Returns: Text summary of update results
Natural Language Examples:
"Update all agent sources""Pull latest changes for official-agents""Update the team-agents source"Update All Sources:
mcp__cami__update_source({})Response:
Updating official-agents... ✓ UpdatedUpdating team-agents... ✓ Up to dateUpdating my-agents...Updated: official-agentsSkipped (no git remote): my-agentsUpdate Specific Source:
mcp__cami__update_source({ name: "official-agents"})Response:
Updating official-agents... ✓ UpdatedUpdated: official-agentsUpdate Logic:
For each source:
- Check git enabled: Skip if
git.enabled = false - Run git pull: In source directory
- Check output: Detect "Already up to date" message
- Report status: Updated or already up-to-date
Git Configuration Required:
Only sources with Git configuration are updated:
agent_sources: - name: official-agents git: enabled: true remote: git@github.com:lando/agents.gitError Handling:
- Git pull fails: Logs error, continues with next source
- Source not found: Error if specific name provided
- No git remote: Skips source, reports in summary
After Updating:
Agent changes take effect immediately:
list_agentsshows new versionsdeploy_agentsuses updated contentscan_deployed_agentsdetects available updates
See Also:
- source_status - Check for uncommitted changes before updating
- scan_deployed_agents - Find projects needing updates
source_status
Purpose: Show Git working tree status for agent sources (uncommitted changes).
When to Use:
- Before updating sources (to avoid losing changes)
- Checking if you've modified source agents
- Auditing source cleanliness
Parameters: None
Returns: Text output showing git status for each source
Natural Language Examples:
"Check git status of agent sources""Do I have uncommitted changes in my sources?""Show source status"Response Example:
Agent Source Status:• official-agents Git: ✓ clean• team-agents Git: ⚠ 3 uncommitted changes M frontend.md M backend.md ?? new-agent.md ... and 0 more• my-agents Git: not enabledStatus Indicators:
- clean: No uncommitted changes (safe to update)
- N uncommitted changes: Modified/added files (review before updating)
- not enabled: Source has no Git configuration
Displayed Changes:
Shows up to 3 changed files using git's short format:
M file.md- ModifiedA file.md- AddedD file.md- Deleted?? file.md- Untracked
Use Case - Before Updating:
You: "Update all sources"Claude: "Let me check for uncommitted changes first..."[Runs source_status]Claude: "I see you have uncommitted changes in team-agents. Would you like to commit them before updating?"Error Conditions:
- Git command fails: Shows error for that source, continues with others
- Source path invalid: Shows error for that source
See Also:
- update_source - Pull latest changes
- list_sources - View all sources
detect_source_state
Purpose: Analyze an agent source for CAMI compliance issues.
When to Use:
- After adding a new source
- Before deploying from a source
- Auditing source quality
Parameters:
{ source_name: string; // Required: Name of source to analyze}Returns:
{ path: string; agent_count: number; is_compliant: boolean; missing_camiignore: boolean; issues: Array<{ agent_file: string; problems: string[]; // e.g., ["missing version", "missing description"] }>;}Natural Language Examples:
"Check compliance of team-agents source""Analyze official-agents for issues""Is my-agents source compliant?"Response Example (compliant):
# Source Analysis: official-agents**Path:** /Users/you/cami-workspace/sources/official-agents**Agent Count:** 15**Compliant:** true✓ **All agents are compliant!**Response Example (issues found):
# Source Analysis: team-agents**Path:** /Users/you/cami-workspace/sources/team-agents**Agent Count:** 8**Compliant:** falseMissing .camiignore file## Issues Found (3)**legacy-agent.md:** - missing version - missing description**old-helper.md:** - missing version**temp-script.md:** - missing description## Recommended ActionUse `normalize_source` to fix these issues automatically.Compliance Requirements:
For a source to be compliant:
- Has .camiignore file (optional but recommended)
- All agents have version:
version: "X.Y.Z"in frontmatter - All agents have description:
description: "..."in frontmatter
Common Issues:
- missing version: No
versionfield in YAML frontmatter - missing description: No
descriptionfield in YAML frontmatter - Missing .camiignore: No .camiignore file in source root
Why Compliance Matters:
Non-compliant agents can still be deployed, but:
- No version tracking (can't detect updates)
- Poor documentation (unclear purpose)
- Includes non-agent files (README.md, LICENSE, etc.)
Error Conditions:
- Source not found: Error with available source names
- Analysis fails: Error with details
See Also:
- normalize_source - Fix issues automatically
- list_sources - See all sources with compliance status
normalize_source
Purpose: Automatically fix compliance issues in an agent source.
When to Use:
- After detect_source_state reports issues
- Preparing a source for team use
- Migrating legacy agents to CAMI standards
Parameters:
{ source_name: string; // Required: Source to normalize add_versions: boolean; // Add "1.0.0" to agents missing version add_descriptions: boolean; // Add placeholder descriptions create_camiignore: boolean; // Create .camiignore file}Returns:
{ success: boolean; agents_updated: number; backup_path: string; // Where backup was created changes: string[]; // List of changes made}Natural Language Examples:
"Normalize team-agents source""Fix compliance issues in my-agents""Add missing versions to legacy-agents"Full Normalization:
mcp__cami__normalize_source({ source_name: "team-agents", add_versions: true, add_descriptions: true, create_camiignore: true})Response:
# Source Normalization: team-agents**Status:** ✓ Success**Agents Updated:** 3**Backup Created:** /Users/you/cami-workspace/sources/.backups/team-agents-20251124-103045## Changes Made- Added version "1.0.0" to legacy-agent.md- Added version "1.0.0" to old-helper.md- Added description to temp-script.md- Created .camiignore fileSelective Normalization:
// Only add versions, don't touch descriptionsmcp__cami__normalize_source({ source_name: "team-agents", add_versions: true, add_descriptions: false, create_camiignore: false})Backup Before Changes:
CAMI always creates a timestamped backup before normalization:
~/cami-workspace/sources/.backups/ team-agents-20251124-103045/ frontend.md backend.md legacy-agent.md ...Version Addition:
When add_versions: true, CAMI adds version: "1.0.0" to frontmatter:
Before:
---name: legacy-agentdescription: Helper for legacy systems---After:
---name: legacy-agentversion: "1.0.0"description: Helper for legacy systems---Description Addition:
When add_descriptions: true, CAMI adds placeholder based on name:
Before:
---name: api-helperversion: "1.0.0"---After:
---name: api-helperversion: "1.0.0"description: Agent for api-helper tasks (update this description)---Note: Placeholder descriptions should be updated manually with accurate information.
.camiignore Creation:
When create_camiignore: true, CAMI creates a standard .camiignore file:
# Documentation filesREADME.mdLICENSE.mdLICENSECHANGELOG.md# Drafts and work in progress*-draft.md*-wip.md*.draft*.wip# Templates and examplestemplates/examples/*.template# Hidden files.git/.github/.DS_Store# Config files*.json*.yaml*.ymlUndo Normalization:
If normalization goes wrong, restore from backup:
# Manual undocp -r ~/cami-workspace/sources/.backups/team-agents-20251124-103045/* \ ~/cami-workspace/sources/team-agents/Error Conditions:
- Source not found: Error with available source names
- Backup creation fails: Error (normalization cancelled)
- File write fails: Error with details
See Also:
- detect_source_state - Analyze before normalizing
- cleanup_backups - Remove old backups
Project Management Tools
add_location
Purpose: Register a project directory as a deployment location for quick reference.
When to Use:
- Adding frequently-used projects to quick access
- Organizing multiple project workspaces
- Setting up team's project list
Parameters:
{ name: string; // Required: Friendly location name path: string; // Required: Absolute path to project}Returns: Text confirmation
Natural Language Examples:
"Add my-app as a deployment location at ~/projects/my-app""Register this project directory""Save ~/projects/api-backend as 'api-backend'"Underlying Tool Call:
mcp__cami__add_location({ name: "my-app", path: "/Users/you/projects/my-app"})Response:
Added location 'my-app' at /Users/you/projects/my-appTotal locations: 3Config Update:
Adds entry to ~/cami-workspace/config.yaml:
deploy_locations: - name: my-app path: /Users/you/projects/my-app - name: api-backend path: /Users/you/projects/api-backendBenefits of Locations:
Without locations:
"Deploy frontend to /Users/you/projects/my-long-project-name-here"With locations:
"Deploy frontend to my-app" # Claude looks up pathValidation:
- Name uniqueness: Can't add duplicate names
- Path uniqueness: Can't add duplicate paths
- Path exists: Must be valid existing directory
- Absolute path: Relative paths rejected
Error Conditions:
- Name already exists: Error message
- Path already registered: Error message
- Path doesn't exist: Error with path
- Not a directory: Error message
See Also:
- list_locations - View saved locations
- remove_location - Unregister locations
list_locations
Purpose: View all registered deployment locations.
When to Use:
- Seeing what projects are registered
- Finding a project path by name
- Auditing saved locations
Parameters: None
Returns:
{ locations: Array<{ name: string; path: string; }>;}Natural Language Examples:
"What locations are configured?""Show me saved project directories""List deployment locations"Response Example:
Configured locations (3 total):• my-app /Users/you/projects/my-app• api-backend /Users/you/projects/api-backend• landing-page /Users/you/projects/landing-pageEmpty State:
Configured locations (0 total):No locations configured yet. Use add_location to register a project directory.Use in Deployment:
Claude can use location names instead of full paths:
You: "Deploy frontend to my-app"Claude: [Looks up "my-app" → /Users/you/projects/my-app] [Calls deploy_agents with full path]Error Conditions: None (always succeeds, returns empty list if no locations)
See Also:
- add_location - Register new locations
- remove_location - Unregister locations
remove_location
Purpose: Unregister a deployment location from CAMI configuration.
When to Use:
- Removing projects you no longer work on
- Cleaning up old/deleted projects
- Reorganizing location list
Parameters:
{ name: string; // Required: Location name to remove}Returns: Text confirmation
Natural Language Examples:
"Remove the my-app location""Unregister api-backend""Delete the landing-page location"Underlying Tool Call:
mcp__cami__remove_location({ name: "my-app"})Response:
Removed location 'my-app'Remaining locations: 2Important Notes:
- Only removes from config - doesn't delete project directory
- No impact on deployments - agents remain deployed in project
- Reversible - just add_location again to re-register
Error Conditions:
- Location not found: Error with available location names
- Name is empty: Error message
See Also:
- list_locations - View locations
- add_location - Re-register locations
create_project
Purpose: Create a new project with proper setup - directory structure, CLAUDE.md, and deployed agents.
When to Use:
- Starting a new project from scratch
- Setting up a project with recommended agents
- Creating a project with vision documentation
Parameters:
{ name: string; // Required: Project name(kebab-case for directory) path?: string; // Optional: Directory path(defaults to ~/projects/{name}) description: string; // Required: High-level project description(2-3 paragraphs) agent_names: string[]; // Required: Agents to deploy vision_doc?: string; // Optional: CLAUDE.md content(vision, not implementation)}Returns:
{ project_path: string; // Where project was created agents_deployed: string[]; // Successfully deployed agent names success: boolean;}Natural Language Examples:
"Create a new project called my-api-backend""Start a new React app with frontend and designer agents""Set up a project for building a dashboard"Recommended Workflow:
CAMI's tool description specifies a workflow that Claude should follow:
- Gather Requirements (AskUserQuestion):
- Project name
- Description (what it does, why it exists)
- Tech stack (React, Node.js, Python, etc.)
- Key features
- Review Available Agents (list_agents):
- See what specialists exist
- Recommend Agents:
- Based on tech stack and features
- Get user confirmation
- Create Missing Agents (if needed):
- Invoke agent-architect to create specialists
- Can create multiple agents in parallel
- Write Vision Doc:
- 200-300 words focused on vision
- What the project does and why
- NOT implementation details
- Create Project (this tool):
- With confirmed name, description, agents, vision
- Confirm Success:
- Show project path
- Guide to next steps
Example Interaction:
You: "Create a new project"Claude: "I'll help you create a new project. Let me gather some information..."[Uses AskUserQuestion to gather requirements]You: [Provides: "api-backend", "REST API for mobile app", "Node.js + PostgreSQL"]Claude: "Let me see what agents are available..."[Calls list_agents]Claude: "I recommend these agents for your Node.js API project: - backend (v2.1.0) - API development specialist - database (v1.5.0) - Database design expert - qa (v1.0.0) - Testing specialist Does this look good?"You: "Yes, looks great"Claude: [Creates project with create_project tool]Project Created Successfully!**Project**: api-backend**Location**: /Users/you/projects/api-backend**Agents Deployed**: 3**Deployed Agents:**- backend- database- qa**Next Steps:**1. Navigate to project: `cd /Users/you/projects/api-backend`2. Review CLAUDE.md for project vision3. Start building with your specialized agents!Project Structure Created:
~/projects/api-backend/├── .claude/│ ├── agents/│ │ ├── backend.md│ │ ├── database.md│ │ └── qa.md│ └── .cami/│ └── manifest.yaml└── CLAUDE.mdCLAUDE.md Contents:
If vision_doc is provided, that content is written. Otherwise, a minimal CLAUDE.md is created. Either way, the deployed agents section is added:
# api-backend[Vision doc content if provided...]<!-- CAMI-MANAGED: DEPLOYED-AGENTS | Last Updated: 2025-11-24T10:30:00Z -->## Deployed Agents### backend (v2.1.0)Back-end specialist for Node.js API development with database integration.### database (v1.5.0)Database design expert for PostgreSQL and data modeling.### qa (v1.0.0)Quality assurance and testing specialist.<!-- /CAMI-MANAGED: DEPLOYED-AGENTS -->Location Registration:
The project is automatically added to locations:
deploy_locations: - name: api-backend path: /Users/you/projects/api-backendError Conditions:
- Project directory already exists: Error (prevents accidental overwrite)
- Agents not found: Error with list of missing agents
- Directory creation fails: Error with details
See Also:
- deploy_agents - Deploy more agents later
- update_claude_md - Update documentation
Normalization & Utility Tools
detect_project_state
Purpose: Analyze a project's agent deployment state and normalization level.
When to Use:
- Auditing unknown projects
- Before normalizing a project
- Understanding project's CAMI integration level
Parameters:
{ project_path: string; // Required: Absolute path to project}Returns:
{ path: string; state: string; // Project state classification has_agents_dir: boolean; // Has .claude/agents/ has_manifest: boolean; // Has .claude/.cami/manifest.yaml agent_count: number; agents: Array<{ name: string; version: string; matches_source: string; // Source name if matched needs_upgrade: boolean; // True if newer version available }>; recommendations: { minimal_required: boolean; // Should create manifests standard_recommended: boolean; // Should link to sources full_optional: boolean; // Should rewrite with agent-architect };}Project State Classification:
- non-cami: No .claude/agents/ directory
- cami-aware: Has agents but no manifest
- cami-legacy: Has manifest but agents not linked to sources
- cami-native: Fully normalized with source tracking
Natural Language Examples:
"Analyze this project's CAMI state""What's the normalization status of ~/projects/my-app?""Check if this project needs normalization"Response Example (cami-aware):
# Project Analysis**Path:** /Users/you/projects/my-app**State:** cami-aware**Has Agents Directory:** true**Has Manifest:** false**Agent Count:** 3## Deployed Agents**frontend** (v2.0.1) - matches official-agents**backend** (v1.5.0) - matches official-agents (update available)**custom-helper** (no version) - not in sources## Recommendations✓ **Minimal normalization required:** Create manifests for tracking✓ **Standard normalization recommended:** Link agents to sourcesResponse Example (cami-native):
# Project Analysis**Path:** /Users/you/projects/my-app**State:** cami-native**Has Agents Directory:** true**Has Manifest:** true**Agent Count:** 3## Deployed Agents**frontend** (v2.0.1) - matches official-agents**backend** (v2.1.0) - matches official-agents**designer** (v1.1.0) - matches official-agents## Recommendations✓ **Project is fully normalized!**Normalization Levels:
- Minimal (create manifests):
- Creates .claude/.cami/manifest.yaml
- Enables basic tracking
- No source linking required
- Standard (link to sources):
- Minimal + source attribution
- Enables update detection
- Recommended for most projects
- Full (rewrite agents):
- Standard + agent-architect rewrite
- Ensures latest agent templates
- Optional, only if agents are very outdated
Source Matching:
CAMI tries to match deployed agents to sources by:
- Name matching
- Content hash comparison (exact match)
If matched:
matches_sourceshows source nameneeds_upgradeindicates if newer version available
Error Conditions:
- Project path doesn't exist: Error message
- Analysis fails: Error with details
See Also:
- normalize_project - Apply normalization
- import_agents - Import external agents
normalize_project
Purpose: Migrate a project to CAMI standards by creating manifests and linking agents to sources.
When to Use:
- After detect_project_state recommends normalization
- Bringing legacy projects into CAMI tracking
- Enabling update detection for deployed agents
Parameters:
{ project_path: string; // Required: Absolute path to project level: string; // Required: "minimal" | "standard" | "full"}Returns:
{ success: boolean; state_before: string; // State before normalization state_after: string; // State after normalization backup_path: string; // Where backup was created changes: string[]; // List of changes made undo_available: boolean; // Whether undo is possible}Natural Language Examples:
"Normalize this project""Apply standard normalization to ~/projects/my-app""Create manifests for agent tracking"Minimal Normalization:
mcp__cami__normalize_project({ project_path: "/Users/you/projects/my-app", level: "minimal"})What it does:
- Creates .claude/.cami/manifest.yaml
- Scans deployed agents
- Creates manifest entries (no source linking)
- Updates central manifest
Response:
# Project Normalization**Status:** ✓ Success**State Before:** cami-aware**State After:** cami-legacy**Backup Created:** /Users/you/projects/my-app/.claude/.cami/.backups/20251124-103045## Changes Made- Created project manifest- Added 3 agents to manifest- Updated central deployment trackingStandard Normalization:
mcp__cami__normalize_project({ project_path: "/Users/you/projects/my-app", level: "standard"})What it does:
- Everything in minimal
- Matches agents to sources by name + content hash
- Adds source attribution and priority
- Enables update detection
Response:
# Project Normalization**Status:** ✓ Success**State Before:** cami-aware**State After:** cami-native**Backup Created:** /Users/you/projects/my-app/.claude/.cami/.backups/20251124-103045## Changes Made- Created project manifest- Matched 2 agents to sources: - frontend → official-agents (priority 50) - backend → official-agents (priority 50)- Marked 1 agent as external: - custom-helper (no source match)- Updated central deployment tracking**Undo available:** Use backup.RestoreFromBackup to revert changesFull Normalization:
WARNING: Full normalization is destructive - it rewrites agent files.
mcp__cami__normalize_project({ project_path: "/Users/you/projects/my-app", level: "full"})What it does:
- Everything in standard
- Invokes agent-architect to rewrite agents
- Uses latest agent templates
- Overwrites agent content
When to use full:
- Agents are very outdated (old template format)
- Migrating from pre-frontmatter agents
- Standardizing agents across team
When NOT to use full:
- Agents have custom modifications
- Recent agents (already using current templates)
- Unsure about impact (use minimal/standard first)
Backup Protection:
Before any normalization, CAMI creates a timestamped backup:
.claude/.cami/.backups/20251124-103045/ agents/ frontend.md backend.md custom-helper.md manifest.yaml # If existedState Transitions:
non-cami → [normalize minimal] → cami-legacycami-aware → [normalize minimal] → cami-legacycami-aware → [normalize standard] → cami-nativecami-legacy → [normalize standard] → cami-nativeError Conditions:
- Invalid level: Error with valid options
- Project path doesn't exist: Error message
- Backup creation fails: Error (normalization cancelled)
See Also:
- detect_project_state - Analyze before normalizing
- cleanup_backups - Remove old backups
cleanup_backups
Purpose: Remove old backup directories to free disk space.
When to Use:
- Backup count exceeds threshold (10+)
- Low disk space
- Regular maintenance (monthly)
Parameters:
{ target_path: string; // Required: Project path or source path keep_recent: number; // Required: Number of backups to keep(default: 3)}Returns:
{ removed_count: number; freed_bytes: number; kept_backups: string[]; // Paths to remaining backups}Natural Language Examples:
"Clean up old backups""Remove old backups, keep the 3 most recent""Free up space by deleting old backups"Underlying Tool Call:
mcp__cami__cleanup_backups({ target_path: "/Users/you/projects/my-app", keep_recent: 3})Response Example:
# Backup Cleanup**Total Backups:** 15**Total Size:** 12.50 MB## Cleanup Results**Removed:** 12 backups**Freed:** 10.00 MB**Kept:** 3 backups**Remaining backups:**- 20251124-103045- 20251123-150230- 20251122-091500When No Cleanup Needed:
# Backup Cleanup**Total Backups:** 2**Total Size:** 1.80 MBNo cleanup needed - only 2 backups exist (keeping 3)Backup Locations:
For projects:
<project>/.claude/.cami/.backups/ 20251124-103045/ 20251123-150230/ ...For sources:
~/cami-workspace/sources/.backups/ team-agents-20251124-103045/ team-agents-20251123-150230/ ...Cleanup Logic:
- List all backups: In target's .backups/ directory
- Sort by timestamp: Newest first
- Keep N most recent: Based on keep_recent parameter
- Delete older backups: Recursively remove directories
- Calculate freed space: Sum of deleted backup sizes
Safety:
- Never deletes the most recent backup (even if keep_recent=1)
- Validates backup directory structure before deletion
- Returns error if deletion fails (doesn't partially delete)
Error Conditions:
- Target path doesn't exist: Error message
- No backups found: Returns "No cleanup needed"
- Deletion fails: Error with details
See Also:
- normalize_project - Creates backups
- normalize_source - Creates backups
onboard
Purpose: Get personalized onboarding guidance based on current CAMI setup state.
When to Use:
- User is new to CAMI
- User asks "what should I do next?"
- User seems uncertain about workflow
Parameters: None
Returns:
{ state: { config_exists: boolean; is_fresh_install: boolean; source_count: number; location_count: number; has_agent_architect: boolean; total_agents: number; deployed_agents: number; recommended_next: string; // Personalized next step };}Natural Language Examples:
"Help me get started with CAMI""What should I do next?""I'm new to CAMI"Fresh Install Response:
# Welcome to CAMI!I see this is a fresh installation. Let me guide you through getting started.## Your CAMI Setup**CAMI Workspace** (Agent Building): `~/cami-workspace/` → Where agent sources and configuration live → Manage and create agents globally**Development Workspace** (Projects): `~/projects/` → Where your projects live → Where agents get deployed---## Three Paths Forward**Path 1: Add Agent Library** (Recommended for new users) → Get pre-built professional agents from a Git repository → I can help you find and add agent sources → Tell me: 'Add agent source from <git-url>'**Path 2: Create Custom Agents** → Work with agent-architect to build specialized agents → Best if you have specific needs → Tell me: 'Create a new agent for [task]'**Path 3: Import Existing Agents** → Already have agents deployed in other projects? → I can scan and track them in CAMI → Tell me: 'Import agents from [project-path]'**Which path interests you?**Configured Installation Response:
# CAMI Setup Status## Your CAMI Setup**CAMI Workspace**: `~/cami-workspace/` → Where agent sources and config live**Development Workspace**: `~/projects/` → Where your projects live**Tracked Projects**: 3 → Projects CAMI knows about---## Agent Sources✓ 2 source(s) configured✓ 15 agents available## Available AgentsYou have access to 15 agents.- Use `mcp__cami__list_agents` to see all available agents- Use `mcp__cami__deploy_agents` to add agents to projects## Deployed Agents (Current Project)**No agents deployed in this project yet**## Quick Commands**List agents:** `mcp__cami__list_agents`**Deploy agents:** `mcp__cami__deploy_agents`**Scan current project:** `mcp__cami__scan_deployed_agents`**Add agent source:** `mcp__cami__add_source`**Update sources:** `mcp__cami__update_source`**Recommended next step:** Deploy agents to current projectFresh Install Detection:
CAMI considers an installation "fresh" if:
- Config exists but
setup_complete: false - Only has default "my-agents" source with no git
- No agents loaded
- No locations tracked
Personalized Recommendations:
CAMI analyzes your state and suggests the most relevant next step:
- No sources - "Add agent sources"
- Sources but no agents - "Add agent sources or create agents"
- Agents available but none deployed - "Deploy agents to current project"
- Agents deployed - "Explore and manage your agents"
Error Conditions: None (always succeeds with current state)
See Also:
- add_source - Path 1 (add libraries)
- create_project - Path 2 (new projects)
- import_agents - Path 3 (import existing)
Complete Tool Reference
Agent Management
| Tool | Purpose | Parameters | Key Use Case |
|---|---|---|---|
| list_agents | Discover available agents | None | "What agents are available?" |
| deploy_agents | Copy agents to projects | agent_names, target_path, overwrite | "Deploy frontend to my-app" |
| scan_deployed_agents | Audit deployed agents | target_path | "What agents are deployed here?" |
| update_claude_md | Document deployed agents | target_path | "Update project documentation" |
| import_agents | Track external agents | project_path, dry_run | "Import agents from legacy project" |
Source Management
| Tool | Purpose | Parameters | Key Use Case |
|---|---|---|---|
| add_source | Clone agent repository | url, name, priority | "Add agent source from git@..." |
| list_sources | View configured sources | None | "What sources are configured?" |
| update_source | Pull latest from Git | name (optional) | "Update all sources" |
| source_status | Check Git status | None | "Do sources have uncommitted changes?" |
| detect_source_state | Analyze compliance | source_name | "Check team-agents for issues" |
| normalize_source | Fix compliance issues | source_name, flags | "Fix compliance in team-agents" |
Project Management
| Tool | Purpose | Parameters | Key Use Case |
|---|---|---|---|
| add_location | Register project | name, path | "Save this project for quick access" |
| list_locations | View saved locations | None | "What projects are registered?" |
| remove_location | Unregister project | name | "Remove old-project location" |
| create_project | Initialize new project | name, description, agents, vision | "Create a new React app project" |
Normalization & Utility
| Tool | Purpose | Parameters | Key Use Case |
|---|---|---|---|
| detect_project_state | Analyze project state | project_path | "What's this project's CAMI state?" |
| normalize_project | Migrate to CAMI standards | project_path, level | "Normalize this project" |
| cleanup_backups | Remove old backups | target_path, keep_recent | "Clean up old backups" |
| onboard | Get setup guidance | None | "What should I do next?" |
Common Workflows
First-Time Setup
1. User: "Help me get started with CAMI" Tool: onboard2. User: "Add agent source from git@github.com:lando/agents.git" Tool: add_source3. User: "What agents are available?" Tool: list_agents4. User: "Deploy frontend and backend to ~/projects/my-app" Tool: deploy_agents5. User: "Update the documentation" Tool: update_claude_mdCreating a New Project
1. User: "Create a new project" [Claude uses AskUserQuestion to gather requirements]2. Tool: list_agents (Claude checks available specialists)3. [Claude recommends agents based on requirements] User confirms4. Tool: create_project Result: Project created with agents and CLAUDE.mdUpdating Deployed Agents
1. User: "Update my agents" Tool: scan_deployed_agents (check current versions)2. Tool: update_source (pull latest from Git)3. Tool: scan_deployed_agents (verify updates available)4. Tool: deploy_agents (with overwrite=true)5. Tool: update_claude_md (document new versions)Migrating a Legacy Project
1. User: "Bring this project into CAMI" Tool: detect_project_state (analyze current state)2. [Claude shows analysis and recommendations]3. User: "Normalize it" Tool: normalize_project (level: "standard")4. Tool: scan_deployed_agents (verify normalization)5. Tool: update_claude_md (document agents)Source Compliance Fix
1. Tool: add_source (clone new source) Response: "This source has compliance issues"2. Tool: detect_source_state (detailed analysis)3. User: "Fix the issues" Tool: normalize_source (add versions, descriptions, .camiignore)4. Tool: list_sources (verify compliance: ✓)Natural Language Interface
How Claude Interprets Your Requests
Deployment Requests:
"Deploy frontend to my-app"→ Looks up "my-app" in locations→ Calls deploy_agents with full path"Add designer to this project"→ Uses current working directory→ Calls deploy_agents"Update frontend and backend"→ Interprets as deploy with overwrite=true→ Calls deploy_agents with overwrite=trueSource Management:
"Add agent source from <url>"→ Calls add_source with URL→ Auto-detects compliance→ Suggests normalize_source if needed"Update all sources"→ Calls update_source with no name→ Updates all git-enabled sources"Pull latest changes for team-agents"→ Calls update_source with name="team-agents"Project Management:
"Create a new project"→ Asks questions to gather requirements→ Calls list_agents to check availability→ Recommends agents→ Calls create_project with user-confirmed agents"What projects are registered?"→ Calls list_locationsInformation Requests:
"What agents are available?"→ Calls list_agents"What's deployed in this project?"→ Calls scan_deployed_agents"What should I do next?"→ Calls onboardContext-Aware Behavior
Claude uses context to infer parameters:
Current Directory:
You: [In ~/projects/my-app]You: "What agents are deployed here?"Claude: [Calls scan_deployed_agents with current directory]Location Names:
You: "Deploy frontend to my-app"Claude: [Looks up "my-app" in locations] [Uses full path: /Users/you/projects/my-app] [Calls deploy_agents]Implicit Overwrite:
You: "Update the frontend agent"Claude: [Interprets "update" as overwrite=true] [Calls deploy_agents with overwrite=true]Error Recovery:
Tool: deploy_agents fails (agent not found)Claude: "The 'frontent' agent doesn't exist. Did you mean 'frontend'?" [Suggests correction based on list_agents]Error Handling
Common Error Patterns
Agent Not Found:
Error: "agents not found: ['frontent']"Claude's response:
I couldn't find the 'frontent' agent. Did you mean 'frontend'?Available agents: frontend, backend, designer, qaPath Validation Errors:
Error: "invalid target path: path does not exist: /Users/you/projects/typo"Claude's response:
The path /Users/you/projects/typo doesn't exist.Did you mean one of these registered locations?- my-app: /Users/you/projects/my-app- api-backend: /Users/you/projects/api-backendConflict Errors:
{ results: [{ agent_name: "frontend", success: false, conflict: true, message: "File already exists (use overwrite=true to replace)" }]}Claude's response:
The frontend agent is already deployed. Would you like me to:1. Overwrite with the latest version2. Keep the existing version3. Compare the versions firstNo Sources Configured:
Error: "no agent sources configured - run 'cami source add <git-url>'"Claude's response:
You don't have any agent sources configured yet.I can help you add an agent source! Just tell me:- The Git URL of your agent repositoryOr if you don't have one, I can guide you through creating custom agents.Error Recovery Strategies
Claude uses multiple strategies to recover from errors:
- Spelling Correction: Fuzzy matching on agent names
- Path Suggestion: Offers registered locations when path invalid
- Clarification Questions: Asks for missing information
- Alternative Solutions: Suggests different approaches
- Setup Guidance: Detects setup issues and offers onboarding
Advanced Topics
Priority-Based Source Resolution
When multiple sources contain the same agent name, CAMI uses priority-based deduplication:
agent_sources: - name: my-agents priority: 10 # Highest priority - name: team-agents priority: 50 # Medium priority - name: official-agents priority: 100 # Lowest priorityResolution Example:
All three sources have "frontend.md":
my-agents/frontend.md(v3.0.0-custom)team-agents/frontend.md(v2.5.0-team)official-agents/frontend.md(v2.0.1)
list_agents returns:
• frontend (v3.0.0-custom) [From my-agents source]deploy_agents deploys my-agents/frontend.md (priority 10 wins).
Use Cases:
- Personal Overrides (priority 1-10):
- Customized versions of team agents
- Experimental modifications
- Project-specific adaptations
- Team Standards (priority 20-40):
- Company-approved agents
- Shared best practices
- Team conventions
- Official Libraries (priority 50-100):
- Community agents
- Third-party libraries
- Default templates
Verification:
You: "Which frontend agent is active?"Claude: [Calls list_agents] [Shows: "frontend (v3.0.0-custom) from my-agents"]Manifest System
CAMI uses two manifest files to track agent deployments:
Project Manifest (.claude/.cami/manifest.yaml):
Tracks agents deployed in a specific project.
version: "1"state: cami-native # non-cami | cami-aware | cami-legacy | cami-nativenormalized_at: 2025-11-24T10:30:00Zagents: - name: frontend version: "2.0.1" source: official-agents # Source that provided this agent source_path: /Users/you/cami-workspace/sources/official-agents/frontend.md priority: 50 # Priority of source deployed_at: 2025-11-24T10:30:00Z content_hash: abc123def456... # SHA-256 of agent content metadata_hash: def456abc123... # SHA-256 of frontmatter origin: cami # "cami" | "external"Central Manifest (~/cami-workspace/central-manifest.yaml):
Tracks all deployments across all projects (global view).
deployments: /Users/you/projects/my-app: state: cami-native normalized_at: 2025-11-24T10:30:00Z last_scanned: 2025-11-24T10:30:00Z agents: - name: frontend version: "2.0.1" # ... same fields as project manifest /Users/you/projects/api-backend: state: cami-native normalized_at: 2025-11-24T10:35:00Z last_scanned: 2025-11-24T10:35:00Z agents: - name: backend version: "2.1.0" # ...Manifest States:
- non-cami: Project has no .claude/agents/ directory
- cami-aware: Has agents but no manifest
- cami-legacy: Has manifest but agents not linked to sources
- cami-native: Fully normalized with source tracking
Hash System:
Content Hash (SHA-256 of agent content):
- Includes entire file (frontmatter + markdown content)
- Used for exact-match detection
- Detects any content changes
Metadata Hash (SHA-256 of frontmatter only):
- Includes only YAML frontmatter
- Used for metadata-only change detection
- Ignores content changes
Use cases:
- Content hash different - Agent content changed
- Metadata hash different, content same - Only frontmatter changed
- Both same - Exact match to source
Workspace Organization
CAMI uses a structured workspace:
~/cami-workspace/ # Or $CAMI_DIR├── config.yaml # Global configuration├── central-manifest.yaml # All deployments tracking└── sources/ # Agent source repositories ├── official-agents/ │ ├── .camiignore │ ├── frontend.md │ ├── backend.md │ └── ... ├── team-agents/ │ ├── .camiignore │ └── ... └── .backups/ # Source normalization backups └── team-agents-20251124-103045/~/projects/ # Or custom projects dir└── my-app/ ├── .claude/ │ ├── agents/ # Deployed agents │ │ ├── frontend.md │ │ └── backend.md │ └── .cami/ │ ├── manifest.yaml # Project manifest │ └── .backups/ # Project normalization backups │ └── 20251124-103045/ └── CLAUDE.md # Project documentationEnvironment Variable:
Set CAMI_DIR to use a custom workspace location:
export CAMI_DIR=~/my-custom-cami-workspaceAll tools respect this environment variable.
Tool Design Patterns
Idempotent Operations
These tools can be run multiple times safely:
update_claude_md- Rewrites managed sectionscan_deployed_agents- Read-only analysislist_agents,list_sources,list_locations- Read-onlydetect_source_state,detect_project_state- Read-only analysis
Destructive Operations
These tools modify files/directories:
deploy_agents(with overwrite=true)normalize_source(modifies agent frontmatter)normalize_project(creates manifests, level=full rewrites agents)
Protection: All destructive operations create backups before changes.
Dry Run Support
Tools that support preview before execution:
import_agents(dry_run parameter)
Pattern:
1. Run with dry_run=true (preview)2. Review changes3. Run with dry_run=false (execute)Backup Strategy
CAMI creates timestamped backups before destructive operations:
Format: YYYYMMDD-HHMMSS (e.g., 20251124-103045)
Locations:
- Source backups:
~/cami-workspace/sources/.backups/ - Project backups:
<project>/.claude/.cami/.backups/
Retention:
- No automatic cleanup (use cleanup_backups)
- Recommended: Keep 3-5 most recent
MCP Server Configuration
To use these tools, configure CAMI in Claude Code's MCP settings.
Location: ~/.config/claude/mcp.json (or platform-specific config directory)
Configuration:
{ "mcpServers": { "cami": { "command": "cami", "args": ["--mcp"] } }}Restart Required: After changing MCP config, restart Claude Code.
Verification:
After configuration, Claude will have access to all 19 tools with mcp__cami__ prefix:
mcp__cami__list_agentsmcp__cami__deploy_agentsmcp__cami__add_source- etc.
Troubleshooting:
If tools aren't available:
- Check config syntax (valid JSON)
- Verify
camicommand is in PATH - Restart Claude Code
- Check logs in Claude Code's MCP console
See Also:
- Getting Started - Installation - Install CAMI
- Getting Started - Quick Start - Configure Claude Code
- CLI Commands Reference - Alternative CLI interface
Related Documentation
- CLI Commands Reference: Command-line alternatives to MCP tools
- Configuration Reference: Complete config.yaml specification
- Agent Frontmatter Spec: YAML frontmatter format for agents
- .camiignore Patterns: Exclude files from agent loading
Last Updated: 2025-11-24