Skip to content

definePrompt

@tsed/cli-mcp

Usage

typescript
import { definePrompt } from "@tsed/cli-mcp";

See /packages/cli-mcp/src/fn/definePrompt.ts.

Overview

ts
function definePrompt<Args extends undefined = any>(options: PromptProps<Args>): import("@tsed/di").FactoryTokenProvider<{
    argsSchema: import("zod").ZodObject<import("zod/v4/core").$ZodLooseShape, import("zod/v4/core").$strip> | undefined;
    handler: PromptCallback<Args>;
    description?: string | undefined;
    title?: string | undefined;
    name: string;
} | {
    argsSchema: import("zod").ZodObject<import("zod/v4/core").$ZodLooseShape, import("zod/v4/core").$strip> | undefined;
    handler: PromptCallback<Args>;
    description?: string | undefined;
    title?: string | undefined;
    name: string;
    token: Type | AbstractType<any>;
    propertyKey: string | symbol;
}>;

argsSchema: import

ts
argsSchema: import("zod").ZodObject<import("zod/v4/core").$ZodLooseShape, import("zod/v4/core").$strip> | undefined;

handler

ts
handler: PromptCallback<Args>;

description

ts
description?: string | undefined;

title

ts
title?: string | undefined;

name

ts
name: string;

ts
} | {

argsSchema: import

ts
argsSchema: import("zod").ZodObject<import("zod/v4/core").$ZodLooseShape, import("zod/v4/core").$strip> | undefined;

handler

ts
handler: PromptCallback<Args>;

description

ts
description?: string | undefined;

title

ts
title?: string | undefined;

name

ts
name: string;

token

ts
token: Type | AbstractType<any>;

propertyKey

ts
propertyKey: string | symbol;

Released under the MIT License.