Skip to main content
Glama

compare_policies

Compare Medicare coverage policies across jurisdictions for specific procedure codes to identify regional differences in coverage requirements.

Instructions

Compare coverage policies across different MAC jurisdictions for specific procedure codes. Useful to understand regional coverage differences for the same procedures. Shows national vs. jurisdiction-specific policies.

Examples:

  • compare_policies(["76942"]) - compare ultrasound guidance coverage nationally

  • compare_policies(["76942", "76937"], { jurisdictions: ["JM", "JH"] }) - compare specific regions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
procedure_codesYesCPT/HCPCS codes to compare (1-10 codes)
policy_typeNoFilter by policy type
jurisdictionsNoSpecific jurisdictions to compare (e.g., ['JM', 'JH'])

Implementation Reference

  • Handler function that executes the compare_policies tool logic: POSTs to Verity API /policies/compare, formats national and jurisdictional policy comparisons, handles errors.
    async ({ procedure_codes, policy_type, jurisdictions }) => { try { const result = await verityRequest<any>("/policies/compare", { method: "POST", body: { procedure_codes, policy_type, jurisdictions }, }); const lines: string[] = []; const summary = result.data.summary; lines.push(`Coverage Comparison for: ${summary.queried_codes.join(", ")}`); lines.push(`Jurisdictions analyzed: ${summary.total_jurisdictions}`); lines.push(`With coverage: ${summary.jurisdictions_with_coverage}`); lines.push(`National policies: ${summary.national_policies_count}`); lines.push(`Regional variation: ${summary.has_variation ? "YES" : "NO"}`); // National policies if (result.data.national_policies?.length > 0) { lines.push("\n--- NATIONAL POLICIES ---"); result.data.national_policies.forEach((p: any) => { lines.push(`\n${p.policy_id}: ${p.title}`); lines.push(`Type: ${p.policy_type}`); if (p.codes?.length > 0) { p.codes.forEach((c: any) => { lines.push(` - ${c.code}: ${c.disposition}`); }); } }); } // Jurisdiction comparison if (result.data.comparison?.length > 0) { lines.push("\n--- BY JURISDICTION ---"); result.data.comparison.forEach((jur: any) => { lines.push(`\n[${jur.jurisdiction}] ${jur.mac?.name || ""}`); if (jur.mac?.states) lines.push(`States: ${jur.mac.states.join(", ")}`); if (jur.coverage_summary) { const cs = jur.coverage_summary; lines.push(`Coverage: ${cs.covered} covered, ${cs.not_covered} not covered, ${cs.requires_pa} require PA, ${cs.conditional} conditional`); } if (jur.policies?.length > 0) { jur.policies.forEach((p: any) => { lines.push(` ${p.policy_id}: ${p.title}`); }); } else { lines.push(" No local policies found"); } }); } return { content: [{ type: "text", text: lines.join("\n") }], }; } catch (error) { return { content: [{ type: "text", text: `Error comparing policies: ${error instanceof Error ? error.message : String(error)}` }], }; } } ); // 5. get_policy_changes - Track policy updates
  • Zod input schema validating procedure_codes array (1-10 strings), optional policy_type enum, optional jurisdictions array.
    inputSchema: { procedure_codes: z .array(z.string()) .min(1) .max(10) .describe("CPT/HCPCS codes to compare (1-10 codes)"), policy_type: z.enum(["LCD", "Article", "NCD"]).optional().describe("Filter by policy type"), jurisdictions: z .array(z.string()) .max(10) .optional() .describe("Specific jurisdictions to compare (e.g., ['JM', 'JH'])"), }, },
  • src/index.ts:398-486 (registration)
    MCP server registration of the compare_policies tool, including description, input schema, and handler function.
    server.registerTool( "compare_policies", { description: `Compare coverage policies across different MAC jurisdictions for specific procedure codes. Useful to understand regional coverage differences for the same procedures. Shows national vs. jurisdiction-specific policies. Examples: - compare_policies(["76942"]) - compare ultrasound guidance coverage nationally - compare_policies(["76942", "76937"], { jurisdictions: ["JM", "JH"] }) - compare specific regions`, inputSchema: { procedure_codes: z .array(z.string()) .min(1) .max(10) .describe("CPT/HCPCS codes to compare (1-10 codes)"), policy_type: z.enum(["LCD", "Article", "NCD"]).optional().describe("Filter by policy type"), jurisdictions: z .array(z.string()) .max(10) .optional() .describe("Specific jurisdictions to compare (e.g., ['JM', 'JH'])"), }, }, async ({ procedure_codes, policy_type, jurisdictions }) => { try { const result = await verityRequest<any>("/policies/compare", { method: "POST", body: { procedure_codes, policy_type, jurisdictions }, }); const lines: string[] = []; const summary = result.data.summary; lines.push(`Coverage Comparison for: ${summary.queried_codes.join(", ")}`); lines.push(`Jurisdictions analyzed: ${summary.total_jurisdictions}`); lines.push(`With coverage: ${summary.jurisdictions_with_coverage}`); lines.push(`National policies: ${summary.national_policies_count}`); lines.push(`Regional variation: ${summary.has_variation ? "YES" : "NO"}`); // National policies if (result.data.national_policies?.length > 0) { lines.push("\n--- NATIONAL POLICIES ---"); result.data.national_policies.forEach((p: any) => { lines.push(`\n${p.policy_id}: ${p.title}`); lines.push(`Type: ${p.policy_type}`); if (p.codes?.length > 0) { p.codes.forEach((c: any) => { lines.push(` - ${c.code}: ${c.disposition}`); }); } }); } // Jurisdiction comparison if (result.data.comparison?.length > 0) { lines.push("\n--- BY JURISDICTION ---"); result.data.comparison.forEach((jur: any) => { lines.push(`\n[${jur.jurisdiction}] ${jur.mac?.name || ""}`); if (jur.mac?.states) lines.push(`States: ${jur.mac.states.join(", ")}`); if (jur.coverage_summary) { const cs = jur.coverage_summary; lines.push(`Coverage: ${cs.covered} covered, ${cs.not_covered} not covered, ${cs.requires_pa} require PA, ${cs.conditional} conditional`); } if (jur.policies?.length > 0) { jur.policies.forEach((p: any) => { lines.push(` ${p.policy_id}: ${p.title}`); }); } else { lines.push(" No local policies found"); } }); } return { content: [{ type: "text", text: lines.join("\n") }], }; } catch (error) { return { content: [{ type: "text", text: `Error comparing policies: ${error instanceof Error ? error.message : String(error)}` }], }; } } ); // 5. get_policy_changes - Track policy updates server.registerTool(

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tylerbryy/verity_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server