Skip to main content
Glama
Log-LogN

langfuse-mcp-java

create_dataset_item

create_dataset_item
Destructive

Add or update items in Langfuse datasets to manage test cases, training data, and evaluation benchmarks for LLM applications.

Instructions

Creates or upserts a dataset item in an existing dataset. datasetName is required. inputJson, expectedOutputJson, and metadataJson must be valid JSON when provided. Optional sourceTraceId or sourceObservationId can link the item back to Langfuse data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
datasetNameYesDataset name to add the item to. Required.
inputJsonYesOptional item input payload as JSON.
expectedOutputJsonYesOptional expected output payload as JSON.
metadataJsonYesOptional metadata object as JSON.
sourceTraceIdYesOptional source trace ID.
sourceObservationIdYesOptional source observation ID.
itemIdYesOptional item ID for upsert semantics.
statusYesOptional item status, for example ACTIVE or ARCHIVED.
Behavior4/5

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

Description adds critical validation rules (JSON must be valid 'when provided') and explains semantic purpose of sourceTraceId/sourceObservationId (linking back to Langfuse data) that annotations don't provide. Destructive nature aligns with annotations.

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?

Four sentences structured logically: purpose statement, required field emphasis, validation constraints, and relationship context. No redundancy; every clause adds information not present in structured fields.

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?

Covers the upsert semantics (implied by 'Creates or upserts'), JSON string handling requirements, and Langfuse integration context. Does not mention 'status' or 'itemId' parameters explicitly, though itemId is implied by upsert mention. Adequate for 8-parameter mutation tool.

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

Parameters4/5

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

With 100% schema coverage, baseline is 3. Description adds value by specifying JSON validity requirements beyond the type declarations and explaining the Langfuse data lineage semantics for trace/observation IDs. Could explicitly mention itemId's role in upsert semantics and status enum values.

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?

Clear specific action ('Creates or upserts'), resource ('dataset item'), and constraint ('in an existing dataset'). Distinguishes from sibling create_dataset (creates the dataset itself vs item within it).

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?

Implies prerequisite (dataset must exist: 'in an existing dataset') and optionality of fields ('when provided', 'Optional'). Lacks explicit comparison to siblings like create_dataset_run_item or guidance on when to prefer get_dataset_item vs this tool.

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/Log-LogN/langfuse-mcp-java'

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