Skip to main content
Glama

plot_residuals

Diagnose regression model quality by plotting residuals against predicted values and showing a residual histogram to reveal patterns or non-normality.

Instructions

Residuals vs predicted values plot for regression models. Use to diagnose model quality: random scatter = good, patterns = systematic error. Also shows a histogram of residuals to check normality. Example: plot_residuals(model_name="linear_regression_data_train", test_df_name="data_test")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
save_pathNo
model_nameNo
test_df_nameNo
target_columnNo
Behavior3/5

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

With no annotations, the description carries the full burden for behavior disclosure. It discloses that the tool produces both a residuals vs predicted values plot and a histogram of residuals, which is useful. However, it does not describe prerequisites (e.g., a trained model and test dataframe), side effects, or error handling. The example hints at required inputs but does not fully disclose behavior.

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 three sentences: clear purpose, interpretation guidance, and a concrete example. All sentences add value, and the structure is front-loaded with the primary purpose, making it concise and well-organized.

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

Completeness3/5

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

For a tool with four parameters, no annotations, and no output schema, the description covers the core purpose and usage but leaves gaps in parameter semantics and expected inputs. The example provides a basic invocation pattern, but an agent needs more detail to understand save_path and target_column or to handle optional parameters correctly.

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. The example specifies model_name and test_df_name, but save_path and target_column are never explained. No format, meaning, or relationships are provided for the parameters beyond the example, leaving half of them undefined.

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 creates a residuals vs predicted values plot for regression models, a specific verb+resource. It distinguishes itself from sibling plotting tools by focusing on residual diagnostics and includes interpretation guidance, making its purpose unambiguous.

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 says 'Use to diagnose model quality' and explains how to interpret the plot (random scatter = good, patterns = systematic error), providing a clear when-to-use context for regression model diagnosis. It does not explicitly mention alternatives or when not to use, but the context is sufficient.

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