Skip to main content
Glama
Ian3738
by Ian3738

model_predict

Get predictions from a fitted model at chosen predictor values or for new cases, with confidence levels.

Instructions

Predictions from a fitted model. Pass at for estimated marginal means at chosen predictor values (e.g. {'dose': [0, 10, 20]}), holding everything else at its average - this is the usual way to describe what a model implies. Pass newdata for predictions on specific new cases, or neither for fitted values on the original data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNoPredictor values for estimated marginal means, e.g. {'age': [20, 40, 60]}.
typeNoPrediction scale: 'response' or 'link'.response
modelYesName of a fitted model in the session.
digitsNoDecimal places.
newdataNoNew cases as columns, e.g. {'age': [30, 40], 'sex': ['m', 'f']}.
conf_levelNoConfidence level.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description must carry the behavioral burden, and it does reveal key mechanics: for `at`, 'holding everything else at its average' and using original data when neither argument is passed. It stops short of describing the output format or how conf_level/type alter results, leaving some behavior implicit.

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?

Two sentences with code-formatted arguments, front-loaded main purpose, and no filler. Each clause earns its place by explaining a distinct mode or example.

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?

The tool has six parameters, no output schema, and no annotations, so the description must cover a lot. It explains the central at/newdata distinction thoroughly, but it never states what the result looks like (e.g., a table with predictions and confidence intervals) or how type/conf_level affect the output. This leaves an agent guessing about return shape.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents every parameter, so the baseline is 3. The description adds valuable meaning by explaining what `at` computes (estimated marginal means with other predictors at their average) and contrasting it with `newdata` and the default fitted-value behavior. This goes beyond the schema's terse field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Predictions from a fitted model', which clearly states the tool's verb and resource. It goes on to explain three distinct prediction modes (at, newdata, neither), making its scope evident. However, it never references sibling tools like model_diagnostics or model_compare, so it doesn't explicitly differentiate itself.

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 gives explicit rules for choosing among the three modes: use `at` for marginal means, `newdata` for specific new cases, and neither for fitted values. It even flags `at` as 'the usual way to describe what a model implies.' However, it does not discuss when to prefer this tool over a sibling tool such as model_compare or regression.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/Ian3738/r-stats-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server