Zod object schema for input validation (default: z.ZodObject<{}>)
OptionalcompleteOptional callback for argument autocompletion.
When provided, enables clients to request autocompletion suggestions for prompt arguments. The callback receives the argument name and current partial value, and returns matching suggestions.
Requires input schema to be defined — prompt arguments are derived
from the Zod schema fields. The SDK wraps each schema field with
completable() internally.
ReadonlydescriptionHuman-readable description shown to LLM
Generate prompt messages.
Array of messages
Optional ReadonlyinputZod object schema for argument validation.
The SDK automatically extracts argument names, descriptions, and
required status from the Zod schema. Use .describe() on fields
to provide human-readable descriptions.
ReadonlynameUnique prompt name
Optional ReadonlyrequiredScopes required to get this prompt (RBAC).
When set, the framework checks authInfo.scopes BEFORE
the generate handler executes. All listed scopes must be present (AND logic).
If the check fails, a 403 Forbidden error is returned.
Omit or set to undefined for prompts accessible to any authenticated user.
Prompt definition - the canonical type for MCP prompts.
Prompts generate pre-defined message sequences that guide LLM behavior. Use Zod schemas for type-safe argument handling.
Example