# AskMeMCP Prompts
This directory contains MCP prompt implementations for the AskMeMCP server. Prompts are templates that clients can use to generate structured requests for human input.
## Available Prompts
### 1. Human Decision (`human-decision`)
Request human judgment and decision-making for complex scenarios where automated systems need guidance.
**Arguments:**
- `context` (required): The context or situation requiring human decision
- `options` (optional): Available options or choices
- `urgency` (optional): Urgency level (low, medium, high)
- `domain` (optional): Domain or area of expertise
**Example Usage:**
```typescript
const prompt = await client.getPrompt('human-decision', {
context: "Should we deploy the new feature to production?",
options: "1. Deploy immediately 2. Wait for more testing 3. Deploy to staging first",
urgency: "high",
domain: "technical"
});
```
### 2. Expert Consultation (`expert-consultation`)
Request expert human consultation on specialized topics requiring domain expertise.
**Arguments:**
- `topic` (required): The main topic or subject for consultation
- `expertise_area` (required): The specific area of expertise needed
- `specific_question` (optional): A specific question to be answered
- `background_info` (optional): Relevant background information or context
- `expected_outcome` (optional): What type of outcome or deliverable is expected
**Example Usage:**
```typescript
const prompt = await client.getPrompt('expert-consultation', {
topic: "Database performance optimization",
expertise_area: "Database Administration",
specific_question: "How can we improve query performance for large datasets?",
background_info: "PostgreSQL database with 10M+ records, complex joins causing timeouts",
expected_outcome: "Specific optimization recommendations and implementation steps"
});
```
### 3. Creative Brainstorm (`creative-brainstorm`)
Request human creativity and brainstorming for challenges that benefit from intuitive and lateral thinking.
**Arguments:**
- `challenge` (required): The creative challenge or problem to solve
- `goal` (optional): The desired goal or outcome
- `constraints` (optional): Any constraints or limitations to consider
- `target_audience` (optional): The target audience or users
- `inspiration_sources` (optional): Sources of inspiration or reference points
- `idea_count` (optional): Number of ideas desired (defaults to 7)
**Example Usage:**
```typescript
const prompt = await client.getPrompt('creative-brainstorm', {
challenge: "Design a mobile app for busy parents",
goal: "Help parents manage family schedules and tasks more efficiently",
constraints: "Limited screen time, must work offline",
target_audience: "Working parents with children aged 5-15",
inspiration_sources: "Successful productivity apps, family organizers",
idea_count: 8
});
```
## Implementation Details
### Prompt Structure
Each prompt follows the MCP protocol structure:
- `name`: Unique identifier for the prompt
- `description`: Human-readable description of what the prompt does
- `arguments`: Array of argument definitions with name, description, and required flag
### Generator Functions
Each prompt has a corresponding generator function that:
1. Takes typed arguments as input
2. Validates and processes the arguments
3. Returns a `GetPromptResult` with description and messages
4. Uses the `PromptMessage` format with role and content
### Message Format
All prompts return messages in the standard MCP format:
```typescript
{
role: 'user' | 'assistant',
content: {
type: 'text',
text: string
}
}
```
## Adding New Prompts
To add a new prompt:
1. Create a new file: `new-prompt.prompt.ts`
2. Define the prompt structure and arguments interface
3. Implement the generator function
4. Export the prompt and generator in `index.ts`
5. Add the prompt to the `ALL_PROMPTS` array
6. Add the generator to the `PROMPT_GENERATORS` map
7. Add tests in `prompts.spec.ts`
## Testing
Run the prompt tests with:
```bash
npx nx test askme-server
```
The test suite covers:
- Prompt structure validation
- Generator function behavior
- Message format compliance
- All argument combinations
- TypeScript type safety