Skip to main content
Glama
avivsinai

langfuse-mcp

get_prompt

Retrieve a prompt from Langfuse by name, with optional label or version. Returns prompt content, model config, and metadata.

Instructions

Fetch a specific prompt by name with resolved dependencies.

Retrieves a prompt from Langfuse with all dependency tags resolved. Uses the SDK's
built-in caching for optimal performance.

Args:
    ctx: Context object containing lifespan context with Langfuse client
    name: The name of the prompt to fetch
    label: Optional label to fetch (e.g., 'production'). Cannot be used with version.
    version: Optional specific version number. Cannot be used with label.

Returns:
    A dictionary containing the prompt details:
    - id: Unique prompt identifier
    - name: Prompt name
    - version: Version number
    - type: 'text' or 'chat'
    - prompt: The prompt content (string for text, list for chat)
    - labels: List of labels assigned to this version
    - tags: List of tags
    - config: Model configuration (temperature, model, etc.)

Raises:
    ValueError: If both label and version are specified
    LookupError: If prompt not found

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the prompt to fetch
labelNoLabel to fetch (e.g., 'production', 'staging'). Mutually exclusive with version.
versionNoSpecific version number to fetch. Mutually exclusive with label.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description fully carries the burden. It discloses caching behavior, mutual exclusivity validation, and error conditions (ValueError, LookupError), but does not cover authorization or side effects.

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

Conciseness4/5

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

The description is structured with Args, Returns, Raises sections and is front-loaded with the primary action. It is slightly verbose but not unnecessarily so, given the detail needed.

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

Completeness5/5

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

The description covers all essential aspects: purpose, parameters with constraints, return values with a detailed dict, and errors. With an output schema and clear sibling context, it is fully complete.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3. The description adds the mutual exclusivity note and raises section, but the schema already documents mutual exclusivity. Minimal added value beyond schema.

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?

The description clearly states 'Fetch a specific prompt by name with resolved dependencies,' using a specific verb and resource. It distinguishes from the sibling tool 'get_prompt_unresolved' by explicitly mentioning that dependencies are resolved.

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 that label and version are mutually exclusive and that caching is used, but it does not explicitly contrast with sibling tools or specify when to use this tool vs. 'get_prompt_unresolved'.

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/avivsinai/landfuse-mcp'

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