/**
* Human Decision Prompt
*
* A prompt template for requesting human decision-making assistance
* in complex scenarios where automated systems need human judgment.
*/
import {
type PromptMessage,
type GetPromptResult,
type PromptArgument
} from '@modelcontextprotocol/sdk/types.js';
/**
* Arguments for the human decision prompt template
*/
export interface HumanDecisionArgs {
context: string;
options?: string;
urgency?: 'low' | 'medium' | 'high';
domain?: string;
}
/**
* Prompt definition for human decision-making assistance
*/
export const HUMAN_DECISION_PROMPT = {
name: 'human-decision',
description: 'Request human judgment and decision-making for complex scenarios where automated systems need guidance',
arguments: [
{
name: 'context',
description: 'The context or situation requiring human decision',
required: true
},
{
name: 'options',
description: 'Available options or choices (optional)',
required: false
},
{
name: 'urgency',
description: 'Urgency level: low, medium, or high',
required: false
},
{
name: 'domain',
description: 'Domain or area of expertise (e.g., technical, business, ethical)',
required: false
}
] as PromptArgument[]
} as const;
/**
* Generate the human decision prompt content
*
* @param args Arguments for prompt generation
* @returns Formatted prompt with messages
*
* @example
* ```typescript
* const result = await generateHumanDecisionPrompt({
* 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"
* });
* ```
*/
export async function generateHumanDecisionPrompt(args: HumanDecisionArgs): Promise<GetPromptResult> {
const { context, options, urgency = 'medium', domain } = args;
let promptText = `I need human judgment and decision-making assistance for the following scenario:
**Context:** ${context}`;
if (options) {
promptText += `\n\n**Available Options:**\n${options}`;
}
if (domain) {
promptText += `\n\n**Domain/Expertise:** ${domain}`;
}
promptText += `\n\n**Urgency Level:** ${urgency}`;
promptText += `\n\nPlease provide your analysis and recommendation, considering:
- The potential risks and benefits of each option
- Any additional factors I should consider
- Your reasoning for the recommended approach
- Any follow-up questions or clarifications needed`;
const messages: PromptMessage[] = [
{
role: 'user',
content: {
type: 'text',
text: promptText
}
}
];
return {
description: `Human decision-making assistance for: ${context.substring(0, 100)}${context.length > 100 ? '...' : ''}`,
messages
};
}