Skip to main content
Glama

train_diagnose

Diagnose failed training jobs by classifying issues into seven categories, using logs, environment, checkpoint, and hyperparameters. It produces a fix prescription and saves a diagnosis report.

Instructions

训练失败诊断——七类分类(OOM/数据格式/超参发散/框架/环境/重复坍塌/精度异常)+ 上下文四源(日志尾部+环境清单+checkpoint+超参)+ 修复处方,报告落盘 diagnose.json。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
saveNo是否落盘报告(可选——缺省 true,data/train/<企业>/<jobId>/diagnose.json)
train_job_idYes🔴 训练任务标识(failed/cancelled 等有失败上下文的任务)
enterprise_idYes🔴 企业标识(隔离分区依赖)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full transparency burden. It discloses the diagnostic behavior, the four context sources it reads, the seven classification categories, and the side effect of writing diagnose.json. It does not explicitly state whether the tool is read-only or whether it modifies training state, but 'diagnose' plus report persistence strongly implies a non-mutating analysis workflow.

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?

A single dense sentence packs purpose, categories, context sources, output, and file name without wasted words. The most important purpose ('训练失败诊断') is front-loaded, and every clause adds information.

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 three-parameter tool with no output schema and no annotations, the description covers purpose, applicable job states, input sources, classification scheme, and the persisted report path. The only notable gap is the lack of an explicit description of the tool's direct return value or inline response format.

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 100%, so the baseline is 3. The description does not add much beyond the schema for parameters: it confirms the failure context for train_job_id, but the schema already states failed/cancelled tasks and enterprise isolation. No extra parameter-level semantics are introduced.

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 names the exact resource ('训练失败' / failed training jobs) and a specific verb ('诊断'), then enumerates the diagnostic output: seven failure categories, four context sources, a fix prescription, and the diagnose.json report. This level of specificity clearly separates it from generic sibling tools, even without naming them.

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 and the train_job_id parameter make the intended use clear: diagnose failed/cancelled training runs. It implies the tool is for failure contexts, not healthy jobs, but it does not explicitly contrast it with nearby siblings like train_doctor or state when not to use it.

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

Deploy Server

Other Tools