Skip to main content
Glama

regression

Read-onlyIdempotent

Linear regression of y ~ x for one entity. Returns slope, intercept, R² and interpretation. Use for "how does X predict Y?" questions. Runs on any verified autario indicator (World Bank, FRED, Eurostat, OECD, IMF, WHO, ECB, US Census, SEC).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
xYesIndependent variable (predictor) indicator ID
yYesDependent variable (target) indicator ID
fullNoReturn the full raw time series (heavy, many tokens). Default false → you get only the summary/stats, which is enough to ANSWER a question. Set true only when you must plot or export every point.
timeNoOptional time window. "2010-2023" keeps 2010 through 2023, "2019-01-2024-06" works by month, and a single "2015" keeps 2015 onward. Omitted or unparseable = the whole series.
entityYesEntity the series is read for: an ISO 3166 alpha-3 country code such as "DEU" or "USA", or an aggregate code such as "WLD" or "EUU" (the canonical name matches too). Use the codes list_indicators and get_entity_profile accept.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / entity / description
      Added value: +"Entity the series is read for: an ISO 3166 alpha-3 country code such as \"DEU\" or \"USA\", or an aggregate code such as \"WLD\" or \"EUU\" (the canonical name matches too). Use the codes list_indicators and get_entity_profile accept."
    • addedInput schema / properties / time / description
      Added value: +"Optional time window. \"2010-2023\" keeps 2010 through 2023, \"2019-01-2024-06\" works by month, and a single \"2015\" keeps 2015 onward. Omitted or unparseable = the whole series."
  2. Changed1 schema field changed
    • addedInput schema / properties / full
      Added value: +{
      +  "description": "Return the full raw time series (heavy, many tokens). Default false → you get only the summary/stats, which is enough to ANSWER a question. Set true only when you must plot or export every point.",
      +  "type": "boolean"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive. The description adds useful context: it returns an interpretation, runs only on verified indicators, and returns slope/intercept/R². It doesn't mention rate limits or failure modes, but the schema's 'full' parameter covers the heavy-token caveat.

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?

Four sentences, front-loaded with the core operation and output, then use-case, then data scope. No filler, though the data-source enumeration is slightly long.

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?

Given the read-only nature, full schema coverage, and no output schema, the description is nearly complete for invocation: it names the operation, the output fields, the data source constraints, and the use case. It omits failure behavior for invalid indicator IDs, but that is minor.

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 coverage is 100% with detailed descriptions for each parameter, including the 'full' token warning and time-window syntax. The description adds no parameter-level detail beyond the schema, so baseline 3 is appropriate.

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?

States a specific operation (linear regression of y ~ x), its scope (one entity), and its output (slope, intercept, R² and interpretation). This clearly distinguishes it from siblings like correlate or decompose_drivers.

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?

Provides a use-case framing ('how does X predict Y?') and states the data universe it runs on (verified autario indicators with named sources). It does not explicitly differentiate from correlate or lag_analysis, but the framing is clear enough to route most queries.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources