Skip to main content
Glama

Get Star Decomposition

get_star_decomposition
Read-onlyIdempotent

How a contract's star is built, and what moves it to the next line. For one Medicare Advantage contract and rating year: for the Overall, Part C and Part D summaries, the raw score (the weighted mean of the measure stars), the categorical adjustment (CAI), the reward factor, the score before rounding, the published star and the recomputed one, the cushion above the line the star was earned at and the gap to the next half-star line (and to 3.75, which rounds to 4.0). Then every measure: score, star, weight, direction, the next star's cut point and the distance to it in the measure's own units, and what one more star on it adds to each summary's raw score; plus the shortest list of one-star gains that closes the gap to the next line.

ARGUMENTS: contract_id (required, e.g. H5216), rating_year (default the newest held for the contract), limit (measure rows, default 60).

RETURNS value.summary (contract, rating_year, pays_in, parts: one block per summary with its decomposition, gaps and path) and value.measures (one row per measure).

RULES THE TOOL ENFORCES: the arithmetic is CMS's (the raw score over the measure set CMS used, picked so the weights add up to the recompute engine's total; the Overall leaves out the two Part D measures that duplicate Part C); one more star adds weight / total weight to the raw score; the path holds the CAI and the reward factor constant and says so; distances are in the measure's own units and direction (for a lower-is-better measure the score must fall); survey (CAHPS) cut points are approximate, because CMS also tests significance and reliability; improvement measures have no cut point. The recomputed star is the engine's, the published star is CMS's; where they differ the row says why.

SOURCE: CMS Part C and D Star Ratings Data Tables and Technical Notes, through Vlada's recompute engine, which reproduces 98.4% of every star CMS published (RY2015-2027) exactly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
contract_idYes
rating_yearNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitNo
as_ofNo
valueYes
sourceYes
statusNocomplete
caveatsNo
failureNo
qualityNo
refusalNo
vintageNoas_restated
audit_idYesUUID; ties to medicare_silver.audit_log row.
signatureNo
tenant_idNoCalling tenant slug, resolved by the binding and stamped via the per-call tenant context. Defaults to the bootstrap 'internal' tenant for local/in-process callers.
timestampYes
confidenceNo
data_as_ofNo
request_idYes
methodologyNo
snapshot_setYes{table_fqn → iceberg_snapshot_id (int64)}. Per M-2 §2.2.
tool_versionYes
response_hashYesSHA-256 of canonicalized form per M-2 §2.4.
result_statusYes
vintage_basisNodefault_unmeasured
as_of_assertedNo
as_of_observedNo
parse_revisionNo
as_of_effectiveNo
freshness_stateNounknown
methodology_eraNo
confidence_basisNo
semantic_versionYes
invariants_appliedNo
finality_confidenceNo
cms_vintage_sequenceYes
parser_artifact_hashYes
methodology_blend_factorsNo
parser_artifact_hash_basisNonot_evaluated

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources