@afterxleep/doc-bot
Version:
Generic MCP server for intelligent documentation access in any project
48 lines (37 loc) • 1.79 kB
Plain Text
**Query**: `${query}`
**Results**: ${resultCount} matches found
${results}
${resultCount > 0 ? `
1. **Review** all results above for implementation patterns
2. **Use** \`read_specific_document\` for detailed code examples
3. **Apply** \`explore_api\` for comprehensive API documentation
4. **Validate** with \`check_project_rules\` before coding
**Priority Order**: Start with exact matches, then partial matches.` : `
1. **Refine Search**: Try single technical terms (e.g., "Widget" not "iOS widgets")
2. **Broaden Scope**: Search parent class/framework names
3. **Check Synonyms**: Auth → Authentication, DB → Database
4. **Framework Search**: If component failed, try framework name
**Developer Tip**: Search like you're reading an API index, not Google.`}
## 💻 IMPLEMENTATION GUIDANCE:
```javascript
// Found results? Follow this pattern:
if (results.length > 0) {
// 1. Read most relevant document
await read_specific_document(results[0].fileName);
// 2. Explore APIs if needed
if (results[0].type === 'API') {
await explore_api(results[0].name);
}
// 3. Check compliance rules
await check_project_rules(implementationTask);
} else {
// No results? Use general engineering knowledge for:
// - Standard algorithms (sorting, searching)
// - Language syntax (loops, conditionals)
// - Common patterns (MVC, REST)
// - Well-known libraries (React, Express)
}
```
**🚀 Next Action**: ${resultCount > 0 ? 'Read the top result to understand implementation details.' : 'Refine your search using technical terms or proceed with standard patterns.'}