Skip to content

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

1.6 KB
Raw Blame
import type { McpFeatureModule } from "../registry";
import { getScoreTool, handleGetScore } from "./tools/getScore";
import {
  getScoreConfigTool,
  handleGetScoreConfig,
} from "./tools/getScoreConfig";
import { listScoresTool, handleListScores } from "./tools/listScores";
import {
  listScoreConfigsTool,
  handleListScoreConfigs,
} from "./tools/listScoreConfigs";
import {
  createScoreConfigTool,
  handleCreateScoreConfig,
} from "./tools/createScoreConfig";
import { createScoreTool, handleCreateScore } from "./tools/createScore";
import {
  deleteScoreConfigTool,
  handleDeleteScoreConfig,
} from "./tools/deleteScoreConfig";
import {
  updateScoreConfigTool,
  handleUpdateScoreConfig,
} from "./tools/updateScoreConfig";

export const scoresFeature = {
  name: "scores",
  description:
    "Read scores and manage score configurations in the current Langfuse project",
  tools: [
    {
      definition: listScoresTool,
      handler: handleListScores,
    },
    {
      definition: getScoreTool,
      handler: handleGetScore,
    },
    {
      definition: createScoreTool,
      handler: handleCreateScore,
    },
    {
      definition: listScoreConfigsTool,
      handler: handleListScoreConfigs,
    },
    {
      definition: getScoreConfigTool,
      handler: handleGetScoreConfig,
    },
    {
      definition: createScoreConfigTool,
      handler: handleCreateScoreConfig,
    },
    {
      definition: updateScoreConfigTool,
      handler: handleUpdateScoreConfig,
    },
    {
      definition: deleteScoreConfigTool,
      handler: handleDeleteScoreConfig,
    },
  ],
} as const satisfies McpFeatureModule;