Whatever message this page gives is out now! Go check it out!

Prompts

Last update:
May 18, 2026
Learn how to list and retrieve reusable prompt templates from an MCP server.
Prompts are server-defined templates that describe reusable workflows, often with arguments. They are useful when multiple clients or teams must reuse the same high-quality prompt logic.
  1. List available prompts using listPrompts().
    ADDITIONAL INFORMATION:
<cfscript>
    prompts = mcpClient.listPrompts();
    writeDump(prompts);
</cfscript>
  1. Retrieve a specific prompt definition using getPrompt().
    ADDITIONAL INFORMATION:
<cfscript>
    promptParams = {
        name      = "explain-code",
        arguments = {
            code     = "&lt;cfquery ...&gt;",
            language = "coldfusion"
        }
    };
    promptDef = mcpClient.getPrompt(promptParams);
    writeDump(promptDef);
</cfscript>
  1. The server returns a prompt definition that may include fully structured messages ready to send to a chat model.
Result
You can now retrieve centrally managed prompts and reuse them across AI workflows.

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page