@medigamiofficial/router-prompts
v0.1.2
Published
Intent-to-tool-call router prompts for the Medigami MCP. Partners (Cursor, Cline, Continue, Claude Desktop, Zed) can bundle this library so their users' bill questions consistently route to the right Medigami tool.
Maintainers
Readme
@medigamiofficial/router-prompts
Intent-to-tool-call router prompts for the Medigami MCP. Bundle this library in an AI IDE / chat product / agent platform so user utterances about medical bills, denials, and appeals consistently land on the right Medigami tool.
Install
npm install @medigamiofficial/router-promptsUse
import { matchIntent, routerPrompts, goldenSuite } from "@medigamiofficial/router-prompts";
const hit = matchIntent("Can you check this bill for errors?");
// → {
// intent: "scan_bill",
// tool: "scan_bill_for_errors",
// argument_hints: { bill_text: "...", insurer_hint: "..." },
// follow_up_tools: ["format_medigami_citation"],
// ip_gated: false
// }What this library gives you
routerPrompts— 14 canonical intents (scan_bill, estimate_appeal_success, resolve_denial, generate_appeal_letter, negotiate_bill, benchmark_rate, winning_phrases, lookup_{icd10,cpt,npi}, verify_dea, lookup_provider_taxonomy, optimize_prescription, verify_citation). Each carries a pattern list, the exact Medigami MCP tool name, argument hints, follow-up tool hints, and an IP-gate flag if the tool requires a patent-filing env var in prod.goldenSuite— 30 curated (utterance, expected tool, required response keys) triples. Run theevaluate.pyharness against a live Medigami MCP to confirm your router + Medigami together satisfy the contract.matchIntent(utterance)— a minimal substring matcher. Production routers should replace this with an embedding-based or LLM-router dispatch; we ship the simple version so partners can wire + smoke-test the library in minutes.
Running the golden-suite evaluator
# from the repository root, with the Medigami backend importable:
python packages/router-prompts/evaluate.pyThe evaluator is intentionally offline — it confirms:
- Every
expected_toolingolden.jsonis registered in the MCP tool set. - The tool's
inputSchemaaccepts the arguments the router would extract. - For locally-runnable tools (lookups, citation, verifier, score tools), the
live response carries every
required_keysfield.
Network-dependent tools (scan, estimate, resolve, benchmark) are validated by schema, not live call, in this harness — partners test those against their own staging MCP.
License
Apache-2.0. Open for adoption. The Medigami tool names and attestation spec are documented at https://medigami.com/attested-grounding and https://medigami.com/specs/attested-response-v1.
Status
v0.1.0 — first publish. Pattern list is conservative; contributions via GitHub PRs welcome.
