codemap_routine_set_message
Set or update the message/comment for a routine.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
routineName | string | ✅ Required | Routine name |
message | string | ✅ Required | Message or comment text |
Usage Examples
MCP Usage (for AI Agents like Claude)
json
{
"name": "codemap_routine_set_message",
"arguments": {
"routineName": "deploy",
"message": "Production deployment workflow - ensure all tests pass before running"
}
}Example Output
JSON Response
json
{
"success": true,
"message": "Updated message for routine \"release-workflow\"."
}When to Use This Tool
-
Use
- Document the purpose or context of a routine
- Add workflow instructions or notes
- Update routine documentation as workflow evolves
- Explain why certain steps exist in the routine
- Provide guidance for users running the routine
- Record changes or updates to the workflow
codemap_routine_set_message when you need to:
Common Patterns
Document Routine Purpose
Record Workflow Changes
Add Usage Instructions
Set clear description:
codemap_routine_set_message({
routineName: "pre-release",
message: "Full pre-release checklist: audit dependencies, run tests, build production bundle, verify deployment config"
})Record Workflow Changes
Update message after refactoring:
codemap_routine_set_message({
routineName: "deploy-staging",
message: "Updated 2026-04-09: Migrated from Heroku to AWS ECS. Now includes container build and ECR push steps."
})Add Usage Instructions
Provide context for execution:
codemap_routine_set_message({
routineName: "emergency-rollback",
message: "⚠️ EMERGENCY USE ONLY: Rolls back to previous production version. Requires DB backup confirmation before running."
})Pro Tips
- Message visible in routine list: Shows up when calling
codemap_routine_listfor quick reference - Overwrites previous message: Each call replaces the existing message entirely
- Supports emoji and formatting: Use emojis (⚠️ 🚀 ✅) and markdown for better readability
- No character limit: Write detailed messages - they're for documentation not display constraints
- Consider as living documentation: Update message as routine evolves
Best Practices
- Write clear, concise messages that explain the routine's purpose
- Include version dates when documenting significant changes
- Use emojis strategically to highlight important warnings or notes
- Document required preconditions (e.g., "Requires production credentials")
- Explain when/why the routine should be run
- Link to external docs if routine is complex
- Update message whenever routine steps change significantly
Common Mistakes
❌ Mistake: Empty or vague message
✅ Instead: Be specific and informative
---
❌ Mistake: Setting message on non-existent routine
✅ Instead: Create routine first
---
❌ Mistake: Not updating message after major changes
✅ Instead: Update message when workflow changes
---
❌ Mistake: Documenting steps instead of purpose
✅ Instead: Explain purpose and context
---
❌ Mistake: Including sensitive information
✅ Instead: Reference credentials generically
---
❌ Mistake: Forgetting message is metadata only
✅ Instead: Use message for documentation, macros for execution
codemap_routine_set_message({
routineName: "deploy",
message: "Deploy stuff" // Not helpful
})✅ Instead: Be specific and informative
codemap_routine_set_message({
routineName: "deploy",
message: "Production deployment workflow: builds optimized bundle, runs security audit, deploys to AWS, notifies team"
})---
❌ Mistake: Setting message on non-existent routine
codemap_routine_set_message({
routineName: "build-v2", // Routine doesn't exist
message: "New build process"
})
// Error: Routine "build-v2" not found✅ Instead: Create routine first
codemap_routine_create({
name: "build-v2",
message: "New build process using esbuild"
})
// Message set during creation---
❌ Mistake: Not updating message after major changes
// Routine message: "Deploys to Heroku"
// But workflow now deploys to AWS
codemap_routine_add_macro({ routineName: "deploy", macroName: "aws-deploy" })
codemap_routine_remove_macro({ routineName: "deploy", macroName: "heroku-deploy" })
// Message is now outdated and misleading✅ Instead: Update message when workflow changes
codemap_routine_remove_macro({ routineName: "deploy", macroName: "heroku-deploy" })
codemap_routine_add_macro({ routineName: "deploy", macroName: "aws-deploy" })
codemap_routine_set_message({
routineName: "deploy",
message: "Deploys to AWS ECS (migrated from Heroku April 2026)"
})---
❌ Mistake: Documenting steps instead of purpose
codemap_routine_set_message({
routineName: "release",
message: "Runs build macro, then test macro, then deploy script"
})
// Just repeats what's visible in routine list✅ Instead: Explain purpose and context
codemap_routine_set_message({
routineName: "release",
message: "Production release workflow - ensures code quality through full build/test cycle before deployment. Run after PR approval."
})---
❌ Mistake: Including sensitive information
codemap_routine_set_message({
routineName: "deploy",
message: "Deploy to prod using API key: sk_live_abc123xyz..."
})
// API key exposed in routine metadata✅ Instead: Reference credentials generically
codemap_routine_set_message({
routineName: "deploy",
message: "Deploy to production - requires AWS_PROD_KEY environment variable (stored in 1Password)"
})---
❌ Mistake: Forgetting message is metadata only
codemap_routine_set_message({
routineName: "build",
message: "npm run build:prod" // Thinking this executes the command
})✅ Instead: Use message for documentation, macros for execution
// Documentation
codemap_routine_set_message({
routineName: "build",
message: "Production build - creates optimized bundle in /dist"
})
// Actual command execution
codemap_routine_add_macro({
routineName: "build",
macroName: "build-prod" // This runs npm run build:prod
})