Skip to main content
Glama
mcp-fleaflicker

mcp-fleaflicker

by pete-builds

Score Stat Line

score_stat_line
Read-onlyIdempotent

Score a single game's stat line using a Fleaflicker league's own published scoring rules, applying its real bonuses, thresholds, and position restrictions instead of generic PPR approximations.

Instructions

Score one game's stat line under a league's real scoring rules.

Fetches the league's published rules and applies them, so bonuses, thresholds, and position restrictions are the league's own, not a generic PPR approximation.

Score one game at a time. Every bonus in a Fleaflicker rule set fires on a single game's box score, so a season total run through this tool will miscount them: a receiver with 2,000 yards over 17 games earns the 150-yard bonus only in the games he actually cleared 150.

Call get_league_rules for the valid stat keys (data.scoring.stat_keys). A plain number is a count or total. A list is the per-event yardage that distance bonuses need: {"passing_td": [45, 12]} is two passing touchdowns, one of 45 yards and one of 12, scoring the flat rule twice and the 40-to-79 bonus once. Passing {"passing_td": 2} scores the flat rule and reports the bonus under unresolved_bonuses rather than silently scoring it as zero.

Returns JSON with data.total (the score), data.breakdown[] (one entry per contributing rule, with category, group, kind, points, rule, and detail showing the arithmetic), data.unscored_keys[] (keys this league does not score, usually a typo), and data.unresolved_bonuses[] (distance bonuses that needed a list).

A stat key that matches more than one scoring group fails with INVALID_INPUT and names the alternatives, rather than guessing. In most leagues interception is the one that collides: use passing_interception (thrown, negative) or defense_interception (caught, positive).

Idempotent: yes, pure computation over a read-only rule fetch.

Example: score_stat_line(stats={"passing_yard": 318, "passing_td": [45, 12], "passing_interception": 1}, position="QB")

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "stats": "<stats>"
    },
    "name": "score_stat_line"
  }
}

Input Schema

NameRequiredDescriptionDefault
statsYesStat key to value, as an object (or a JSON object string).
positionNoRoster position, for position-restricted rules such as receptions (skill positions only) or fumble recoveries (D/ST only). Defaults to "WR".WR
league_idNoFleaflicker league id. Defaults to FLEAFLICKER_LEAGUE_ID.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive and openWorld, so the safety profile is covered; the description goes well beyond by disclosing failure modes: ambiguous stat keys raise INVALID_INPUT with named alternatives, and list-less distance bonuses land in `unresolved_bonuses` rather than silently scoring zero. It also names the most likely collision (`interception` vs `passing_interception`/`defense_interception`), which is exactly the kind of non-obvious behavior an agent cannot infer from annotations.

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?

Front-loaded with purpose and the per-game constraint, then the input format, then return shape — a sensible order with no filler sentences. The closing "Idempotent: yes" line largely restates the annotation and is the only real redundancy in an otherwise dense description.

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?

For a pure-computation tool with three parameters, the definition covers the input format, prerequisite rule fetch, error semantics, and return fields. It even duplicates output structure despite an output schema existing, which is slightly redundant but leaves no gap an agent needs in order to invoke it correctly.

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 coverage is 100%, so baseline would be 3, but the description adds substantial meaning the schema does not: a plain number is a count while a list encodes per-event yardage needed for distance bonuses, illustrated with `{"passing_td": [45, 12]}`. The position parameter's role in position-restricted rules is also explained beyond its schema text.

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 verb and resource — scoring one game's stat line under a league's published rules — and immediately contrasts it with the generic PPR approximation an agent might otherwise assume. It is clearly distinguishable from the sibling read tools (get_league_rules, get_boxscore) because those supply inputs rather than compute a score.

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 an explicit when-to-use constraint ("Score one game at a time"), a concrete when-not-to-use case with the reason (season totals will miscount distance bonuses across games), and a prerequisite call (`get_league_rules` for valid stat keys). The receiver/150-yard example makes the exclusion concrete rather than abstract.

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