Skip to main content
Glama
amanharshx
by amanharshx

model_metrics

Read-only

Report a model's best training epoch and metrics for private or public projects, separating best-epoch values from top-level reported metrics and flagging mismatches.

Instructions

Report a model's best training epoch and its reported metrics, labelled so neither can be mistaken for the other (works for private and public projects). bestEpoch, bestFitness, and bestEpochMetrics are stated only when exactly one trainResults record has the reported bestEpoch and that record's fitness exactly equals the reported bestFitness; otherwise all three are null and bestEpochNote keeps the platform's raw values and says why (older Ultralytics versions reported the last epoch as bestEpoch). reportedMetrics is the model's top-level metrics field verbatim; the API does not say which evaluation produced it (on finished Platform-trained runs observed live it matches the post-training evaluation of the best checkpoint, not the last training epoch), so it makes no epoch claim. resultRecordCount counts trainResults records, not epochs. include_train_args adds the full trainArgs object (111 keys observed live), omitted by default. include_history adds the last N records in API order and always states the window it covers, with record counts, the min/max reported epoch, and duplicate and missing epoch numbers in that range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesModel ref by owner/project/model, ul:// URI, or slug (requires project).
projectNoProject ref required when model is given by slug.
history_last_nNoLimit the history to the last N records in API order (default 20). Truncates a long run to its tail; the response always reports the window it covers (record counts and the min/max reported epoch), so a flat tail is not mistaken for a converged run.
include_historyNoInclude the trainResults history (per-record epoch and metrics); omitted by default.
include_train_argsNoInclude the full trainArgs object; off by default because the platform returns roughly a hundred keys.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.15
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / history_last_n / description
      Previous value: -"Limit the history curve to the most recent N epochs (default 20). Truncates a long run to its tail; the response always reports the epoch window it covers, so a flat tail is not mistaken for a converged run."New value: +"Limit the history to the last N records in API order (default 20). Truncates a long run to its tail; the response always reports the window it covers (record counts and the min/max reported epoch), so a flat tail is not mistaken for a converged run."
    • changedInput schema / properties / include_history / description
      Previous value: -"Include the epoch metrics history curve; omitted by default."New value: +"Include the trainResults history (per-record epoch and metrics); omitted by default."
  2. Changed3 schema fields changedv0.1.13
    • addedInput schema / properties / history_last_n / description
      Added value: +"Limit the history curve to the most recent N epochs (default 20). Truncates a long run to its tail; the response always reports the epoch window it covers, so a flat tail is not mistaken for a converged run."
    • addedInput schema / properties / include_history / description
      Added value: +"Include the epoch metrics history curve; omitted by default."
    • addedInput schema / properties / include_train_args / description
      Added value: +"Include the full trainArgs object; off by default because the platform returns roughly a hundred keys."
  3. Addedv0.1.12

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover the read-only, non-destructive profile, and the description adds substantial behavioral context beyond them: exact null conditions for bestEpoch/bestFitness/bestEpochMetrics, the reason (older Ultralytics versions reported the last epoch as bestEpoch), the caveat that reportedMetrics has no known evaluation provenance, and that resultRecordCount counts records not epochs.

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?

Front-loaded with the tool's purpose before the dense semantics, and every sentence carries real information. It is long and heavily punctuated, which costs some readability, but there is little that could be cut without losing behavioral detail.

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?

With no output schema, the description carries the full burden of explaining return values and does so comprehensively: field-by-field semantics, null conditions, provenance caveats, and the shape of history output. An agent has everything needed to call and interpret this tool correctly.

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 coverage is 100%, so the baseline is 3, but the description adds value beyond the schema: include_train_args returns 'the full trainArgs object (111 keys observed live)', and include_history 'always states the window it covers, with record counts, the min/max reported epoch, and duplicate and missing epoch numbers' — detail an agent cannot get from the schema alone.

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?

States a specific verb and resource ('Report a model's best training epoch and its reported metrics') and immediately scopes it ('works for private and public projects'). It is clearly distinguishable from siblings like training_monitor or deployment_metrics, which concern live training or deployment health rather than a stored model's reported results.

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

Usage Guidelines3/5

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

The description implies when the fields are populated versus null, which is useful context for interpreting results, but it never names an alternative tool or states when to prefer model_metrics over training_monitor, deployment_metrics, or models_get. Usage is inferable from the resource but not explicitly guided.

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