fix(mcp): replace compare_payers with compare_practice_to_community + add .env.example#8
Merged
Merged
Conversation
The backend /api/v1/public/payer-scorecard/compare/ is NOT a "compare
two payers" endpoint — it is an email-gated "compare YOUR practice
metrics against the network aggregate for ONE payer + specialty"
lead-capture endpoint (Django view docstring confirms).
The old compare_payers tool sent {payer_a, payer_b} and got
400 "Valid email is required." Every invocation failed silently.
Rename to compare_practice_to_community. Update schema to require
email + payer + specialty + optional your_denial_rate /
your_days_to_pay / your_appeal_win_rate (matches Django view fields
verified at upstream/api/v1/public/payer_scorecard.py:31-37).
Also adds .env.example (was missing; README told users to copy it
and there was nothing to copy).
Build + 9 tests pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes from the 2026-05-14 audit
1.
compare_payerswas semantically wrongBackend
/api/v1/public/payer-scorecard/compare/is not a two-payer comparison; it's an email-gated "compare YOUR practice metrics against the network aggregate for ONE payer + specialty" lead-capture endpoint.Old tool sent
{payer_a, payer_b}→ 400 "Valid email is required." Every invocation failed silently.Renamed to
compare_practice_to_community. Schema now matches the Django view (verified atupstream/api/v1/public/payer_scorecard.py:31-37):email,payer,specialtyyour_denial_rate,your_days_to_pay,your_appeal_win_rateMarked
[Free, lead-capture]in README (was[Paid]).2. Missing
.env.exampleREADME told users to
cp .env.example .envbut there was no.env.exampleto copy. Created one withUPSTREAM_API_KEYand two optional knobs.Build + 9 tests pass.
🤖 Generated with Claude Code