Skip to content

fix(mcp): replace compare_payers with compare_practice_to_community + add .env.example#8

Merged
byteworthy merged 1 commit into
mainfrom
fix/compare-payers-rewrite
May 14, 2026
Merged

fix(mcp): replace compare_payers with compare_practice_to_community + add .env.example#8
byteworthy merged 1 commit into
mainfrom
fix/compare-payers-rewrite

Conversation

@byteworthy
Copy link
Copy Markdown
Collaborator

Two fixes from the 2026-05-14 audit

1. compare_payers was semantically wrong

Backend /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 at upstream/api/v1/public/payer_scorecard.py:31-37):

  • required: email, payer, specialty
  • optional: your_denial_rate, your_days_to_pay, your_appeal_win_rate

Marked [Free, lead-capture] in README (was [Paid]).

2. Missing .env.example

README told users to cp .env.example .env but there was no .env.example to copy. Created one with UPSTREAM_API_KEY and two optional knobs.

Build + 9 tests pass.

🤖 Generated with Claude Code

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>
@byteworthy byteworthy merged commit 0e0db7b into main May 14, 2026
7 checks passed
@byteworthy byteworthy deleted the fix/compare-payers-rewrite branch May 14, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant