Skip to content

Commit 0aeceee

Browse files
byteworthyclaude
andcommitted
feat(mcp): dental + ABA tool surface for agentic orchestration
Adds 4 new MCP tools so agents (Claude, OpenClaw) can drive the launch- priority packs end-to-end: Dental (3 new): - query_dental_fee_schedule: per-payer+CDT rate, network status, drift - score_dental_claim_denial_risk: CatBoost denial risk with SHAP factors, heuristic fallback - get_dental_payer_drift: 90-day reimbursement/denial/silent-PPO patterns ABA (1 new, alongside existing get_aba_session_tracker): - get_aba_payer_comparison: payer-side approval rates for 97151-97158 All tools call existing /api/v1/dental/ and /api/v1/aba/ endpoints; no new backend surface required. Registered in src/index.ts tools array. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 239ea0e commit 0aeceee

5 files changed

Lines changed: 106 additions & 0 deletions

File tree

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ import { getIndustrySignals } from './tools/get_industry_signals.js';
1919
import { checkPriorAuthReadiness } from './tools/check_prior_auth_readiness.js';
2020
import { getDenialClusters } from './tools/get_denial_clusters.js';
2121
import { getAbaSessionTracker } from './tools/get_aba_session_tracker.js';
22+
import { getAbaPayerComparison } from './tools/get_aba_payer_comparison.js';
2223
import { getPatientPropensity } from './tools/get_patient_propensity.js';
24+
import { queryDentalFeeSchedule } from './tools/query_dental_fee_schedule.js';
25+
import { scoreDentalClaimDenialRisk } from './tools/score_dental_claim_denial_risk.js';
26+
import { getDentalPayerDrift } from './tools/get_dental_payer_drift.js';
2327

2428
const tools = [
2529
checkNcciEdits,
@@ -33,7 +37,11 @@ const tools = [
3337
checkPriorAuthReadiness,
3438
getDenialClusters,
3539
getAbaSessionTracker,
40+
getAbaPayerComparison,
3641
getPatientPropensity,
42+
queryDentalFeeSchedule,
43+
scoreDentalClaimDenialRisk,
44+
getDentalPayerDrift,
3745
];
3846

3947
const server = new Server(
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { UpstreamAPIClient } from '../client.js';
2+
3+
export const getAbaPayerComparison = {
4+
name: 'get_aba_payer_comparison',
5+
description:
6+
'Returns payer-side approval rates for the seven ABA CPT codes (97151-97158) across active payers. ' +
7+
'Use to identify which payers are denying the highest-revenue ABA codes, ' +
8+
'so you can target appeals, escalations, and contract renegotiations.',
9+
inputSchema: {
10+
type: 'object',
11+
properties: {},
12+
required: [],
13+
},
14+
async execute(client: UpstreamAPIClient) {
15+
return client.get(`/api/v1/aba/payer-comparison/`);
16+
},
17+
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { UpstreamAPIClient } from '../client.js';
2+
3+
export const getDentalPayerDrift = {
4+
name: 'get_dental_payer_drift',
5+
description:
6+
'Returns dental payer behavioral drift: reimbursement ratio drops, denial rate spikes, ' +
7+
'silent PPO indicators, and downcoding patterns over the last 90 days. ' +
8+
'Used to detect payers quietly changing their dental contracts before they cost you revenue.',
9+
inputSchema: {
10+
type: 'object',
11+
properties: {
12+
payer: {
13+
type: 'string',
14+
description: 'Optional payer filter; omit to get all payers',
15+
},
16+
},
17+
required: [],
18+
},
19+
async execute(client: UpstreamAPIClient, args: { payer?: string }) {
20+
const qs = new URLSearchParams();
21+
if (args.payer) qs.set('payer', args.payer);
22+
return client.get(`/api/v1/dental/payer-drift/?${qs.toString()}`);
23+
},
24+
};
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { UpstreamAPIClient } from '../client.js';
2+
3+
export const queryDentalFeeSchedule = {
4+
name: 'query_dental_fee_schedule',
5+
description:
6+
'Returns the current Upstream-tracked dental fee schedule for a given payer + CDT code. ' +
7+
'Includes posted rate, network status, last drift event, and reimbursement ratio versus UCR. ' +
8+
'Use to detect silent PPO leases, downcoding, and reimbursement drift before submitting claims.',
9+
inputSchema: {
10+
type: 'object',
11+
properties: {
12+
payer: {
13+
type: 'string',
14+
description: 'Payer name as it appears in the dental fee schedule (e.g. "Delta Dental of Texas")',
15+
},
16+
cdt_code: {
17+
type: 'string',
18+
description: 'CDT procedure code (e.g. "D2740")',
19+
},
20+
},
21+
required: ['payer', 'cdt_code'],
22+
},
23+
async execute(client: UpstreamAPIClient, args: { payer: string; cdt_code: string }) {
24+
const qs = new URLSearchParams({ payer: args.payer, cdt: args.cdt_code });
25+
return client.get(`/api/v1/dental/fee-schedule/?${qs.toString()}`);
26+
},
27+
};
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { UpstreamAPIClient } from '../client.js';
2+
3+
export const scoreDentalClaimDenialRisk = {
4+
name: 'score_dental_claim_denial_risk',
5+
description:
6+
'Scores pending/recent dental claims for denial risk using the trained CatBoost model. ' +
7+
'Returns per-claim risk score (0-100), risk band, top contributing factors (SHAP attribution), ' +
8+
'and recommended pre-submission actions. Falls back to heuristic when CatBoost model is not trained.',
9+
inputSchema: {
10+
type: 'object',
11+
properties: {
12+
limit: {
13+
type: 'integer',
14+
description: 'Maximum claims to score (default 25, max 100)',
15+
default: 25,
16+
},
17+
status_filter: {
18+
type: 'string',
19+
description: 'Optional filter: "pending" or "recent". Default returns both.',
20+
},
21+
},
22+
required: [],
23+
},
24+
async execute(client: UpstreamAPIClient, args: { limit?: number; status_filter?: string }) {
25+
const qs = new URLSearchParams();
26+
if (args.limit) qs.set('limit', String(args.limit));
27+
if (args.status_filter) qs.set('status', args.status_filter);
28+
return client.get(`/api/v1/dental/claims-intelligence/?${qs.toString()}`);
29+
},
30+
};

0 commit comments

Comments
 (0)