pdml-agent
pdml-agent
MCP-сервер и агент вызова инструментов для экспериментального конвейера property-driven-ml с шлюзом с участием человека для всего, что потребляет вычисления, и структурированным трейсом каждого вызова.
Property-driven ML обучает классификаторы на основе ограничений формальной логики, поэтому запуск определяется ограничением, набором данных, дифференцируемой логикой и seed, и выдает метрики по эпохам как для прогностической производительности, так и для безопасности ограничений. Это делает его действительно инструментально-ориентированной областью, а не демонстрационной: можно перечислить эксперименты, восстановить конфиги, прочитать результаты, сравнить запуски, а также спланировать, утвердить и выполнить новые запуски.
Статус: завершено в рамках заявленного объема. Сервер, агент, шлюз, трассировка. Реальное выполнение продемонстрировано на CPU.
Architecture
┌──────────────────────────────────────────────────────────────┐
│ 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-mlagent.py ничего не знает о предметной области. Он подключается к серверу через stdio, как и любой другой MCP-клиент, и работает только с инструментами, которые предоставляет сервер. Модули предметной области не имеют зависимости от MCP и тестируются импортом. server.py только регистрирует инструменты и делегирует.
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 callTools
Инструмент | Возвращает |
| запуски, фильтруемые по ограничению, набору данных или логике |
| конфиг, с которым фактически обучался запуск |
| метрики для одной эпохи, по умолчанию последняя |
| diff конфигов и метрик между двумя запусками |
| классы логик, их операторы и docstrings |
| с |
The gate
run_experiment — единственный инструмент, потребляющий вычисления, и перед ним стоят две независимые вещи.
Сервер не будет выполнять, если он не был запущен с PDML_ALLOW_EXECUTE=1. Это решение принимает тот, кто запускает сервер, и никакой запрос не может его изменить. Без него dry_run=false возвращает status: refused с приложенным планом, и это не ошибка.
Агент не отправит запрос на выполнение без одобрения оператором точного вызова. Запрос на одобрение показывает имя инструмента и полные аргументы в JSON, а не сводку. Отказ возвращает обычный результат со значением declined_by_operator, и модели предписано сообщить об этом и остановиться, а не повторять попытку.
Любой из слоев по отдельности остановил бы нежелательный запуск. Вместе это означает, что ни один из них не должен быть идеальным. Политика, определяющая, что требует одобрения, — это одна функция needs_approval, достаточно маленькая, чтобы прочитать ее с одного взгляда.
The trace
Каждый запуск добавляет данные в traces/<timestamp>-<question>.jsonl. Одна строка на событие, никогда не перезаписывается.
Записи turn содержат номер шага, причину остановки модели, ее текст и сводку размышлений, вызовы, которые она собирается сделать, и использование токенов на этом шаге. Записи tool_call содержат инструмент, его аргументы, успешность вызова, был ли он из кэша или через шлюз, задержку, сводку результата и собственную указанную причину модели, взятую из предложения, которое она написала рядом с вызовом. Записи gate содержат решение. run_start и run_end обрамляют их с итогами.
Системный промпт просит модель указать одним предложением, почему она делает каждый вызов, и она это делает. Из трейса пути отказа:
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 ..."Этот трейс также выявил дефект в собственных инструментах этого репозитория. Шаг 1 получил пустой результат, потому что list_experiments фильтровал по имени папки результатов, а run_experiment принимал имя класса — два словаря для одного понятия. Модель восстановилась сама, ценой одного шага, и ее причина на шаге 3 говорит именно то, что она выяснила. list_experiments теперь принимает оба написания.
What the demos showed
Пять задач, ни одна из которых не решается одним вызовом. Полные транскрипты в demo_output/, полные трейсы в traces/.
A. Лучшая логика в рамках бюджета точности. Три шага. Перечислил запуски, получил все четыре результата за один параллельный шаг, ответил YG с безопасностью 0.9981 за 0.76 пунктов точности и сказал, что ничего не выполнялось.
B. Планирование варианта существующего запуска. Четыре шага. Получил конфиг, сравнение и определение логики за один параллельный шаг, вызвал run_experiment с dry_run=true, сообщил план и точную команду, и, поскольку существовал соответствующий запуск, сравнил их.
C. Сравнение с несуществующим запуском. Три шага. Сначала перечислил, а не угадал, подтвердил, что STL — это реальная логика, у которой просто нет запуска, и сообщил об этом.
D. Обучение, оператор отклоняет. Шесть шагов. Сначала спланировал с помощью сухого запуска, как просит описание инструмента, затем запросил выполнение. Утверждающий отклонил. Модель сообщила, что выполнение не было произведено, и не повторила попытку, предоставила план и ответила тем, что существовало.
E. Обучение, оператор одобряет. Шесть шагов и реальный обучающий запуск. Та же последовательность: план-затем-выполнение; утверждающий принял; сервер, запущенный с разрешенным выполнением, запустил main.py на одну эпоху на CPU за 28.6 секунд и записал fixtures/results/standard-robustness/mnist/1/YG.csv. Затем агент вызвал get_results и compare_runs для нового запуска и сообщил итоговые Test-P-Metric 0.9160 и Test-C-Sec-self 0.5482. Оба совпадают с CSV. Без запроса он перечислил confounding факторы по сравнению с seed-0 (одна эпоха против десяти, задержка, намеренно ослабленный бюджет атаки) и отметил из строки эпохи-0, что безопасность ограничений тривиально равна 1.0 на необученной модели и имеет смысл только вместе со сходимой точностью. Это правильное прочтение метрики.
Этот CSV seed-1 — реальный запуск и намеренно хранится рядом с синтетическими fixtures. Его первая строка — это argv, с которым он был обучен, как и у любого другого запуска.
Two things worth knowing about the data
Эпоха 0 — это оценка до обучения. Запуск, настроенный с --epochs 10, записывает одиннадцать строк с номерами от 0 до 10. Количество строк и финальная эпоха сообщаются отдельно, потому что называть количество строк «эпохами» завышает обучение на единицу.
Скрипт обучения пишет -1 для метрик, которые он не оценивал. get_results нормализует их в null, поэтому sentinel не может быть прочитан как измерение. Базовый запуск вообще не имеет метрик ограничений, и он должен так и говорить, а не сообщать минус единицу.
Limits, stated so they are not overclaimed
Модель ни разу не столкнулась с результатом инструмента is_error вживую за пять задач, потому что следовала инструкции перечислять, прежде чем доверять идентификатору. Путь ошибки тестируется на уровне протокола в smoke_test.py и на уровне обертки, но восстановление вживую после ошибки инструмента в середине задачи не было продемонстрировано.
Мемоизация ни разу не сработала вживую. Модель не повторяла идентичный вызов ни в одном запуске. Она протестирована модульно и бездействует в каждом трейсе.
Кэширование промптов не настроено. cache_read_input_tokens равен нулю в каждом трейсе, а количество входных токенов (от 11k до 46k на задачу) в основном является повторно отправленным контекстом. Точки останова кэша на определениях инструментов и системном промпте значительно сократили бы это и являются очевидным следующим улучшением.
Для выполнения запуска требовался checkout, чей main.py парсится. В upstream main это не так: --epsilon и --delta определены дважды, и argparse отклоняет дубликат до чтения любого аргумента, поэтому python main.py --help не работает. Это исправлено в ветке fix/duplicate-argparse-flags форка с регрессионным тестом, и демо указывало PDML_REPO_DIR на этот checkout.
Try it
uv sync
uv run python scripts/make_fixtures.py
uv run python scripts/smoke_test.pyДымовой тест запускает сервер через stdio, перечисляет инструменты, вызывает каждый, проверяет, что выполнение без PDML_ALLOW_EXECUTE отклоняется, и проверяет, что неизвестный идентификатор эксперимента вызывает ошибку, а не молча успешно выполняется. Это ничего не стоит.
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Чтобы задать что-то агенту, с установленным ANTHROPIC_API_KEY:
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Чтобы позволить ему действительно обучать, укажите ему на checkout репозитория property-driven-ml, чей main.py парсится, и на интерпретатор с torch, затем передайте флаг, включающий выполнение:
Вам будет показан точный вызов и предложено его одобрить.
Переменные среды, которые читает сервер: PDML_RESULTS_DIR (где находятся запуски, по умолчанию fixtures/results), PDML_REPO_DIR (checkout репозитория property-driven-ml), PDML_PYTHON (интерпретатор для main.py, иначе .venv репозитория), PDML_ALLOW_EXECUTE (1 для разрешения выполнения), PDML_EXECUTE_TIMEOUT (секунды, по умолчанию 3600).
Available Tools
6 toolscompare_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.
| Name | Required | Description | Default |
|---|---|---|---|
| experiment_id_a | Yes | ||
| experiment_id_b | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| experiment_id | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| epoch | No | ||
| experiment_id | Yes |
TDQS
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.
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.
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.
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.
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.
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).
| Name | Required | Description | Default |
|---|---|---|---|
| logic | No | ||
| dataset | No | ||
| constraint | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| lr | Yes | ||
| seed | No | ||
| delay | No | ||
| logic | Yes | ||
| epochs | Yes | ||
| dataset | Yes | ||
| dry_run | No | ||
| epsilon | No | ||
| batch_size | Yes | ||
| constraint | Yes | ||
| results_dir | No | ||
| oracle_steps | No | ||
| oracle_restarts | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No |
TDQS
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.
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.
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.
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.
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.
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. Dates show when Glama detected each change.
6 tool updates
v0.1.0- First observed
compare_runs - First observed
get_experiment_config - First observed
get_results - First observed
list_experiments - First observed
run_experiment - First observed
search_logic_definitions
TDQS
Each tool targets a distinct operation: listing runs, retrieving config, getting results, comparing runs, searching logic definitions, and running experiments. Descriptions clearly differentiate purposes and provide usage context, leaving no ambiguity.
All tool names follow a consistent verb_noun pattern with underscores (get_experiment_config, list_experiments, get_results, compare_runs, search_logic_definitions, run_experiment). No mixing of styles or irregular verbs.
With 6 tools covering the core experiment lifecycle (listing, inspecting, comparing, searching, running), the count feels well-scoped and purposeful. Not excessive or sparse for this domain.
The tool set covers the primary workflow: discover runs, inspect configuration and results, compare, search logic, and execute new runs. A minor gap is the lack of a tool to cancel or update running experiments, but for the stated purpose of planning and analyzing, this is acceptable.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
MCP server for generating rough-draft project plans from natural-language prompts.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that enables AI agents to observe and interact with trackio experiment tracking, providing tools for managing ML experiments through natural language.3MIT
- AlicenseAqualityAmaintenanceA 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.4015MIT
- AlicenseAqualityAmaintenanceMCP server for Coalesce that manages nodes, pipelines, environments, jobs, and runs, and enables project validation, DDL/DML preview, deployment planning, and cloud environment application.1001952MIT
- AlicenseBqualityDmaintenanceA standalone MCP server that brings complete data science capabilities to AI assistants, enabling them to load data, train models, and track experiments through natural language.301MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/HappyHackingOrange/pdml-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server