Commit a50bde8
feat: add markdown-based prompts support with auto-discovery tool (#5)
* feat: add markdown-based prompts support
- Add markdown prompt loader with frontmatter parsing using gray-matter
- Add 3 TimescaleDB-focused prompts: hypertable analysis, migration, and setup
- Update build process to copy .md files to dist directory
- Integrate with updated boilerplate supporting prompts capability
- Remove unused handlebars dependency
Prompts included:
- identifyHypertableCandidates: Analyze tables for hypertable conversion
- postgresHypertableMigration: Guide for migrating to hypertables
- timescaledbSetup: Complete TimescaleDB setup with compression and policies
* feat: add getPromptContent tool for auto-discovery
- Add MCP tool that dynamically discovers all available prompts
- Tool description includes comprehensive list of all prompts with descriptions
- Auto-generates enum of available prompts from markdown frontmatter
- Enables LLM auto-discovery of TimescaleDB guidance prompts
- Updated timescaledb setup prompt description to be more comprehensive
Benefits:
- LLM can automatically choose appropriate prompts based on user needs
- No need for users to explicitly know prompt names
- Stays in sync as new .md files are added
* refactor: rename tool from getPromptContent to getGuide
- Rename tool name to be more user-friendly and intuitive
- Update file name from getPromptContent.ts to getGuide.ts
- Clean up tool description by removing redundant text
- Update section header from 'Available Prompts' to 'Available Guides'
* refactor: simplify prompts architecture by removing factory pattern
- Replace factory-based approach with simple Map-based prompts loading
- Convert promptFactories to direct prompts Map with {name, title, description, content} structure
- Update getGuide tool to use prompts Map directly for O(1) lookup
- Simplify mcpServer and stdio to accept prompts Map instead of factories
- Remove PromptFactory, PromptDefinition, PromptConfig types from boilerplate
- Delete markdownLoader.ts and unused factory complexity
- Rename markdown files to camelCase naming convention
- Remove name field from frontmatter to establish single source of truth
- Both MCP prompts and getGuide tool now use same simple data source
- Fix YAML parsing by properly quoting description field
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: update boilerplate submodule to latest main
- Update boilerplate submodule to point to latest main with prompts support
- Maintain adapter pattern in stdio.ts to convert prompts Map to promptFactories
- Everything working correctly with both MCP prompts and getGuide tool
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent 1e54c34 commit a50bde8
File tree
10 files changed
+2005
-2
lines changed- src
- apis
- prompts
- md
10 files changed
+2005
-2
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
0 commit comments