Skip to main content
Glama
therealsachin

Langfuse MCP Server

get_prompt_detail

Retrieve detailed information about a specific prompt template, including version history and labeling data, from Langfuse analytics.

Instructions

Get detailed information about a specific prompt template.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptNameYesThe prompt name to retrieve
versionNoSpecific version to retrieve (if not provided, gets latest)
labelNoSpecific label to retrieve

Implementation Reference

  • The async handler function that executes the tool logic: fetches prompt data from Langfuse client and returns formatted JSON or error.
    export async function getPromptDetail(
      client: LangfuseAnalyticsClient,
      args: GetPromptDetailArgs
    ) {
      try {
        const promptData = await client.getPrompt(args.promptName, args.version, args.label);
    
        return {
          content: [
            {
              type: 'text' as const,
              text: JSON.stringify(promptData, null, 2),
            },
          ],
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          content: [
            {
              type: 'text' as const,
              text: `Error getting prompt detail: ${errorMessage}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Zod schema for input validation of get_prompt_detail tool arguments.
    export const getPromptDetailSchema = z.object({
      promptName: z.string().describe('The prompt name to retrieve'),
      version: z.number().optional().describe('Specific version to retrieve (if not provided, gets latest)'),
      label: z.string().optional().describe('Specific label to retrieve'),
    });
  • src/index.ts:600-621 (registration)
    Tool descriptor registration in the listToolsRequestHandler, specifying name, description, and inputSchema.
    {
      name: 'get_prompt_detail',
      description: 'Get detailed information about a specific prompt template.',
      inputSchema: {
        type: 'object',
        properties: {
          promptName: {
            type: 'string',
            description: 'The prompt name to retrieve',
          },
          version: {
            type: 'number',
            description: 'Specific version to retrieve (if not provided, gets latest)',
          },
          label: {
            type: 'string',
            description: 'Specific label to retrieve',
          },
        },
        required: ['promptName'],
      },
    },
  • src/index.ts:1087-1090 (registration)
    Dispatch case in the CallToolRequestHandler switch statement that validates args with schema and invokes the handler.
    case 'get_prompt_detail': {
      const args = getPromptDetailSchema.parse(request.params.arguments);
      return await getPromptDetail(this.client, args);
    }
  • src/index.ts:71-71 (registration)
    Import statement bringing in the handler function and schema from the tool module.
    import { getPromptDetail, getPromptDetailSchema } from './tools/get-prompt-detail.js';
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states the basic action without details on permissions, rate limits, error handling, or response format. It doesn't address whether this is a read-only operation or if it has side effects, leaving significant gaps for an agent to understand how to use it safely.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it highly concise and well-structured for quick comprehension.

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

Completeness2/5

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

Given the complexity of a retrieval tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'detailed information' includes, how results are formatted, or any behavioral traits like pagination or error cases, leaving the agent with incomplete context for effective use.

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?

The input schema has 100% description coverage, so the schema fully documents the three parameters (promptName, version, label). The description adds no additional meaning beyond what's in the schema, such as examples or constraints, resulting in the baseline score of 3 for adequate but minimal value addition.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('detailed information about a specific prompt template'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'list_prompts' or 'get_model_detail', which would require explicit comparison to achieve a score of 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives such as 'list_prompts' for a broader view or 'get_model_detail' for related resources. It lacks any context about prerequisites, exclusions, or typical scenarios for application.

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/therealsachin/langfuse-mcp'

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