Identity helper that locks in argsSchema inference for an inline prompt descriptor. Use
when writing prompts as array elements of prompts: McpPrompt[], where the array element
type otherwise falls back to the default ZodRawShapeCompat generic and widens the args
parameter passed to callback. Wrapping with define_mcp_prompt({...}) causes TS to solve
PromptArgsType from the literal argsSchema before checking the callback body, so args
is typed precisely against the declared shape.
Identity helper that locks in
argsSchemainference for an inline prompt descriptor. Use when writing prompts as array elements ofprompts: McpPrompt[], where the array element type otherwise falls back to the defaultZodRawShapeCompatgeneric and widens theargsparameter passed tocallback. Wrapping withdefine_mcp_prompt({...})causes TS to solvePromptArgsTypefrom the literalargsSchemabefore checking the callback body, soargsis typed precisely against the declared shape.