Skip to main content
Glama

evaluate_model

Evaluate a model on test data to compute classification metrics (accuracy, precision, recall, F1, confusion matrix) or regression metrics (MAE, MSE, RMSE, R²). Compare against baseline to detect overfitting.

Instructions

Evaluate a model on test data. Returns classification metrics (accuracy, precision, recall, F1, confusion matrix) or regression metrics (MAE, MSE, RMSE, R²). Always evaluate on TEST set, never training set. Compare metrics against baseline. Test score much worse than training = overfitting. Example: evaluate_model(model_name="random_forest_data_train", test_df_name="data_test")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
model_nameNo
test_df_nameNo
target_columnNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool returns classification or regression metrics, emphasizes the test-set requirement, and includes a practical example. While it doesn't cover every edge case (e.g., target_column handling), it provides substantial behavioral context beyond the schema.

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 compact and front-loaded with the core action, followed by metric details, a critical usage caveat, and an illustrative example. Every sentence earns its place without unnecessary filler.

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?

Given the presence of an output schema (which presumably documents return structures) and the clear enumeration of metrics, the description is largely complete. However, it could better situate the tool relative to cross_validate or compare_models, and it omits target_column semantics. Still, for a straightforward evaluation tool, this is adequate.

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?

The schema has 0% description coverage, so the description must compensate. It only demonstrates model_name and test_df_name via the example, leaving target_column entirely unexplained. The parameter names are somewhat self-explanatory, but the missing target_column guidance creates ambiguity, especially when it is optional (has default).

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 'Evaluates a model on test data' and enumerates the specific metrics returned. It distinguishes from siblings like 'predict' (which generates predictions) and 'train_model' (which trains a model), making the purpose unambiguous. The example reinforces the intended use.

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 instructs to 'Always evaluate on TEST set, never training set' and advises comparing metrics against baseline to detect overfitting, providing clear context for interpretation. It does not explicitly name alternative tools for cross-validation, but the guidance is sufficient for most scenarios.

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