Skip to main content
Glama

plot_learning_curve

Plot training and validation scores against training set size to identify overfitting and underfitting in machine learning models.

Instructions

Learning curve: training and validation scores vs training set size. Diagnoses overfitting (gap between train/val) and underfitting (both scores low). Example: plot_learning_curve(model_name="rf_model", train_df_name="data_train")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
n_splitsNo
save_pathNo
model_nameNo
target_columnNo
train_df_nameNo
Behavior3/5

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

With no annotations provided, the description must disclose behavior. It explains that the tool computes and plots scores, but omits details such as whether the plot is displayed, saved (despite a save_path parameter), or what happens if the model is not trained. The diagnostic purpose is clear, but side effects and prerequisites are not stated.

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 concise and well-structured, opening with the core purpose and followed by diagnostic utility and a pragmatic example. Every sentence contributes value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 5 parameters, no output schema, and no annotations, the description is incomplete. It does not address how the plot is output/displayed, the meaning of n_splits and save_path, or any prerequisites. The example helps but is not sufficient for full autonomous usage.

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

Parameters2/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. It only explains model_name and train_df_name via the example, leaving n_splits, save_path, and target_column unexplained. This is insufficient for a 5-parameter tool with no schema-level descriptions.

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 clearly states the tool's function: plotting learning curves showing training and validation scores vs training set size. It also provides diagnostic context (overfitting and underfitting), and the example call differentiates it from other plot tools that focus on data distributions or correlations.

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 explicitly states when to use the tool: to diagnose overfitting and underfitting by comparing training/validation scores. This gives clear context for usage, though it does not mention alternatives or when not to use it. The example also demonstrates a typical invocation.

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

Install Server

Other Tools

Latest Blog Posts

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/AstyanM/mcp-data-science'

If you have feedback or need assistance with the MCP directory API, please join our Discord server