Skip to main content
Glama
Log-LogN

langfuse-mcp-java

create_prompt

create_prompt
Destructive

Create 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPrompt name. If it already exists, a new version is created. Required.
typeYesPrompt type: text | chat. Required.
promptYesPrompt content. Plain string for text type; JSON array of messages for chat type. Required.
labelsYesComma-separated labels to apply, e.g. production,staging. Omit to create without labels.
tagsYesComma-separated tags for organisation, e.g. summarisation,rag. Omit if no tags needed.
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations indicate destructiveHint=true and idempotentHint=false. The description adds valuable behavioral context not in annotations: automatic 'latest' label management by Langfuse, the append-only versioning behavior, and the return value structure. It confirms the mutation nature implied by annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is front-loaded with the core action, but includes redundancy with the schema (listing required fields that are already in the schema's required array). The structure is somewhat fragmented with format instructions interrupting the flow. The final sentence about required parameters is unnecessary given the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite lacking an output schema, the description compensates by stating the return value includes the 'created prompt version with its assigned version number.' It adequately covers the 5 parameters and explains the complex versioning behavior sufficient for invocation decisions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, baseline is 3. The description elevates this by providing concrete examples (labels: production, staging, latest), format specifications (JSON array for chat type), and clarifying the prompt content structure beyond the schema's basic type definitions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool 'Creates a new version of a prompt' with specific logic distinguishing new prompt creation from version appending. This effectively differentiates it from sibling tools like get_prompt (retrieval) and update_prompt_labels (metadata updates).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the internal versioning logic (existence check) and type selection (text vs chat), but lacks explicit guidance on when to use this versus siblings like update_prompt_labels or delete_prompt. No 'when-not-to-use' or alternative recommendations are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Log-LogN/langfuse-mcp-java'

If you have feedback or need assistance with the MCP directory API, please join our Discord server