GetPromptResult for clients to render or send as messages to a model.
Minimal prompt
Prompt metadata
- Prompts are discoverable and can be parameterized by clients.
- Use prompts to standardize instructions for common tasks across tools/apps.
GetPromptResult for clients to render or send as messages to a model.
import { Prompt } from '@frontmcp/sdk';
@Prompt({
name: 'Summarize',
title: 'Summarize Text',
description: 'Create a concise summary',
arguments: [{ name: 'text', description: 'Input text', required: true }],
})
export default class SummarizePrompt {
async execute(args: { text: string }) {
return {
description: 'Summarize the provided text',
messages: [
{ role: 'system', content: 'You are a concise assistant.' },
{ role: 'user', content: args.text },
],
};
}
}
@Prompt({
name: string,
title?: string,
description?: string,
arguments?: Array<{
name: string;
description?: string;
required?: boolean;
}>,
icons?: Icon[],
})
Was this page helpful?