Skip to main content
Glama

Why it worked

why_it_worked
Read-onlyIdempotent

Use this when the user wants to know what their better posts have in common: "why did that one do well", "what should I do more of". Compares 24-hour views by clip length, caption length, platform, weekday, time of day and title; returns the biggest gaps with group sizes and how likely each is luck, and a warning when posts are too few (under 10 compares nothing). These are differences in the data, never proof of a cause: say so. Not for: predicting views of a new clip or a recap (weekly_report). Free and 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": "why_it_worked"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoLook back this many days of the user's posts.
timezoneNoIANA time zone for weekday and time of day, e.g. America/Chicago.UTC

Output Schema

NameRequiredDescriptionDefault
noteYes
warningYes
findingsYes
confidenceYes
not_checkedYes
period_daysYes
typical_views_24hYes
posts_with_24h_viewsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / days / description
      Added value: +"Look back this many days of the user's posts."
    • removedInput schema / properties / days / title
      Removed value: -"Days"
    • addedInput schema / properties / timezone / description
      Added value: +"IANA time zone for weekday and time of day, e.g. America/Chicago."
    • removedInput schema / properties / timezone / title
      Removed value: -"Timezone"
    • removedInput schema / title
      Removed value: -"why_it_worked_routeArguments"
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so 'Free and read only' is largely redundant. However, the description adds genuinely valuable behavior the annotations cannot convey: it discloses the minimum-sample guard (under 10 posts compares nothing), that gaps are reported with group sizes and a luck likelihood, and that results are correlational and must not be presented as causal. That is meaningful disclosure beyond structured fields, though the closing redundancy costs it a point.

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?

Front-loads the usage trigger before the mechanics, then the exclusion, then the caveat. Dense but every clause carries information except the trailing 'Free and read only', which is minor.

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?

An output schema exists so return values need not be explained, and the description nonetheless sketches what comes back (biggest gaps, group sizes, luck likelihood, small-sample warning). It is complete for correct invocation; the only soft spot is not saying anything about how the 'likelihood it's luck' is computed, which is arguably out of scope.

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

Parameters5/5

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

Schema description coverage is 100% and both parameters (days, timezone) are fully documented in-schema, so the baseline would be 3. The description goes further by naming the specific dimensions the comparison groups by and by stating the timezone's purpose (weekday and time-of-day bucketing), which explains why a timezone matters here at all.

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 analytical operation (comparing 24-hour views across clip length, caption length, platform, weekday, time of day, title) and frames it around the user's actual question. The 'Not for: predicting views of a new clip or a recap (weekly_report)' clause separates it cleanly from the nearest sibling.

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

Usage Guidelines5/5

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

Gives explicit trigger phrasing ('why did that one do well', 'what should I do more of'), an explicit exclusion ('Not for: predicting views... or a recap'), and names the alternative tool (weekly_report) for the excluded case. Both the when and the when-not are covered.

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