Skip to main content
Glama

glm

Fit generalized linear models from a formula and data table for Gaussian, binomial, Poisson, gamma, inverse Gaussian, or negative binomial regression.

Instructions

Fit a generalized linear model from a formula and a data table.

``family`` is one of gaussian, binomial, poisson, gamma, inverse_gaussian
or negativebinomial. ``data`` is either a ``{column: list}`` mapping or an
``"@<path>.csv"`` reference (relative paths resolve against ``output_dir()``).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
familyYes
formulaYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It does add genuine behavioral context beyond structured fields: the accepted family values (schema declares family as an unconstrained string) and the fact that relative CSV paths resolve against output_dir(). However, it says nothing about what fitting returns, whether a model object or summary is produced, or error conditions.

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?

The purpose is front-loaded in the first sentence, followed by compact parameter clarifications. Two short paragraphs with no filler, though the trailing path-resolution note is parenthetical detail that could be tightened.

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?

With no output schema and no annotations, the description should say more about the result of a fit (coefficients, summary, diagnostics) and any modeling assumptions. It adequately covers input shapes but leaves the output side entirely unspecified for a moderately complex modeling operation.

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 compensate. It fully documents family (enumerating six valid values absent from the schema) and data (two accepted forms: a {column: list} mapping or an '@<path>.csv' reference). But formula is only alluded to as 'a formula' with no syntax or dialect specified, leaving one of three required parameters unexplained.

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?

States a specific verb (fit) and resource (generalized linear model) and identifies the required inputs (formula, data table). An agent can distinguish it from sibling regression tools by the model class, though the description never explicitly contrasts it with linear_regression or mixed_lm.

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

Usage Guidelines2/5

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

The description explains parameter formats but gives no when-to-use guidance, no prerequisites, and no indication of when to choose glm over siblings like linear_regression, mixed_lm, or gee. Usage is left entirely to inference.

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