Skip to main content
Glama

Get tag effects: journal tags against the next night

get_tag_effects
Read-only

Does the night after a session with a given tag (log_session tags) look different from the night after a session without it?

Instructions

Does the night after a session with a given tag (log_session tags) look different from the night after a session without it? Per tag and per metric (sleepDurationS, sleepScore, hrv, recoveryMorning: the same per-night values as get_baselines) it compares the nights that followed a day with a tagged session with the nights that followed other training days, over the days nights ending the day before date (default 90, 30-180, date default today; the night that led into date itself may still be recording and is left out). A day without a session is a rest day and is in neither group; a session with no journal entry counts as untagged; a day with several sessions is ONE night, tagged when any of its sessions is; tags match ignoring case. Output: { date, from, to, nights, sessionDays, thresholds, journal: { entries, ignored }, tags: [{ tag, taggedSessions, taggedNights, untaggedNights, verdict, metrics: { : { nTagged, nControl (nights with a value), taggedMedian, controlMedian, medianDiff (tagged minus control), meanDiff, controlIqr, noiseThreshold, verdict } }, statement (one sentence with n, the minimum and 'an association, not a cause') }], notes, errors }, tags with most tagged nights first. HONEST VERDICTS: a metric's verdict is 'insufficient' unless there are at least 15 tagged AND 15 untagged nights with a value for it; then 'tagged-higher' / 'tagged-lower' only when |medianDiff| is LARGER than noiseThreshold = 3 * 1.25 * (controlIqr / 1.35) * sqrt(1/nTagged + 1/nControl) (3 standard errors of the difference of two medians, the spread from the untagged nights' own IQR; equal counts as within noise; compared as printed, rounded), else 'within-noise'. 4 metrics are tested per tag, so a tag's verdict is 'differs' when ANY is higher or lower ('within-noise', or 'insufficient' when all are): with no real difference a simulation flags about 9% of tags at 15 nights per group, 5% at 20 and 3% at 30, and 11% to 22% when nights are correlated 0.3, so treat one 'differs' as a lead, not a finding. It reports an ASSOCIATION in the user's own data and NEVER a cause: say so when you present it, and state n and the thresholds (they are in the result). Consecutive days are not independent samples. A session that starts after midnight counts on its own calendar day. Needs no tags to run: without any it says how to add them. Reads Suunto's workout, sleep and recovery lists (one request each) and the local journal; writes nothing. An unreadable journal file is an error. In demo mode the synthetic sessions carry the tags 'strength' and 'long-run'. Read-only.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_tag_effects"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagNoOnly this tag (ignoring case). Omit for every tag found on a session in the window.
dateNoThe day after the last night to read, YYYY-MM-DD (default today).
daysNoHow many nights the window covers, ending the day before `date` (default 90).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond readOnlyHint/openWorldHint it discloses data sources (Suunto workout, sleep, recovery lists plus the local journal, one request each), that nothing is written, that an unreadable journal file is an error, and demo-mode behavior. It also warns about statistical fragility (multiple metrics tested, correlated consecutive days, false-positive rates), which is behavioral context annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core question is front-loaded and the text is sectioned (Output, HONEST VERDICTS, caveats), but it is very long for a three-parameter read-only tool. Implementation-level details such as the 1.35*IQR conversion inside noiseThreshold and the simulation percentages add bulk beyond what an agent needs to select or call the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so the description carries the full return-value burden and does so exhaustively, enumerating every field, the sort order, verdict thresholds, error cases, and demo-mode data. For a tool of this complexity, nothing an agent needs to interpret the result is missing.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the window ends the day before `date` because the night leading into `date` may still be recording, tag matching ignores case and a multi-session day counts as one night. These aggregation and boundary rules go beyond the field descriptions.

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 opening sentence states a precise comparative question (nights after a tagged session vs. other training days) with the exact resource, tags from log_session, and the metrics tested. It also distinguishes itself from get_baselines by naming it as the source of the same per-night values, so an agent can tell the two apart without opening schemas.

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?

Usage context is clear and rich: it explains the grouping rules, that no tags are needed to run, and how to present results (as association, with n and thresholds). What it does not do is route the agent away from alternatives (e.g., when to prefer get_recovery or get_baselines instead), so it stops short of explicit when-not guidance.

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