Skip to main content
Glama

plot_precision_recall_curve

Plot precision-recall curves for binary classification models to evaluate performance on imbalanced datasets, showing the trade-off between precision and recall.

Instructions

Precision-Recall curve for binary classification models. Better than ROC for imbalanced datasets. Shows trade-off between precision and recall. Example: plot_precision_recall_curve(model_name="logistic_data_train", test_df_name="data_test")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
save_pathNo
model_nameNo
test_df_nameNo
target_columnNo
Behavior2/5

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

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It mentions showing the trade-off between precision and recall but does not disclose whether the plot is displayed, saved (despite a save_path parameter), or any side effects, permissions, or return behavior. This is a significant gap for a tool with no annotation support.

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, with the core purpose stated first, followed by a comparative note, and then an example. All three sentences serve a distinct purpose with no repetitive or extraneous information.

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 four parameters, no annotations, and no output schema, the description is too sparse. It does not explain important inputs like save_path or target_column, nor does it clarify what the tool returns or how the plot is delivered. While the example helps, it is insufficient for complete context.

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 four parameters with zero description coverage. The example hints at the usage of model_name and test_df_name (shows them as string arguments), but it does not explain their meaning or provide any guidance for the remaining save_path and target_column parameters. The description adds only minimal semantic value through the example, failing to compensate for the complete lack of schema 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 a Precision-Recall curve for binary classification models. It even differentiates from the sibling tool plot_roc_curve by noting it's 'Better than ROC for imbalanced datasets', effectively distinguishing it from alternatives.

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use this tool: 'Better than ROC for imbalanced datasets' directly tells the agent to prefer this tool over ROC in that scenario. This is a clear comparative usage instruction, similar to the high-calibration example.

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