Skip to main content
Glama

pdml-agent

Ein MCP-Server und Tool-Calling-Agent für die property-driven-ml-Experiment-Pipeline, mit einem Human-in-the-Loop-Gate für alles, das Rechenleistung verbraucht, und einer strukturierten Ablaufverfolgung jedes Aufrufs.

Property-driven ML trainiert Klassifikatoren gegen formal-logische Constraints, daher wird ein Lauf durch einen Constraint, einen Datensatz, eine differenzierbare Logik und einen Seed definiert und erzeugt Metriken pro Epoche für sowohl Vorhersageleistung als auch Constraint-Sicherheit. Das macht es zu einer wirklich werkzeugförmigen Domäne und nicht zu einer Demo-Domäne: Experimente können aufgelistet, Konfigurationen abgerufen, Ergebnisse gelesen, Läufe verglichen und neue Läufe geplant, genehmigt und ausgeführt werden.

Status: im Rahmen vollständig. Server, Agent, Gate, Ablaufverfolgung. Echte Ausführung auf CPU demonstriert.

Architektur

┌──────────────────────────────────────────────────────────────┐
│  agent.py                       (Anthropic SDK tool runner)  │
│                                                              │
│   claude-opus-5 ──► pending tool_use ──► ToolLedger.wrap     │
│        ▲                                   │  memoise (RO)  │
│        │                                   │  gate (compute)│
│        │ tool_result                       │  trace (JSONL) │
│        └───────────────────────────────────┘        │        │
└─────────────────────────────┬───────────────────────┼────────┘
                   MCP over stdio                     ▼
