Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getmcp.com/llms.txt

Use this file to discover all available pages before exploring further.

The prompts/get method returns the fully rendered content of a prompt template. The server substitutes the provided argument values into the template and returns the result as a messages array ready to inject into a conversation.

MCP Endpoint

POST https://yoursite.com/mcp/{slug}
Content-Type: application/json

Request

jsonrpc
string
required
Must be "2.0".
id
integer | string
required
Arbitrary request identifier echoed back unchanged in the response.
method
string
required
Must be "prompts/get".
params.name
string
required
The prompt template name to retrieve (e.g. "write_product_description"). Must match a name from prompts/list.
params.arguments
object
Key-value pairs for the prompt’s defined arguments. Required arguments must be included or the call returns a validation error.
curl --request POST \
     --url https://yoursite.com/mcp/my-server \
     --header 'content-type: application/json' \
     --header 'Mcp-Session-Id: your_session_id' \
     --data '
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "prompts/get",
  "params": {
    "name": "write_product_description",
    "arguments": {
      "product_name": "Widget Pro",
      "key_features": "durable, lightweight, waterproof",
      "tone": "professional"
    }
  }
}
'

Response

result.description
string
The prompt’s description as configured.
result.messages
array
Array of message objects ready to inject into an AI conversation. Each message has:
  • role — Either "user" or "assistant"
  • content.type — Always "text" in the current implementation
  • content.text — The fully rendered prompt with all {{argument_name}} placeholders substituted
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "description": "Generate a compelling product description given product details",
    "messages": [
      {
        "role": "user",
        "content": {
          "type": "text",
          "text": "You are a product copywriter. Write a compelling product description for:\n\n**Product**: Widget Pro\n\n**Key Features**:\ndurable, lightweight, waterproof\n\n**Tone**: professional\n\nGuidelines:\n- Keep it under 150 words\n- Highlight the most important feature first\n- End with a clear call to action\n- Use professional language throughout"
        }
      }
    ]
  }
}

Request Parameters

params.name
string
required
The name of the prompt to retrieve. Must match a prompt name from prompts/list.
params.arguments
object
Key-value pairs to substitute into the prompt template. Required arguments (as defined in prompts/list) must be provided.