Skip to main content
Glama
avivsinai

langfuse-mcp

get_prompt

Retrieve a specific prompt by name with resolved dependencies from Langfuse. Use optional label or version parameters to fetch the desired prompt version.

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 carries full burden and does well: it discloses caching behavior ('Uses the SDK's built-in caching'), error conditions (ValueError, LookupError), and return format. However, it doesn't mention rate limits, authentication requirements, or whether this is a read-only operation (though 'fetch' implies it).

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 well-structured with clear sections (purpose, behavior, Args, Returns, Raises) and front-loads the core purpose. However, the Args section repeats schema information unnecessarily, and some sentences could be more concise (e.g., 'Retrieves a prompt from Langfuse with all dependency tags resolved' could be combined with the first sentence).

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?

Given the tool's moderate complexity, 100% schema coverage, and presence of an output schema (implied by the Returns section), the description is complete: it covers purpose, behavioral traits, parameter constraints, return values, and error conditions. No significant gaps exist for a fetch operation.

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 description coverage is 100%, so the schema already fully documents all parameters. The description repeats some parameter information in the Args section but doesn't add meaningful semantic context beyond what's in the schema. The baseline of 3 is appropriate when schema does all the work.

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 the tool's purpose with specific verbs ('fetch', 'retrieves') and resources ('prompt by name', 'from Langfuse'). It explicitly distinguishes from sibling 'get_prompt_unresolved' by mentioning 'resolved dependencies', and from 'list_prompts' by fetching a specific prompt rather than listing multiple.

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

Usage Guidelines5/5

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

The description provides explicit usage guidance: it states when to use this tool (to fetch a specific prompt with resolved dependencies) and includes clear exclusions (label and version are mutually exclusive). It also implicitly distinguishes from 'get_prompt_unresolved' by emphasizing resolved dependencies, and from 'list_prompts' by focusing on single-prompt retrieval.

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