Skip to main content
Glama

predict

Generate predictions on a dataframe using a stored model and save them as a new column. The data must include the same features used during training.

Instructions

Generate predictions on a dataframe using a stored model. Stores predictions as a new column. Generate predictions on new data. The dataframe must contain the same feature columns used during training. Example: predict(model_name="random_forest_data_train", df_name="data_test")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
df_nameNo
model_nameNo
prediction_columnNoprediction

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries the burden of disclosing behavioral traits. It states that predictions are stored as a new column and mentions the requirement for matching feature columns, which adds some transparency. However, it does not clarify whether the dataframe is modified in place, what happens if the prediction_column already exists, or any side effects beyond adding a column.

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: two sentences covering purpose and prerequisite, plus an illustrative example. Every sentence adds value with no redundancy or 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?

For a prediction tool with an output schema, the description adequately covers the core function, prerequisite, and usage within a modeling pipeline. It does not need to explain return values given the output schema. It might be slightly more complete with error conditions, but this is sufficient for the complexity.

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 0%, so the description must add meaning to parameters. The example shows model_name and df_name usage, but does not explicitly describe each parameter's role or constraints. The parameter names are somewhat self-explanatory, but the description does not fully compensate for the lack of schema descriptions, especially for prediction_column.

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 purpose: 'Generate predictions on a dataframe using a stored model' and mentions it 'Stores predictions as a new column.' This specific verb+resource phrasing distinguishes it from sibling tools like train_model or evaluate_model. The example further clarifies its role in the modeling workflow.

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 provides clear context for when to use the tool, stating it generates predictions on new data and that the dataframe must contain the same feature columns used during training. It implies this is for inference after model training, but does not explicitly mention when not to use it or alternatives.

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