createScore
Create a score for a Langfuse trace or observation with numeric, boolean, or categorical types. Evaluate performance by providing a trace ID, score name, and value.
Instructions
Create a score for a trace or observation. Supports numeric, boolean, and categorical score types.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"traceId": "<traceId>",
"name": "<name>",
"value": "<value>"
},
"name": "createScore"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| traceId | Yes | ID of the trace to score | |
| observationId | No | Optional: ID of specific observation to score | |
| name | Yes | Name of the score (e.g., 'accuracy', 'relevance') | |
| value | Yes | Score value - numeric for NUMERIC type, string for CATEGORICAL/BOOLEAN | |
| dataType | No | Type of score value | |
| comment | No | Optional comment explaining the score | |
| configId | No | Optional score config ID for validation | |
| id | No | Optional custom ID for idempotency |