codemap_group_edit
Edit group name and/or description. At least one of newName or newDescription must be provided.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
name | string | ✅ Required | Group name to edit |
newName | string | ❌ Optional | New group name (optional) |
newDescription | string | ❌ Optional | New description (optional) |
Usage Examples
MCP Usage (for AI Agents like Claude)
json
{
"name": "codemap_group_edit",
"arguments": {
"name": "utils",
"newName": "utility-functions"
}
}Example Output
JSON Response
json
{
"success": true,
"message": "Group \"auth-system\" updated successfully",
"updated": {
"oldName": "auth-system",
"newName": "authentication-module",
"newDescription": "Core authentication and authorization - JWT, sessions, permissions, and OAuth integrations",
"memberCount": 5,
"notationCount": 3
}
}When to Use This Tool
-
Use
- Rename a group to better reflect its purpose
- Update group description as understanding of code organization evolves
- Fix typos in group names or descriptions
- Refine group naming conventions across the project
- Update group metadata without changing members
codemap_group_edit when you need to:
Common Patterns
Description Evolution
Naming Convention Migration
Incremental Refinement
Update description as project matures:
1. Initial: "Auth stuff"
2. Refined: codemap_group_edit({
name: "auth",
newDescription: "Authentication and authorization module - JWT, sessions, OAuth"
})
3. Production: Further refinements as system growsNaming Convention Migration
Standardize group names across project:
codemap_group_edit({ name: "UserMgmt", newName: "user-management" })
codemap_group_edit({ name: "apiRoutes", newName: "api-routes" })
codemap_group_edit({ name: "DB_Layer", newName: "data-layer" })Incremental Refinement
Update description only (keep name):
codemap_group_edit({
name: "payment-gateway",
newDescription: "Stripe and PayPal integration - handles subscriptions, one-time payments, refunds"
})Pro Tips
- At least one change required: Must provide newName, newDescription, or both - cannot call with no changes
- Rename checks for conflicts: Cannot rename to a name that already exists - prevents accidental overwrites
- Members stay intact: Editing name or description doesn't affect group members
- Notations preserved: All notations remain attached to the group through renames
- Case-sensitive names: Group names are case-sensitive - "API" and "api" are different groups
Best Practices
- Use descriptive, consistent naming conventions (kebab-case recommended: "api-layer" not "APILayer")
- Update descriptions to reflect current understanding of code organization
- Rename groups when refactoring to maintain alignment between code and metadata
- Batch rename operations when standardizing naming across many groups
- Document group renames in commit messages for project history
Common Mistakes
❌ Mistake: Trying to rename to an existing group name
✅ Instead: Delete or rename the conflicting group first
---
❌ Mistake: Calling edit with no changes
✅ Instead: Provide at least newName or newDescription
---
❌ Mistake: Assuming case-insensitive rename
✅ Instead: Understand group names are case-sensitive
---
❌ Mistake: Forgetting to update references after rename
✅ Instead: Update all references after rename
codemap_group_edit({ name: "api-old", newName: "api-routes" })
// Error: Group "api-routes" already exists✅ Instead: Delete or rename the conflicting group first
// Option 1: Delete conflicting group
codemap_group_delete({ name: "api-routes" })
codemap_group_edit({ name: "api-old", newName: "api-routes" })
// Option 2: Rename conflicting group to something else
codemap_group_edit({ name: "api-routes", newName: "api-routes-archived" })
codemap_group_edit({ name: "api-old", newName: "api-routes" })---
❌ Mistake: Calling edit with no changes
codemap_group_edit({ name: "api" }) // Error: No changes provided✅ Instead: Provide at least newName or newDescription
codemap_group_edit({
name: "api",
newDescription: "Updated description"
})---
❌ Mistake: Assuming case-insensitive rename
// Thinking this just changes case
codemap_group_edit({ name: "API", newName: "api" })
// Creates new "api" group, fails if it exists✅ Instead: Understand group names are case-sensitive
// This is actually a rename to a different name
// Check if lowercase version exists first
const groups = await codemap_group_list();
const hasLowercase = groups.data.groups.some(g => g.name === "api");
if (!hasLowercase) {
codemap_group_edit({ name: "API", newName: "api" })
}---
❌ Mistake: Forgetting to update references after rename
// Rename group but forget it's used in routine
codemap_group_edit({ name: "core-utils", newName: "utility-functions" })
// Routine still references old name and breaks
codemap_routine_run({ name: "build-workflow" })
// Error: Group "core-utils" not found✅ Instead: Update all references after rename
// Step 1: Rename group
codemap_group_edit({ name: "core-utils", newName: "utility-functions" })
// Step 2: Update routine that references it
// (Remove old group reference, add new one)
codemap_routine_remove_group({ name: "build-workflow", group: "core-utils" })
codemap_routine_add_group({ name: "build-workflow", group: "utility-functions" })