Prompt
@tsed/platform-mcp
Usage
typescript
import { Prompt } from "@tsed/platform-mcp";See /packages/platform/platform-mcp/src/decorators/prompt.ts.
Overview
ts
function Prompt(options?: PromptDecoratorOptions): (target: any, propertyKey: string | symbol, _: PropertyDescriptor) => void;- options (
PromptDecoratorOptions): Optional. MCP prompt metadata such as name, description, and args schema.
Description
Declares a Ts.ED class method as an MCP prompt and registers it through {@link definePrompt}.
Usage
ts
class ConciergePrompts {
@Prompt()
async hotelWelcome() {
return {content: [{type: "text", text: "Welcome to Ts.ED Hotel!"}]};
}
}