pdml-agent
pdml-agent
一个基于 property-driven-ml 实验管线的 MCP 服务器和工具调用代理,具有人工介入门控机制,用于控制任何消耗计算资源的操作,并为每次调用提供结构化追踪。
Property-driven ML 根据形式逻辑约束训练分类器,因此一次运行由约束、数据集、可微逻辑和种子定义,并生成每个 epoch 的预测性能和约束安全性指标。这使得它成为一个真正适合工具化的领域,而非演示性领域:可以列出实验、恢复配置、读取结果、比较运行,以及规划、批准和执行新的运行。
状态:按范围完成。 服务器、代理、门控、追踪。已在 CPU 上演示真实执行。
架构
┌──────────────────────────────────────────────────────────────┐
│ 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 对领域一无所知。它像任何其他 MCP 客户端一样通过 stdio 连接到服务器,仅使用服务器暴露的工具。领域模块不依赖 MCP,可通过导入进行测试。server.py 仅注册工具并委派任务。
Related MCP server: MLflow MCP Server
布局
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工具
工具 | 返回值 |
| 运行列表,可按约束、数据集或逻辑过滤 |
| 运行实际训练时使用的配置 |
| 一个 epoch 的指标,默认为最后一个 |
| 两次运行之间的配置和指标差异 |
| 逻辑类、其运算符和文档字符串 |
| 当 |
门控
run_experiment 是唯一消耗计算资源的工具,并且有两个独立机制在其前面。
除非服务器以 PDML_ALLOW_EXECUTE=1 启动,否则不会执行。 这是由运行服务器的人做出的决定,任何请求都无法更改。没有此设置时,dry_run=false 返回 status: refused 并附带计划,且这不是错误。
未经操作员批准确切的调用,代理不会发送执行请求。 批准提示显示工具名称和完整的参数(JSON 格式),而非摘要。拒绝返回正常结果 declined_by_operator,模型被指示报告此情况并停止,而非重试。
任何一层单独都能阻止不必要的运行。两者结合意味着任何一层都不必完美。决定哪些需要批准的策略是一个函数 needs_approval,小到一目了然。
追踪
每次运行都会追加到 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 现在接受两种拼写。
演示内容
五个任务,没有一个能通过一次调用回答。完整记录在 demo_output/,完整追踪在 traces/。
A. 在精度预算内找到最佳逻辑。 三轮。列出运行,在一个并行轮中获取所有四个结果,回答 YG 在 0.76 精度点下安全性为 0.9981,并说明未执行任何操作。
B. 规划现有运行的变体。 四轮。在一个并行轮中获取配置、比较和逻辑定义,以 dry_run=true 调用 run_experiment,报告计划和确切命令,并在存在匹配运行时进行比较。
C. 与不存在的运行进行比较。 三轮。先列出而非猜测,确认 STL 是真实逻辑但尚无运行,并如实说明。
D. 训练,操作员拒绝。 六轮。首先按工具描述要求进行干运行规划,然后请求执行。审批者拒绝。模型报告未执行且未重试,给出计划,并用现有内容回答。
E. 训练,操作员批准。 六轮,以及一次真实训练运行。相同的先规划后执行序列;审批者接受;以启用执行模式启动的服务器在 CPU 上运行 main.py 一个 epoch,耗时 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 匹配。 未经提示,它列出了与种子 0 比较的混杂因素(一个 epoch 对十个、延迟、故意削弱的攻击预算),并从 epoch 0 行观察到约束安全性在未训练模型上微不足道地为 1.0,仅当与收敛精度结合时才有意义。这是对指标的正确解读。
该种子 1 的 CSV 是真实运行,并特意与合成夹具放在一起。其第一行是训练时使用的 argv,与其他所有运行一样。
关于数据的两件值得了解的事
Epoch 0 是训练前评估。 配置为 --epochs 10 的运行会写入编号 0 到 10 的十一行。行数和最终 epoch 分别报告,因为将行数称为“epochs”会高估训练一轮。
训练脚本将未评估的指标写入 -1。 get_results 将其规范化为 null,因此哨兵值不会被误读为测量值。基线运行根本没有约束指标,它应该如实说明,而非报告负一。
限制,明确说明以免夸大
模型在五个任务中从未遇到 is_error 工具结果,因为它遵循先列出再信任标识符的指令。错误路径在 smoke_test.py 的协议级别和包装器级别进行了测试,但未演示任务中途工具错误后的实时恢复。
记忆化从未实时触发。模型在任何运行中均未重复相同的调用。它经过了单元测试,并在所有追踪中处于空闲状态。
未配置提示缓存。cache_read_input_tokens 在所有追踪中均为零,输入令牌计数(每个任务 11k 到 46k)大多是重新发送的上下文。在工具定义和系统提示上设置缓存断点将大幅减少此数量,这是明显的下一步改进。
执行运行需要 main.py 可解析的检出。在上游 main 上,情况并非如此:--epsilon 和 --delta 各定义两次,argparse 在读取任何参数之前拒绝重复,因此 python main.py --help 失败。这在分支的 fix/duplicate-argparse-flags 分支上已修复,并带有回归测试,演示将 PDML_REPO_DIR 指向该检出。
尝试运行
uv sync
uv run python scripts/make_fixtures.py
uv run python scripts/smoke_test.py烟雾测试通过 stdio 启动服务器,枚举工具,调用每个工具,检查未设置 PDML_ALLOW_EXECUTE 时执行是否被拒绝,并检查未知实验 ID 是否返回错误而非静默成功。它不消耗任何资源。
要向代理提问,设置 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要让它实际训练,将其指向 main.py 可解析的 property-driven-ml 检出以及带有 torch 的解释器,然后传递启用执行的标志:
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您将看到确切的调用并被要求批准。
服务器读取的环境变量:PDML_RESULTS_DIR(运行所在目录,默认 fixtures/results)、PDML_REPO_DIR(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.
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
Scored across 6 tools
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.
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.
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.
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
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
- AlicenseAqualityBmaintenanceA 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.40148 PyPI15MIT
- 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.100195 npm2MIT
- 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