PRD: Add Template MCP Tools
Project: ai-plans Date: 2026-02-12 Status: draft
Context
Currently, PRD and Tasks templates are stored in templates/ folder within the ai-plans project. When working in other projects, these templates are not accessible, making it difficult to maintain consistent PRD/Tasks structure across different projects.
The AI agent needs access to templates to generate properly structured PRD and Tasks documents, but currently relies on templates being in the local project.
Goals
- Make PRD and Tasks templates accessible from any project via MCP
- Centralize template management in ai-plans project
- Enable consistent document structure across all projects
- Simplify template updates (single source of truth)
Requirements
Functional
- Add
get_prd_templateMCP tool that returns PRD template content - Add
get_tasks_templateMCP tool that returns Tasks template content - Templates should be read from
templates/folder in ai-plans repo - Return templates as plain text (markdown)
- Update steering file to document new tools
Non-functional
- Fast response time (<100ms)
- No parameters needed (simple getter)
- Clear error messages if template files missing
Technical Approach
- Create new MCP tools:
mcp-server/src/tools/get-prd-template.ts-
mcp-server/src/tools/get-tasks-template.ts -
Implementation:
export async function getPrdTemplate(): Promise<string> { const templatePath = path.join(config.repoPath, 'templates/PRD.md'); return await fs.readFile(templatePath, 'utf-8'); } -
Register in server.ts:
- Add to tools list with schema
- Add to handler switch case
-
No parameters needed
-
Update steering file:
- Document new tools in
.kiro/steering/ai-plans-workflow.md -
Add workflow: call
get_prd_templatebefore creating PRD -
Workflow example:
User: "Create PRD for user-auth" AI: 1. Call get_prd_template() -> get template 2. Generate content based on template 3. Call publish_prd(project, task, content)
Constraints and Risks
- Templates must exist in
templates/folder - If template file is missing, tool should return clear error
- Templates are static (no variable substitution in MCP)
- AI agent responsible for filling in template values
Open Questions
- Should we add
get_notes_templateas well? - Should templates support variables/placeholders?
- Should we version templates?