From 22355f90acdb2ebf64ff39f0a9c9091cda4202c8 Mon Sep 17 00:00:00 2001 From: byteworthy Date: Fri, 19 Jun 2026 14:50:43 -0500 Subject: [PATCH] fix(mcp): register or remove dead agentic tool imports (B11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three agentic tools were imported but never added to the served tools array, making them unreachable dead code: convene_llm_council and draft_care_action (src/tools/actions.ts) and generate_pas_payload (src/tools/da_vinci.ts). The adding commits stopped short of the array, shipped no tests, no CHANGELOG, and no README — staged-but-unfinished, not finished-and-forgotten. Removed rather than registered: convene_llm_council and draft_care_action forward to upstream-data endpoints that call frontier LLMs through OpenRouter (no HIPAA BAA), and the council endpoint runs no DLP scrub on its input, so exposing them on a public MCP client would re-open the PHI boundary the dataset tools were re-derived to close. git history retains the source if a properly bounded, tested version is wired in later. --- CHANGELOG.md | 12 +++++++++++ src/index.ts | 1 - src/tools/actions.ts | 50 ------------------------------------------- src/tools/da_vinci.ts | 26 ---------------------- 4 files changed, 12 insertions(+), 77 deletions(-) delete mode 100644 src/tools/actions.ts delete mode 100644 src/tools/da_vinci.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index a730e7e..f42a70c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 paths move from `/api/v1/data/packs/{id}/*` to `/api/v1/data/catalog/{dataset_id}/*`. +### Removed + +- **Three unfinished agentic tools removed before any release** (`convene_llm_council`, + `draft_care_action`, `generate_pas_payload`). They were imported but never added to the + served tools array, shipped without tests, CHANGELOG, or README, and were unreachable as + dead code. Two of them (`convene_llm_council`, `draft_care_action`) forward to the + upstream-data `/api/v1/score/council` and `/api/v1/actions/draft` endpoints, which call + frontier LLMs through OpenRouter — a provider with no HIPAA BAA — and the council endpoint + performs no DLP scrub on its input, so exposing them on a public MCP client would re-open + the PHI boundary the dataset tools were re-derived to close. Removed rather than registered; + git history retains the source if a properly bounded, tested version is wired in later. + ### Added - `UpstreamClientConfig` + `UPSTREAM_DATA_CONFIG`: the hardened API client is now diff --git a/src/index.ts b/src/index.ts index 1c6ae84..6431b9c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,7 +34,6 @@ import { import { getDentalPayerDrift } from './tools/get_dental_payer_drift.js'; import { getBenchmarkHistory, getBenchmarkLeaderboard, getModelScores } from './tools/benchmark.js'; import { getBenchmarkReport, runBenchmark, scoreClaim, synthesizeClaims } from './tools/claims.js'; -import { conveneLlmCouncil, draftCareAction } from './tools/actions.js'; type ToolDefinition = { name: string; diff --git a/src/tools/actions.ts b/src/tools/actions.ts deleted file mode 100644 index 257d21c..0000000 --- a/src/tools/actions.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { UpstreamAPIClient } from '../client.js'; - -export const conveneLlmCouncil = { - name: 'convene_llm_council', - service: 'data' as const, - description: - 'Convene a panel of frontier LLMs (GPT-4o, Claude, Gemini) to debate and score ' + - 'the denial risk of a complex claim. Use this when you need an ensemble verdict.', - inputSchema: { - type: 'object', - properties: { - payer: { type: 'string', description: 'Payer archetype or ID' }, - cpt: { type: 'string', description: 'Primary CPT code' }, - has_prior_auth: { type: 'boolean', description: 'Whether prior auth is on file' }, - charge_amount: { type: 'number', description: 'Total billed charge' }, - allowed_amount: { type: 'number', description: 'Expected allowed amount' }, - }, - required: ['payer', 'cpt', 'has_prior_auth', 'charge_amount', 'allowed_amount'], - }, - async execute(client: UpstreamAPIClient, args: Record) { - return client.post('/api/v1/score/council', args); - }, -}; - -export const draftCareAction = { - name: 'draft_care_action', - service: 'data' as const, - description: - 'Draft a care action (e.g., appeal letter, prior auth justification) based on a ' + - "claim's risk score. Returns professional, authoritative text.", - inputSchema: { - type: 'object', - properties: { - claim: { type: 'object', description: 'The original claim details' }, - target_action: { - type: 'string', - description: - "Type of action to draft: 'appeal_letter', 'prior_auth_justification', or 'claim_correction'", - }, - risk_context: { - type: 'object', - description: 'The risk context object (either DenialRiskScore or CouncilResult)', - }, - }, - required: ['claim', 'target_action', 'risk_context'], - }, - async execute(client: UpstreamAPIClient, args: Record) { - return client.post('/api/v1/actions/draft', args); - }, -}; diff --git a/src/tools/da_vinci.ts b/src/tools/da_vinci.ts deleted file mode 100644 index d2c8d9c..0000000 --- a/src/tools/da_vinci.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { UpstreamAPIClient } from '../client.js'; - -export const generatePasPayload = { - name: "generate_pas_payload", - service: "data" as const, - description: - "Generate an HL7 Da Vinci Prior Authorization Support (PAS) intelligence payload. " + - "Combines CatBoost denial risk scoring with CQL (Clinical Quality Language) rule evaluation.", - inputSchema: { - type: "object", - properties: { - payer: { type: "string", description: "Payer archetype or ID" }, - cpt: { type: "string", description: "Primary CPT code" }, - has_prior_auth: { type: "boolean", description: "Whether prior auth is on file" }, - charge_amount: { type: "number", description: "Total billed charge" }, - allowed_amount: { type: "number", description: "Expected allowed amount" }, - }, - required: ["payer", "cpt", "has_prior_auth", "charge_amount", "allowed_amount"], - }, - annotations: { - title: "Generate Da Vinci PAS Payload", - }, - async execute(client: UpstreamAPIClient, args: Record) { - return client.post('/api/v1/score/da-vinci-pas', args); - }, -};