@mcp-z/oauth
    Preparing search index...

    Interface McpPrompt

    MCP prompt module definition with configuration and handler function.

    Represents a registered prompt template in the Model Context Protocol server that can be retrieved and rendered by MCP clients. Prompts provide reusable templates for common interaction patterns.

    This is the runtime representation of an MCP prompt after registration. Unlike McpTool which executes operations, prompts generate templated content that clients can use to structure interactions.

    The handler receives optional arguments and returns a GetPromptResult containing the rendered prompt messages.

    const prompt: McpPrompt = {
    name: "draft-email",
    config: {
    description: "Generate email draft from key points",
    arguments: [{ name: "points", description: "Key points to include" }]
    },
    handler: async (args) => {
    const points = args?.points || [];
    return {
    messages: [{
    role: "user",
    content: { type: "text", text: `Draft email covering: ${points.join(", ")}` }
    }]
    };
    }
    };

    McpTool for tool module definition

    interface McpPrompt {
        config: unknown;
        handler: (args: unknown) => Promise<{ [key: string]: unknown }>;
        name: string;
    }
    Index

    Properties

    Properties

    config: unknown

    Prompt configuration (schema and metadata are prompt-specific)

    handler: (args: unknown) => Promise<{ [key: string]: unknown }>

    Async function that generates the prompt content

    name: string

    Unique prompt identifier (e.g., "draft-email", "summarize-thread")