Skip to main content
Glama
avivsinai

langfuse-mcp

create_dataset_item

Add or update dataset items with input-output pairs for evaluating LLM applications in Langfuse. Supports upsert functionality with custom IDs and metadata linking.

Instructions

Create a new item in a dataset, or update if item_id already exists.

Dataset items store input/expected output pairs for evaluation. If item_id is provided and already exists, the item will be updated (upsert behavior). Args: ctx: Context object containing lifespan context with Langfuse client dataset_name: Name of the target dataset input: Input data for the item expected_output: Expected output for evaluation metadata: Optional custom metadata source_trace_id: Optional linked trace ID source_observation_id: Optional linked observation ID item_id: Optional custom ID (enables upsert) status: Item status (ACTIVE or ARCHIVED) Returns: A dictionary containing the created/updated item details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataset_nameYesName of the dataset to add the item to
inputNoInput data for the dataset item (any JSON-serializable value)
expected_outputNoExpected output data for evaluation (any JSON-serializable value)
metadataNoOptional custom metadata as key-value pairs
source_trace_idNoOptional trace ID to link this item to
source_observation_idNoOptional observation ID to link this item to
item_idNoOptional custom ID for the item (for upsert behavior)
statusNoItem status (default: ACTIVE)

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