Skip to main content
Glama

Learning Curve

learning_curve

Generates and saves a score-vs-training-size curve for a trained model to reveal overfitting, underfitting, or the need for more data.

Instructions

Generate and save a learning curve (score vs training set size) for a trained model. Helps to see whether the model is overfitting, underfitting, or needs more data. Args: model_id (str): ID of the trained model. cv (int): Number of cross-validation folds. Default is 5. scoring (str, optional): sklearn scoring name. Defaults to r2 for regression and accuracy for classification. Returns: dict: Model ID, scoring used, training sizes, mean scores, and saved image filename.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model_id": "<model_id>"
    },
    "name": "learning_curve"
  }
}

Input Schema

NameRequiredDescriptionDefault
cvNo
scoringNo
model_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral disclosure burden and does well: it says the tool generates and saves an image, uses cross-validation, and returns model ID, scoring, training sizes, mean scores, and image filename. It could be stronger by noting filesystem side effects or permissions, but the essential behavior is clear.

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 front-loaded with purpose and diagnostic value, then structured into Args and Returns sections. The parameter documentation and return summary are concise and every section contributes useful information.

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?

There is no output schema and no annotations, but the description fully documents the operation, all three parameters, defaults, and the returned fields. This is sufficient for an agent to invoke the tool correctly and understand what it produces.

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

Parameters5/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, and it does: model_id is identified as the trained model ID, cv is explained as cross-validation folds with default 5, and scoring is explained as an sklearn scoring name with task-dependent defaults.

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 states a specific verb and resource: generate and save a learning curve for a trained model. It also explains the diagnostic purpose, distinguishing it from curve tools like roc_curve or precision_recall_curve.

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 clearly explains when this tool is useful: checking overfitting, underfitting, or whether more data is needed. It does not explicitly name when to avoid it or name sibling alternatives, so it falls short of a 5.

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