create_prompt
create_promptCreate or update prompt versions in Langfuse for text and chat types, managing labels and tags for LLM application observability.
Instructions
Creates a new version of a prompt. If the prompt name does not exist, a new prompt is created. If it does exist, a new version is appended. type values: text (plain string prompt) | chat (array of message objects). For text prompts, provide prompt as a plain string. For chat prompts, provide prompt as a JSON array of message objects with role and content fields. labels examples: production, staging, latest. The 'latest' label is managed by Langfuse automatically. Returns the created prompt version with its assigned version number. name, type, and prompt are required.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"type": "<type>",
"prompt": "<prompt>",
"labels": "<labels>",
"tags": "<tags>"
},
"name": "create_prompt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Prompt name. If it already exists, a new version is created. Required. | |
| type | Yes | Prompt type: text | chat. Required. | |
| prompt | Yes | Prompt content. Plain string for text type; JSON array of messages for chat type. Required. | |
| labels | Yes | Comma-separated labels to apply, e.g. production,staging. Omit to create without labels. | |
| tags | Yes | Comma-separated tags for organisation, e.g. summarisation,rag. Omit if no tags needed. |