Skip to main content
Glama

Analyze trend (advanced)

analyze_trend
Read-onlyIdempotent

Analyze a health signal's trend with slope and confidence interval, baseline comparison, rate of change, outlier detection, model fit assessment, and change-point identification.

Instructions

Trend intelligence for one signal — beyond a single straight line.

Pulls a signal's dated numeric readings and returns, in one call:

  • trend — least-squares slope with a standard error, 95% CI, p-value, and an honest 'distinguishable from flat / treat as noise' verdict;

  • baseline — the latest reading framed against your own recent median and typical range (Q1-Q3), the way a clinician reads a value;

  • rate_of_change — recent vs earlier slope, exposing acceleration;

  • outliers — points flagged by a robust median/MAD z-score, not silently averaged into the mean;

  • shape — whether a straight line is the right model at all (weak fit, residual runs, or a better-fitting quadratic) and whether linear extrapolation is advisable for bounded or cyclical signals;

  • change_point — the single most likely regime shift, if any.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesthe signal name, e.g. 'weight_kg', 'a1c_percent', 'resting_heart_rate'.
userNowhich person; defaults to the primary user.
sinceNo
untilNo
sourceNo'metric' | 'wearable' | 'lab' | 'biomarker' | 'substance'.metric
outlier_thresholdNomodified z-score cutoff for outliers (default 3.5).
baseline_window_daysNolookback for the baseline median/range (default 180).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description provides extensive behavioral details beyond annotations (readOnlyHint, idempotentHint). It explains statistical methods (least-squares, MAD z-score, quadratic fit, change point detection) and precisely what each output component represents, offering transparency that annotations alone do not cover.

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 well-structured with a concise opening line and organized bullet points. Every sentence adds value, explaining complex analysis in a digestible manner. Despite length, it remains focused and front-loaded with the core purpose.

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 tool's complexity, output schema existence, and annotations, the description covers the output in detail. However, it could briefly mention prerequisites (e.g., minimum data points) or error scenarios (e.g., insufficient readings). Minor gap, but overall complete for typical use.

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 71%, so the schema already documents most parameters. The description does not add parameter-level meaning beyond the schema; it focuses on outputs. This meets the baseline expectation without surpassing it.

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 it provides advanced trend intelligence for a single signal, listing specific outputs like trend, baseline, rate of change, outliers, shape, and change point. This distinguishes it from sibling tools that are domain-specific (e.g., analyze_lab_trend) by its generality and comprehensive analysis components.

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

Usage Guidelines3/5

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

The description implies usage for any signal but does not explicitly differentiate from the many specialized analyze_* sibling tools. No direct guidance on when to choose this over alternatives, nor exclusions like 'use this only for non-categorized signals'. Usage context is implied but not elaborated.

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/Cole-Will-I-Am/HealthLedger-MCP'

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