[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3

Dynamic Arguments

Prompts8 min90 BASE XP

Parametrizing Context

Prompts achieve their power through arguments. Just like tools, you can use Zod to define what inputs a prompt requires.

server.prompt(
  "generate_report",
  { 
    department: z.string().describe("e.g. Sales, Marketing"),
    quarter: z.string().describe("e.g. Q1-2026")
  },
  ({ department, quarter }) => ({
    // Build context tailored to the department and quarter...
  })
);

When the user selects "Generate Report" in Claude Desktop, the UI will prompt them to type in the Department and Quarter before creating the message block.

SYNAPSE VERIFICATION
QUERY 1 // 3
How do you enforce strongly-typed arguments for a Prompt?
By using Zod schema definitions.
By using TypeScript interfaces.
It is not possible; Prompts only take raw text.
By throwing errors at runtime.
Watch: 139x Rust Speedup
Dynamic Arguments | Prompts — MCP Academy