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

getPrompt

Last update:
May 18, 2026
Retrieves the full, resolved definition of a specific prompt from the MCP server, optionally accepting argument values to produce a ready-to-use prompt payload.

Description

The getPrompt function retrieves the full, resolved definition of a specific prompt from the MCP server. While listPrompts() gives you a catalog of prompt names, titles, descriptions, and argument definitions, getPrompt lets you:
  • Fetch a prompt by name.
  • Optionally provide argument values.
  • Receive a fully constructed prompt payload (often including ready-to-use messages) that your application or AI service can send directly to a model.

Returns

A struct representing the JSON-RPC result of prompts/get.

Syntax

function getPrompt(struct params)
Called as an instance method on an MCP client object:
promptDef = mcpClient.getPrompt(params);

History

New in ColdFusion 2025.0.08

Parameters

getPrompt parameters
FieldData typeRequiredDescription
nameStringYesName of the prompt to fetch (must match one of the names returned by listPrompts()).
paramsStructNoKey/value pairs for prompt arguments (e.g. { code = "..." }); used to fill the template or generate messages.

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