Skip to main content
Glama

Analyze a metric

analyze_metric
Read-onlyIdempotent

Compute descriptive statistics and a linear trend for a health metric over a specified time period. Get count, min/max, mean, median, standard deviation, and projected next value.

Instructions

Compute analysis-ready statistics and a trend for one metric over a window.

Returns count, first/last/latest, min/max, mean, median, standard deviation, and a least-squares linear trend (slope per day, projected next value, direction). These are descriptive statistics for interpretation — not a diagnosis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userNowhich person; defaults to the primary user.
sinceNo
untilNo
metricYesthe metric name to analyse (e.g. 'weight_kg').

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

The description adds context beyond annotations (readOnlyHint, idempotentHint) by specifying that the output is descriptive statistics, not a diagnosis. No contradictions with annotations.

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 two clear, front-loaded sentences with no unnecessary words. Each sentence adds value.

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?

Given the presence of an output schema, the description does not need to detail return values. However, it omits parameter format details (e.g., date format for since/until), making it slightly incomplete for a tool with 4 parameters and low schema coverage.

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

Parameters2/5

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

Schema description coverage is only 50% (metric and user have descriptions, but since and until lack them). The description does not add meaning for these parameters, failing to compensate for the low coverage.

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 computes analysis-ready statistics and trend for one metric over a window, listing specific outputs. The name 'analyze_metric' directly conveys the purpose, and it is distinct from more specific sibling tools like analyze_biomarker_trend.

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 implies use for a single metric over a window, which helps decide when to use it. However, it does not explicitly mention when not to use it or contrast it with siblings like analyze_trend, which are more specific.

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