Skip to main content
Glama
gitmystuff

MCP Machine Learning Agent

by gitmystuff

confusion_matrix_metrics

Evaluate Logistic Regression and KNN breast cancer classifiers on the test set: compute confusion matrix, accuracy, and malignant-class precision/recall.

Instructions

Compute the confusion matrix plus accuracy/precision/recall for both models on the test set. Precision and recall are for the malignant class. Confusion matrix order is [malignant, benign]; rows = actual, columns = predicted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
test_sizeNoFraction of the data held out for testing.
request_idNoYour own id for this call; recorded in the audit log.unknown
random_stateNoRandom seed for the train/test split.
knn_neighborsNoNumber of neighbors for the KNN model.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose two genuinely important traits: that precision/recall refer to the malignant class, and that the matrix is ordered [malignant, benign] with rows=actual, columns=predicted. However, it never says whether calling it re-trains/re-splits the models (the knn_neighbors and test_size params suggest it might), whether it is deterministic, or what the safety profile of the operation is.

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?

Three tight sentences with the core action front-loaded, and each remaining sentence adds non-obvious output semantics rather than filler. Slightly dense but no wasted text.

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?

An output schema exists, so return shape needn't be explained, and the description complements it with class orientation and matrix layout. The main gap is the relationship to prior training state and how this differs operationally from the prediction tools.

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 all four parameters (test_size, random_state, knn_neighbors, request_id) are already documented in the schema, and the description adds no per-parameter meaning. Baseline of 3 applies when the schema does the heavy lifting.

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 ('compute the confusion matrix plus accuracy/precision/recall') and scopes it precisely ('for both models on the test set'). This cleanly separates it from siblings like predict_logistic_regression, predict_knn, and select_best_model, which perform prediction or selection rather than evaluation.

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 phrase 'on the test set' and 'for both models' implies this is a post-training evaluation step, so usage is inferable but never stated. There is no explicit when-to-use, no ordering relative to train_models or select_best_model, and no statement of 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.