https://github.com/ebowwa/structured-prompts
A modular package for managing structured prompts with any LLM API. Supports database storage, schema validation, and MCP integration.
https://github.com/ebowwa/structured-prompts
ai database llm mcp prompt-engineering prompts python schema-validation structured-data
Last synced: 3 days ago
JSON representation
A modular package for managing structured prompts with any LLM API. Supports database storage, schema validation, and MCP integration.
- Host: GitHub
- URL: https://github.com/ebowwa/structured-prompts
- Owner: ebowwa
- Created: 2024-12-31T22:19:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-13T00:58:57.000Z (4 months ago)
- Last Synced: 2026-02-13T10:20:30.790Z (4 months ago)
- Topics: ai, database, llm, mcp, prompt-engineering, prompts, python, schema-validation, structured-data
- Language: TypeScript
- Homepage: https://pypi.org/project/structured-prompts/
- Size: 171 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @ebowwa/structured-prompts
Minimal prompt template registry with MCP interface.
## Usage
```typescript
import { getStore, seedPrompts } from '@ebowwa/structured-prompts';
// Get store (optionally with file path)
const store = getStore('/path/to/prompts.json');
// Seed default prompts
seedPrompts('/path/to/prompts.json');
// CRUD operations
store.set('my-prompt', 'My Prompt', 'Template text here');
const prompt = store.get('my-prompt');
store.delete('my-prompt');
const all = store.list();
```
## MCP Interface
```bash
bun run src/index.ts
```
Runs as an MCP server with tools:
- `get_prompt` - Get prompt by ID
- `set_prompt` - Create/update prompt
- `list_prompts` - List all prompts
- `delete_prompt` - Delete prompt
## API
```typescript
interface Prompt {
id: string;
name: string;
template: string;
responseSchema?: Record;
metadata?: Record;
}
function getStore(file?: string): PromptStore;
function seedPrompts(file?: string): void;
async function runMcp(file?: string): Promise;
```
## License
MIT