Skip to main content
Glama
avivsinai

langfuse-mcp

create_dataset_item

Add or update input/expected output pairs in a dataset for LLM evaluation. Supports upsert with optional linking to traces and custom metadata.

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)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations provided, so description must disclose behavior fully. It covers the core upsert logic and return value, but omits side effects, error conditions, permissions, or rate limits. Minimal but acceptable for a create tool.

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?

Well-structured with a clear summary, Args list, and Returns section. Each sentence is informative, but the Args list is somewhat redundant with the schema. No unnecessary text, but could be trimmed slightly.

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?

Given 8 parameters and an output schema, the description explains the operation, all parameters, and return type. Lacks examples or edge cases, but the presence of an output schema reduces the need to detail return structure. Fairly comprehensive.

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 descriptions already cover all 8 parameters (100% coverage). The description's 'Args' section largely reiterates schema info, adding only slight context like the upsert behavior for item_id, which is already in schema. No significant extra meaning.

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 or updates a dataset item with upsert behavior, using specific verb+resource. It distinguishes from siblings like delete_dataset_item by describing both create and update functionality.

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?

Explains upsert behavior when item_id is provided, implying when to update vs create, but does not explicitly compare to sibling tools or provide exclusions (e.g., when to use delete_dataset_item instead). Lacks explicit when-to-use/ when-not-to-use guidance.

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