┌─────────────────────────────┴────────────────┐   traces/*.jsonl
│  server.py           (mcp MCPServer, thin)   │
│   list_experiments  get_experiment_config    │
│   get_results       compare_runs             │
│   search_logic_definitions                   │
│   run_experiment ──► PDML_ALLOW_EXECUTE=1 ?  │
└────┬───────────┬──────────────┬──────────────┘
     ▼           ▼              ▼
experiments.py  logic_defs.py  runner.py ──► subprocess: main.py
(read CSVs)     (parse source)  (plan/execute)   in property-driven-ml

agent.py weiß nichts über die Domäne. Es verbindet sich wie jeder andere MCP-Client über stdio mit dem Server und arbeitet nur mit den Werkzeugen, die der Server bereitstellt. Die Domänenmodule haben keine MCP-Abhängigkeit und sind durch Import testbar. server.py registriert nur Werkzeuge und delegiert.

Related MCP server: MLflow MCP Server

Layout

pdml_agent/
  experiments.py   reading and comparing runs
  logic_defs.py    searching the logic implementations
  runner.py        validating, planning and executing runs
  server.py        the MCP layer, deliberately thin
  agent.py         the agent: runner, gate, memoisation, tracing
scripts/
  make_fixtures.py generate sample runs
  smoke_test.py    start the server, exercise every tool, check refusals
  demo.py          run the agent on five tasks
fixtures/results/  sample runs, so nothing needs a GPU to demo
demo_output/       what the agent said and did, one JSON per task
traces/            one JSONL per run, every turn and every call

Werkzeuge

Werkzeug

Rückgabe

list_experiments

Läufe, filterbar nach Constraint, Datensatz oder Logik

get_experiment_config

Die Konfiguration, mit der ein Lauf tatsächlich trainiert wurde

get_results

Metriken für eine Epoche, standardmäßig die letzte

compare_runs

Config- und Metrik-Diff zwischen zwei Läufen

search_logic_definitions

Logik-Klassen, deren Operatoren und Docstrings

run_experiment

Mit dry_run=true ein validierter Befehlsplan; mit dry_run=false Ausführung hinter zwei Toren

Das Gate

run_experiment ist das einzige Werkzeug, das Rechenleistung verbraucht, und zwei unabhängige Dinge stehen davor.

Der Server führt nichts aus, es sei denn, er wurde mit PDML_ALLOW_EXECUTE=1 gestartet. Dies ist eine Entscheidung desjenigen, der den Server ausführt, und keine Anfrage kann sie ändern. Ohne diese Einstellung gibt dry_run=false status: refused mit dem angehängten Plan zurück, und es ist kein Fehler.

Der Agent sendet keine Ausführungsanfrage, ohne dass ein Betreiber den genauen Aufruf genehmigt. Der Genehmigungsdialog zeigt den Werkzeugnamen und die vollständigen Argumente als JSON, nicht eine Zusammenfassung. Eine Ablehnung gibt ein normales Ergebnis mit declined_by_operator zurück, und das Modell wird angewiesen, dies zu melden und anzuhalten, anstatt es erneut zu versuchen.

Jede Schicht allein würde einen unerwünschten Lauf stoppen. Beide zusammen bedeuten, dass keine perfekt sein muss. Die Richtlinie, die entscheidet, was einer Genehmigung bedarf, ist eine Funktion, needs_approval, klein genug, um auf einen Blick gelesen zu werden.

Die Ablaufverfolgung

Jeder Lauf hängt an traces/<timestamp>-<question>.jsonl an. Eine Zeile pro Ereignis, niemals überschrieben.

turn-Einträge führen die Schrittnummer, den Stop-Grund des Modells, dessen Text- und Denkzusammenfassung, die Aufrufe, die es gerade tätigen wird, und die Token-Nutzung dieses Turns auf. tool_call-Einträge führen das Werkzeug, seine Argumente, ob der Aufruf erfolgreich war, aus dem Cache kam oder gegatet wurde, seine Latenz, eine Zusammenfassung des Ergebnisses und den eigenen angegebenen Grund des Modells, entnommen aus dem Satz, den es neben dem Aufruf geschrieben hat. gate-Einträge führen die Entscheidung auf. run_start und run_end klammern dies mit Summen ein.

Die Systemaufforderung bittet das Modell, in einem Satz zu erklären, warum es jeden Aufruf tätigt – und es tut es. Aus der Ablehnungspfad-Ablaufverfolgung:

turn 1  "I'll start by finding the existing YG runs to confirm identifiers."
turn 2  "No results with those filters; let me broaden."
turn 3  "The constraint is named `standard-robustness`. Let me get the seed-0 run's config and results."
turn 4  "Now the dry-run plan for the requested run (matching epsilon 0.3 from the seed-0 baseline)."
turn 5  "Plan validated. Now executing it."          ← gate: declined
turn 6  "The training run was not executed: the operator declined ..."

Diese Ablaufverfolgung hat auch einen Fehler in den eigenen Werkzeugen dieses Repositorys aufgedeckt. Turn 1 lieferte ein leeres Ergebnis, weil list_experiments nach dem Ergebnisordnernamen filterte, während run_experiment den Klassennamen nahm – zwei Vokabulare für ein Konzept. Das Modell hat sich selbstständig erholt, auf Kosten eines Turns, und sein Grund in Turn 3 sagt genau, was es herausgefunden hat. list_experiments akzeptiert jetzt beide Schreibweisen.

Was die Demos gezeigt haben

Fünf Aufgaben, keine mit einer einzigen Antwort zu beantworten. Vollständige Transkripte in demo_output/, vollständige Ablaufverfolgungen in traces/.

A. Beste Logik innerhalb eines Genauigkeitsbudgets. Drei Turns. Läufe aufgelistet, alle vier Ergebnisse in einem parallelen Turn abgerufen, YG bei 0,9981 Sicherheit für 0,76 Punkte Genauigkeit geantwortet und gesagt, dass nichts ausgeführt wurde.

B. Variante eines bestehenden Laufs planen. Vier Turns. Konfiguration, Vergleich und Logikdefinition in einem parallelen Turn abgerufen, run_experiment mit dry_run=true aufgerufen, den Plan und den genauen Befehl gemeldet, und da ein passender Lauf existierte, diese verglichen.

C. Gegen einen nicht existierenden Lauf vergleichen. Drei Turns. Zuerst aufgelistet statt geraten, bestätigt, dass STL eine echte Logik ist, die einfach keinen Lauf hat, und dies mitgeteilt.

D. Trainieren, Betreiber lehnt ab. Sechs Turns. Zuerst mit einem Dry Run geplant, wie in der Werkzeugbeschreibung verlangt, dann die Ausführung angefordert. Der Betreiber hat abgelehnt. Das Modell meldete, dass es nicht ausgeführt wurde, und versuchte es nicht erneut, gab den Plan und antwortete mit dem, was existierte.

E. Trainieren, Betreiber genehmigt. Sechs Turns und ein echter Trainingslauf. Dieselbe Plan-dann-Ausführungssequenz; der Betreiber akzeptierte; der Server, gestartet mit aktivierter Ausführung, führte main.py für eine Epoche auf CPU in 28,6 Sekunden aus und schrieb fixtures/results/standard-robustness/mnist/1/YG.csv. Der Agent rief dann get_results und compare_runs für den neuen Lauf auf und meldete endgültiges Test-P-Metric 0,9160 und Test-C-Sec-self 0,5482. Beide stimmen mit der CSV überein. Unaufgefordert listete er die Störfaktoren gegen den Seed-0-Vergleich auf (eine Epoche versus zehn, Verzögerung, ein absichtlich geschwächtes Angriffsbudget) und stellte aus der Epoche-0-Zeile fest, dass die Constraint-Sicherheit bei einem untrainierten Modell trivialerweise 1,0 beträgt und nur zusammen mit einer konvergierten Genauigkeit etwas bedeutet. Dies ist eine korrekte Interpretation der Metrik.

Diese Seed-1-CSV ist ein echter Lauf und wird absichtlich neben den synthetischen Fixtures aufbewahrt. Ihre erste Zeile ist der argv, mit dem sie trainiert wurde, wie bei jedem anderen Lauf.

Zwei wissenswerte Dinge über die Daten

Epoche 0 ist eine Vor-Trainings-Evaluierung. Ein mit --epochs 10 konfigurierter Lauf schreibt elf Zeilen, nummeriert 0 bis 10. Zeilenanzahl und letzte Epoche werden getrennt gemeldet, da die Bezeichnung der Zeilenanzahl als „Epochen“ das Training um eins überschätzt.

Das Trainingsskript schreibt -1 für Metriken, die es nicht evaluiert hat. get_results normalisiert diese auf null, damit ein Sentinel nicht als Messung gelesen werden kann. Ein Basislauf hat überhaupt keine Constraint-Metriken, und er sollte dies so angeben, anstatt minus eins zu melden.

Grenzen, damit nicht übertrieben wird

Das Modell ist im Live-Betrieb über fünf Aufgaben hinweg nie auf ein is_error-Tool-Ergebnis gestoßen, da es der Anweisung folgte, vor dem Vertrauen auf eine Kennung aufzulisten. Der Fehlerpfad wird auf Protokollebene in smoke_test.py und auf Wrapperebene getestet, aber die Live-Erholung von einem Tool-Fehler während der Aufgabe wurde nicht demonstriert.

Memoisation wurde live nie aktiv. Das Modell wiederholte in keinem Lauf einen identischen Aufruf. Es ist getestet und in jeder Ablaufverfolgung im Leerlauf.

Prompt-Caching ist nicht konfiguriert. cache_read_input_tokens ist in jeder Ablaufverfolgung null, und die Eingabe-Token-Anzahlen (11k bis 46k pro Aufgabe) sind größtenteils erneut gesendeter Kontext. Cache-Breakpoints bei den Werkzeugdefinitionen und der Systemaufforderung würden dies erheblich reduzieren und sind die offensichtliche nächste Verbesserung.

Die Ausführung eines Laufs erforderte einen Checkout, dessen main.py parst. Im Upstream-main tut es dies nicht: --epsilon und --delta sind jeweils zweimal definiert, und argparse lehnt das Duplikat ab, bevor ein Argument gelesen wird, sodass python main.py --help fehlschlägt. Dies wurde im fix/duplicate-argparse-flags-Branch des Forks behoben, mit einem Regressionstest, und die Demo zeigte PDML_REPO_DIR auf diesen Checkout.

Probieren Sie es aus

uv sync
uv run python scripts/make_fixtures.py
uv run python scripts/smoke_test.py

Der Smoke-Test startet den Server über stdio, listet die Werkzeuge auf, ruft jedes auf, prüft, ob die Ausführung ohne PDML_ALLOW_EXECUTE verweigert wird, und prüft, ob eine unbekannte Experiment-ID einen Fehler ergibt, anstatt stillschweigend erfolgreich zu sein. Es kostet nichts.

Um den Agenten etwas zu fragen, mit gesetzter ANTHROPIC_API_KEY:

uv run python -m pdml_agent.agent "Which mnist run has the best constraint security?"
uv run python scripts/demo.py A B C D

Um ihn tatsächlich trainieren zu lassen, weisen Sie ihn auf einen Checkout von property-driven-ml, dessen main.py parst, und auf einen Interpreter mit torch hin, und übergeben Sie das Flag, das die Ausführung aktiviert:

export PDML_REPO_DIR=~/property-driven-ml
export PDML_PYTHON=~/property-driven-ml/.venv/bin/python
uv run python -m pdml_agent.agent --allow-execute "Train a one-epoch YG run on mnist at seed 2 ..."
uv run python scripts/demo.py E

Ihnen wird der genaue Aufruf gezeigt, und Sie werden gebeten, ihn zu genehmigen.

Umgebungsvariablen, die der Server liest: PDML_RESULTS_DIR (wo Läufe leben, Standard fixtures/results), PDML_REPO_DIR (der property-driven-ml-Checkout), PDML_PYTHON (Interpreter für main.py, andernfalls das .venv des Repositorys), PDML_ALLOW_EXECUTE (1 zur Erlaubnis der Ausführung), PDML_EXECUTE_TIMEOUT (Sekunden, Standard 3600).

Available Tools

6 tools
compare_runsA

Diff two runs on both configuration and final headline metrics.

Returns only the config keys that differ, plus deltas on predictive
performance and constraint security. Prefer this over calling get_results
twice when the question is what changed between two runs.
ParametersJSON Schema
NameRequiredDescriptionDefault
experiment_id_aYes
experiment_id_bYes

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool returns only differing config keys and deltas on predictive performance and constraint security, which is informative. However, it does not explicitly state that the tool is read-only (no destructive side effects), which would be a minor improvement for transparency.

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?

The description is three sentences, each serving a distinct purpose: stating the action, detailing the output, and providing usage guidance. No extraneous words; every sentence earns its place.

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?

Given the tool's low complexity (two string parameters, no output schema, no annotations), the description covers the core functionality and output format. It mentions what is returned (differing config keys, deltas on metrics). However, it could be more complete by describing the return structure (e.g., a JSON object with keys for config and metrics). The lack of output schema makes this gap more noticeable, but the description is still sufficient for an agent.

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

Parameters2/5

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

Schema description coverage is 0%, meaning the input schema provides no property descriptions. The description does not mention the parameter names 'experiment_id_a' and 'experiment_id_b' or explain their format, source, or constraints. While the names are self-explanatory, the description should add detail (e.g., 'unique identifiers for runs') to compensate for the lack of schema descriptions.

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?

The description clearly states the verb 'diff' and the resource 'two runs', specifying that it compares configuration and headline metrics. It distinguishes itself from the sibling tool 'get_results' by mentioning it returns only differing config keys and deltas, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises to prefer this tool over calling 'get_results' twice when the question is about what changed between two runs. This provides a clear usage guideline and directly contrasts with an alternative, helping the agent decide when to invoke this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_experiment_configA

Recover the exact configuration a run was trained with.

Reads the command line the training script recorded in the run's own output, so this is what actually ran rather than what was intended. Use it before proposing a new run based on an existing one.

ParametersJSON Schema
NameRequiredDescriptionDefault
experiment_idYes

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool reads the command line recorded in the run's own output, and emphasizes that it recovers 'what actually ran rather than what was intended'. This is valuable behavioral context for a read-only introspection tool, though it does not mention auth requirements or rate limits.

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?

The description is three concise sentences, each adding value. The first sentence states the purpose, the second explains the mechanism, and the third provides usage guidance. No wasted words.

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?

Given the tool has no output schema, the description appropriately skips explaining return values. It covers what the tool does, how it works, and when to use it. However, it does not mention the format of the returned configuration (e.g., as a JSON object or command-line string), which would be helpful for the agent to know how to use the output.

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?

Schema description coverage is 0% (the parameter names are not described in the schema), so the description must compensate. The description does not directly describe the 'experiment_id' parameter, but the context of 'recover the exact configuration a run was trained with' strongly implies that the parameter identifies the run. With only one required parameter and no enums, this is sufficiently clear.

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?

The description clearly states the verb 'recover' and the resource 'exact configuration a run was trained with', distinguishing it from siblings like 'list_experiments' (which lists experiments) and 'run_experiment' (which creates a new run). It explains that the configuration is read from the run's own output, adding specificity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Use it before proposing a new run based on an existing one', providing clear guidance on when to use this tool. However, it does not explicitly state when not to use it or mention alternatives among the siblings, though the context implies it's for inspection before modification.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_resultsA

Metrics for one epoch of a run, defaulting to the final epoch.

Constraint security is reported as Test-C-Sec-self and Test-C-Sec-common; predictive performance is Test-P-Metric. Metrics the run did not evaluate are returned as null rather than as the -1 sentinel the training script writes, so a missing measurement cannot be mistaken for a real one.

ParametersJSON Schema
NameRequiredDescriptionDefault
epochNo
experiment_idYes

TDQS

A3.8/5.0
Behavior5/5

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

With no annotations provided, the description fully carries the burden of behavioral disclosure. It reveals key behaviors: the default epoch is the final one, the naming convention for constraint security and predictive performance metrics, and crucially that missing metrics are returned as null instead of the -1 sentinel used by the training script. This eliminates ambiguity and prevents misinterpretation of sentinel values.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is composed of three sentences that are concise and front-loaded with the primary purpose. It wastes no words, though it could be slightly more structured by separating the parameter default from the metric naming conventions. Overall, it is efficient and well-organized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 2 parameters, no output schema, and no annotations, the description covers the default behavior, metric naming, and null handling. However, it fails to describe the return format (e.g., dictionary or list), possible error conditions (e.g., invalid experiment_id), or the full set of metrics. It is adequate but leaves gaps for an agent to infer.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It does so by explaining the default behavior of the epoch parameter (defaulting to final epoch) and implicitly linking experiment_id to the run. However, it does not explicitly describe the parameters' types, constraints, or the experiment_id parameter's purpose beyond the tool context. The added value is moderate but not fully compensatory.

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?

The description clearly states the tool retrieves metrics for a specific epoch of a run, defaulting to the final epoch. This is a specific verb-resource combination that distinguishes it from siblings like list_experiments (listing all experiments) or get_experiment_config (getting configuration). The mention of defaulting to the final epoch adds precision.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus alternatives. It does not mention when not to use it, nor does it reference sibling tools like compare_runs or search_logic_definitions. The usage context is only implied by the tool's purpose (getting metrics), but no exclusions or prerequisites are stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_experimentsA

List completed experiment runs, with optional filters.

Returns one entry per run with its experiment_id, the constraint, dataset,
seed and logic it used, and how many epochs it recorded. Call this first:
every other experiment tool takes an experiment_id that comes from here.
The constraint filter accepts either the class name (StandardRobustness)
or the folder name that appears in ids (standard-robustness).
ParametersJSON Schema
NameRequiredDescriptionDefault
logicNo
datasetNo
constraintNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries full behavioral burden. It describes the return structure (fields: experiment_id, constraint, dataset, seed, logic, epochs) and explains constraint filter behavior (accepts class name or folder name). This adds meaningful transparency beyond just 'list runs'.

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?

The description is three concise sentences, each serving a purpose: stating the action, detailing the output, and providing usage guidance. No redundancy or unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and the presence of an output schema, the description covers all essential aspects: what is returned, the filter format, and the inter-tool dependency. It is complete for effective use.

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

Parameters3/5

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

Schema description coverage is 0%, so the description must compensate. It provides specific detail for the constraint parameter (accepts class name or folder name) but does not describe the logic or dataset parameters beyond being optional filters. Some added value, but incomplete.

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?

The description clearly specifies the verb 'List', the resource 'completed experiment runs', and notes optional filters. It differentiates from siblings by stating that this tool returns experiment_ids used by other experiment tools, making its role distinct.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs to call this tool first because every other experiment tool takes an experiment_id from here. This provides clear context for usage, though it does not mention when not to use it or name specific alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

run_experimentA

Plan a training run, or execute one. The only tool that consumes compute.

With dry_run=true (the default) it validates every argument, returns the
exact command, and touches nothing. Do that first and show the plan.

With dry_run=false it executes, subject to two independent gates: the
operator must approve the exact call, and the server must have been
started with execution enabled. If either refuses, the result says
status refused or declined_by_operator. Do not retry a refused or
declined call; report it. A completed run returns the experiment_id to
pass to get_results. Training takes minutes even for one epoch;
oracle_steps and oracle_restarts control the adversarial attack cost.
ParametersJSON Schema
NameRequiredDescriptionDefault
lrYes
seedNo
delayNo
logicYes
epochsYes
datasetYes
dry_runNo
epsilonNo
batch_sizeYes
constraintYes
results_dirNo
oracle_stepsNo
oracle_restartsNo

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: dry_run validates without side effects, execution requires operator approval and server enablement, possible statuses are named, and training time is estimated ('minutes even for one epoch'). Also mentions oracle_steps/restarts control adversarial attack cost.

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?

The description is well-structured and front-loaded with the key distinction. Each sentence provides essential operational guidance—no filler or repetition. The three paragraphs flow logically from purpose to validation to execution.

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?

For a complex compute-consuming tool with no output schema, the description covers safety gates, refusal handling, time cost, and next steps (get_results). It falls short only in not explaining parameter meanings, but overall it is remarkably complete for an agent to use safely.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It explains dry_run and oracle_steps/oracle_restarts, but 10 of 13 parameters (dataset, constraint, logic, epochs, batch_size, lr, seed, delay, epsilon, results_dir) have no semantic explanation beyond their names. This is a notable gap for critical parameters.

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?

The description clearly states it 'Plan a training run, or execute one. The only tool that consumes compute.' This specifies the verb (plan/execute), resource (training run), and distinguishes from sibling read-only tools like get_results and list_experiments.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit workflow guidance: 'Do that first and show the plan' (dry-run), 'Do not retry a refused or declined call; report it', and 'A completed run returns the experiment_id to pass to get_results'. It also notes it is the only compute-consuming tool, indicating when this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_logic_definitionsA

Find differentiable logic implementations in the source.

Matches on class name, docstring and filename, returning the operators each logic implements and where it is defined. An empty query returns all of them. Use this to understand what a logic does before interpreting a result or proposing a run that uses it.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNo

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It tells the user about search scope and return type (operators and location) but does not disclose whether the operation is read-only, its performance characteristics, or any side effects like network calls. For a search tool, this is adequate but not rich in detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences and efficiently front-loads the core purpose in the first sentence, followed by scope details and usage guidance. Each sentence contributes distinct information without redundancy, though a slightly more condensed phrasing could improve it further.

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?

Given the tool has a single parameter with no enums, no output schema, and no nested objects, the description adequately covers the search behavior, parameter semantics, and usage context. It explains what fields are searched and how the empty query works, which is sufficient for an agent to use the tool effectively in the context of understanding logic implementations.

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?

The schema has 1 parameter (query) with 0% description coverage and no schema-level descriptions, so the description must compensate. The description explains the query parameter well: it matches on class name, docstring, and filename, and states that an empty query returns all entries. This adds meaningful semantics beyond the schema's default field.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool searches for differentiable logic implementations, specifying the search scope (class name, docstring, filename) and what it returns (operators and location). This is specific and distinguishable from siblings like get_results or run_experiment, though it does not explicitly name a sibling for differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool, explicitly stating 'Use this to understand what a logic does before interpreting a result or proposing a run that uses it.' This gives actionable guidance on the tool's role in the workflow, though it does not mention when not to use it or list alternatives explicitly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedcompare_runs
    • First observedget_experiment_config
    • First observedget_results
    • First observedlist_experiments
    • First observedrun_experiment
    • First observedsearch_logic_definitions

TDQS

A4.2/5.0

Scored across 6 tools

Disambiguation5/5

Each tool has a clearly distinct responsibility: listing experiments, retrieving configs, fetching metrics, comparing runs, searching logic definitions, and executing runs. There is no overlap in purpose, and run_experiment is the only side-effecting tool.

Naming Consistency5/5

All six tool names follow a consistent snake_case verb_noun pattern (list_experiments, get_results, compare_runs, etc.). The verbs are semantically appropriate and predictable.

Tool Count5/5

Six tools is well-scoped for an experiment management agent: discovery, configuration, results, comparison, domain search, and execution. Each tool earns its place without redundancy.

Completeness4/5

The tool surface covers the full core workflow: plan/execute a run, list runs, inspect configuration and metrics, and compare runs. Missing operations like deleting or cancelling runs are not obvious gaps for immutable experiment records.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that enables AI agents to observe and interact with trackio experiment tracking, providing tools for managing ML experiments through natural language.
    3
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    A Model Context Protocol server that enables LLMs to interact with MLflow tracking servers, allowing users to query experiments, analyze runs, compare metrics, manage the model registry, and promote models through natural language.
    40
    148 PyPI
    15
    MIT