retriEVAL

v1.0.0
io.github.hcarrillo001/retrieval-mcp Checked 21 hours ago Published 3 months ago

LLM evals as MCP tools: score outputs for faithfulness, relevancy, and hallucination.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_metrics

List built-in metrics and any custom metrics authored this session.

load_golden_set

Load a golden set from a file path, a JSON array string, or JSONL text. Field names are normalized (question->input, answer->actual_output, ground_truth->expected_output, contexts->context, passages->retrieval_context, ...).

ParameterTypeDescription
name *string
source *string
fmtstring

list_golden_sets

Show loaded golden sets and their sizes.

author_metric

Author a custom metric from a plain-language description (+ optional golden examples). The judge converts your criteria into explicit evaluation steps, which run as a G-Eval-style scorer in run_eval / evaluate_case.

ParameterTypeDescription
criteria *string
name *string
examples

run_eval

Run metrics over a set of cases. Pass `cases` with the data inline (JSON, JSONL, CSV or TSV text, or a file path) to score in a single call — nothing is stored server-side and no prior load is needed. Or pass `golden_set` to reuse a set loaded earlier with load_golden_set. Inline `cases` is preferred: named sets live only in this server process, are shared with anyone else using it, and are lost when it restarts. All cases are scored, but only the `limit` lowest-scoring cases are returned by default (3) to keep replies short; `total_cases`/`shown` tell you how…

ParameterTypeDescription
metrics *array
casesstring
generator_modelstring
golden_setstring
judge_modelstring
labelstring
limitinteger
outputs
thresholdnumber

show_run_cases

Page through the full per-case results of a saved run (the cases run_eval didn't show). Optionally sort by a single metric's score (worst first).

ParameterTypeDescription
limitinteger
metricstring
offsetinteger
run_idstring

get_budget

Current judge spend, the cap (RETRIEVAL_BUDGET_USD), and remaining headroom.

reset_budget

Reset the cumulative spend ledger to $0 (the cap itself is unchanged).

evaluate_case

Score a single output inline, without loading a golden set. The result is saved as a one-case run (golden set "inline") so it has a dashboard link; pass save=False to score without recording it.

ParameterTypeDescription
actual_output *string
input *string
metrics *array
context
expected_outputstring
retrieval_context
saveboolean
thresholdnumber

list_runs

List saved runs (most recent last) with their per-metric mean scores.

ParameterTypeDescription
golden_setstring
last_ninteger

plot_metric_trend

One metric's mean score across recent runs, with a threshold reference. fmt="markdown" (default) returns a rich markdown report (tables, inline bars, case strip, distribution); fmt="text" returns plain ASCII; fmt="image" returns a PNG line chart (only useful where images display).

ParameterTypeDescription
metric *string
fmtstring
golden_setstring
last_ninteger
show_rangeboolean
thresholdnumber

plot_run

Every metric's mean score for a single run (default: latest). fmt="markdown" (default) returns a rich markdown report (tables, inline bars, case strip, distribution); fmt="text" returns plain ASCII; fmt="image" returns a PNG bar chart (only useful where images display).

ParameterTypeDescription
fmtstring
golden_setstring
run_idstring
thresholdnumber

compare_runs

Compare several runs across all shared metrics. fmt="markdown" (default) returns a markdown matrix; fmt="text" returns plain ASCII; fmt="image" returns a PNG grouped-bar chart.

ParameterTypeDescription
fmtstring
golden_setstring
last_ninteger
run_ids
thresholdnumber

ground_against_url

Fetch a web page and check OUTPUT for *consistency* with it: faithfulness (every claim supported by the page) and, if a question is given, answer relevancy. Use it to ask "does my answer agree with what this page says?". IMPORTANT — this is NOT a correctness check. There are no labels here: the page is an unverified source, not ground truth. A high score means the output matches the page, not that either is right. The returned `caveat` says so on every call; surface it to the user.

ParameterTypeDescription
output *string
url *string
questionstring
thresholdnumber