codemap_template_list
List all available code templates stored in the project
Usage Examples
MCP Usage (for AI Agents like Claude)
json
{
"name": "codemap_template_list",
"arguments": {}
}Example Output
JSON Response
json
{
"success": true,
"templates": [
{
"name": "mcp-tool",
"size": 1024,
"lastModified": "2026-04-11T12:30:45.123Z"
},
{
"name": "react-component",
"size": 756,
"lastModified": "2026-04-11T11:15:22.456Z"
}
],
"count": 2
}When to Use This Tool
-
Use
- Discover what templates are available in your project before deploying
- Verify a template exists before using it in a routine or deployment
- Audit your template library to see what scaffolding options exist
- Check template metadata like size and last modified date
- Document available templates for team onboarding
codemap_template_list when you need to:
Common Patterns
Pre-Deploy Check Pattern
Always verify template exists before attempting to deploy it.
Template Discovery Pattern
Use this to onboard team members to project scaffolding patterns.
1. codemap_template_list() to see available templates
2. codemap_template_deploy to use the templateAlways verify template exists before attempting to deploy it.
Template Discovery Pattern
1. New team member joins
2. codemap_template_list() to see what's available
3. Review template contents
4. Use templates for new featuresUse this to onboard team members to project scaffolding patterns.
Pro Tips
- Storage location: Templates are stored in
.codemap/templates/directory as.txtfiles - No parameters: This tool takes no parameters - it always shows all templates
- Metadata included: Response includes file size and last modified date for each template
- Fast operation: Listing templates is instant - safe to call frequently
- Empty is okay: Having zero templates is fine - you can still create them with
template_add
Best Practices
- Check template list before deploying to catch typos in template names
- Use template list in documentation to show team members what's available
- Review template metadata to identify outdated templates that need updates
- Combine with routine workflows to automate template discovery
- Keep template names descriptive and consistent (e.g.,
component-,api-,util-) - Document your templates in project README showing output of this command
Common Mistakes
â Mistake: Assuming a template exists without checking first
â Instead: Run
â Mistake: Forgetting where templates are stored
â Instead: Templates are always in
â Mistake: Not checking template list when deployment fails
â Instead: If deploy fails with "template not found", run
â Mistake: Creating templates with inconsistent naming (MCP-Tool, mcp_tool, mcptool)
â Instead: Use consistent kebab-case naming (mcp-tool, react-component, api-endpoint)
â Mistake: Not documenting available templates for the team
â Instead: Include template list output in project documentation so everyone knows what scaffolding exists
â Instead: Run
template_list before template_deploy to verify the template nameâ Mistake: Forgetting where templates are stored
â Instead: Templates are always in
.codemap/templates/ as .txt files - this tool shows what's thereâ Mistake: Not checking template list when deployment fails
â Instead: If deploy fails with "template not found", run
template_list to see the correct nameâ Mistake: Creating templates with inconsistent naming (MCP-Tool, mcp_tool, mcptool)
â Instead: Use consistent kebab-case naming (mcp-tool, react-component, api-endpoint)
â Mistake: Not documenting available templates for the team
â Instead: Include template list output in project documentation so everyone knows what scaffolding exists