Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

fix(mcp): Update score tool descriptions (#13936)

Ben Bachem1795468dc59a
diff --git a/web/src/features/mcp/features/scores/tools/createScore.ts b/web/src/features/mcp/features/scores/tools/createScore.ts
index ff62c6329d..f59977cdda 100644
--- a/web/src/features/mcp/features/scores/tools/createScore.ts
+++ b/web/src/features/mcp/features/scores/tools/createScore.ts
@@ -64,8 +64,10 @@ const CreateScoreBaseSchema = z.object({
export const [createScoreTool, handleCreateScore] = defineTool({
name: "createScore",
- description:
- "Create one score in the current Langfuse project using the v1 /api/public/scores route semantics. This is the v1 fallback because score creation has no v2 public route.",
+ description: [
+ "Create one score in the current Langfuse project.",
+ "Score reads are eventually consistent: after creation, getScore and listScores may not return the new score immediately. Wait briefly and retry reads when confirming creation.",
+ ].join("\n"),
baseSchema: CreateScoreBaseSchema,
inputSchema: PostScoresBodyV1,
destructiveHint: true,
diff --git a/web/src/features/mcp/features/scores/tools/getScore.ts b/web/src/features/mcp/features/scores/tools/getScore.ts
index e36ba285dd..5ce544c99c 100644
--- a/web/src/features/mcp/features/scores/tools/getScore.ts
+++ b/web/src/features/mcp/features/scores/tools/getScore.ts
@@ -11,8 +11,10 @@ import { ScoresApiService } from "@/src/features/public-api/server/scores-api-se
export const [getScoreTool, handleGetScore] = defineTool({
name: "getScore",
- description:
- "Fetch one score by ID from the current Langfuse project using the v2 /api/public/v2/scores/{scoreId} semantics. Returns the public score object directly.",
+ description: [
+ "Fetch one score by ID from the current Langfuse project.",
+ "Score reads are eventually consistent: a score created with createScore may not be returned by getScore immediately. If a newly created score is not found, wait briefly and retry.",
+ ].join("\n"),
baseSchema: GetScoreQueryV2,
inputSchema: GetScoreQueryV2,
handler: async (input, context) => {
diff --git a/web/src/features/mcp/features/scores/tools/listScores.ts b/web/src/features/mcp/features/scores/tools/listScores.ts
index 0822b26cfd..17999a3678 100644
--- a/web/src/features/mcp/features/scores/tools/listScores.ts
+++ b/web/src/features/mcp/features/scores/tools/listScores.ts
@@ -91,6 +91,7 @@ export const [listScoresTool, handleListScores] = defineTool({
"Find scores in Langfuse.",
"Use this to review quality, evaluation, or feedback scores for traces, observations, sessions, and dataset runs.",
"Filter by score details, time range, environment, source, trace information, or dataset run context to narrow the results.",
+ "Score reads are eventually consistent: a score created with createScore may not appear in listScores immediately. If a newly created score is missing, wait briefly and retry.",
].join("\n"),
baseSchema: ListScoresBaseSchema,
inputSchema: ListScoresInputSchema,