codemap_routine_remove
Universal tool to remove any item type from a routine (file, group, macro, template, help, or checklist item)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
routineName | string | ✅ Required | Routine name |
type | stringfile | group | macro | template | help | item | ✅ Required | Item type: "file", "group", "macro", "template", "help", or "item" |
identifier | string | ✅ Required | Item identifier (file path, group name, macro name, template name, help topic, or item ID) |
Usage Examples
MCP Usage (for AI Agents like Claude)
json
{
"name": "codemap_routine_remove",
"arguments": {
"routineName": "pre-commit",
"type": "file",
"identifier": "package.json"
}
}Example Output
JSON Response
json
{
"success": true,
"message": "File 'package.json' removed from routine 'pre-commit'",
"routineName": "pre-commit",
"type": "file",
"identifier": "package.json"
}When to Use This Tool
-
Use
- Clean up routine configuration by removing outdated items
- Remove any type of item from a routine with one universal tool
- Simplify routine maintenance with type-safe removal
- Update workflows by removing old references
codemap_routine_remove when you need to:
Common Patterns
Universal Cleanup Pattern
This tool replaces all specific remove tools (remove_file, remove_group, etc.).
Workflow Modernization Pattern
1. List routine to see current items
2. Identify items to remove
3. Use routine_remove for each item type
4. Verify routine still functions correctlyThis tool replaces all specific remove tools (remove_file, remove_group, etc.).
Workflow Modernization Pattern
1. Remove old templates
2. Remove deprecated macros
3. Remove outdated help topics
4. Add updated replacementsPro Tips
- Replaces specific tools: This universal tool replaces remove_file, remove_group, remove_macro, etc.
- Type validation: Tool validates item type and verifies existence before removal
- Preferred method: Use this over specific remove tools for consistency
- Future-proof: Specific remove tools will be deprecated in v0.3.0
Best Practices
- Use type-safe removal with explicit type parameter
- List routine contents before removing items
- Verify routine still works after removal
- Document why items were removed in commit messages
- Use this tool instead of specific remove_file, remove_group, etc. tools
- Test routine after removing critical items
Common Mistakes
❌ Mistake: Using old specific remove tools (remove_file, remove_group)
✅ Instead: Use this universal
❌ Mistake: Removing items without checking if they're still needed
✅ Instead: Review routine purpose and workflow before removing items
❌ Mistake: Wrong type parameter for the item being removed
✅ Instead: Use correct type: "file", "group", "macro", "template", "help", or "item"
❌ Mistake: Removing multiple items without testing in between
✅ Instead: Remove items incrementally and test routine functionality after each removal
❌ Mistake: Not verifying item identifier before removal
✅ Instead: List routine to confirm exact identifier (case-sensitive)
✅ Instead: Use this universal
routine_remove tool for all item types❌ Mistake: Removing items without checking if they're still needed
✅ Instead: Review routine purpose and workflow before removing items
❌ Mistake: Wrong type parameter for the item being removed
✅ Instead: Use correct type: "file", "group", "macro", "template", "help", or "item"
❌ Mistake: Removing multiple items without testing in between
✅ Instead: Remove items incrementally and test routine functionality after each removal
❌ Mistake: Not verifying item identifier before removal
✅ Instead: List routine to confirm exact identifier (case-sensitive)