list_jurisdictions
Find the Medicare Administrative Contractor jurisdiction for a patient's state by retrieving MAC names, jurisdiction codes, and covered states.
Instructions
Get list of Medicare Administrative Contractor (MAC) jurisdictions. Returns MAC names, jurisdiction codes, and covered states. Use this to find the right jurisdiction for a patient's state.
Example:
list_jurisdictions() - get all MAC jurisdictions and their states
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:626-649 (handler)Handler function that fetches the list of MAC jurisdictions from the Verity API endpoint '/jurisdictions' and formats them into a readable text output including jurisdiction codes, MAC names, states, types, and websites.async () => { try { const result = await verityRequest<any>("/jurisdictions"); const lines: string[] = [`MAC Jurisdictions (${result.data.length} total):\n`]; result.data.forEach((jur: any) => { lines.push(`[${jur.jurisdiction_code}] ${jur.jurisdiction_name || ""}`); lines.push(` MAC: ${jur.mac_name}${jur.mac_code ? ` (${jur.mac_code})` : ""}`); if (jur.states?.length) lines.push(` States: ${jur.states.join(", ")}`); if (jur.mac_type) lines.push(` Type: ${jur.mac_type}`); if (jur.website_url) lines.push(` Website: ${jur.website_url}`); lines.push(""); }); return { content: [{ type: "text", text: lines.join("\n") }], }; } catch (error) { return { content: [{ type: "text", text: `Error listing jurisdictions: ${error instanceof Error ? error.message : String(error)}` }], }; } }
- src/index.ts:615-650 (registration)Registration of the 'list_jurisdictions' tool with the MCP server, including description, empty input schema (no parameters), and reference to the handler function.server.registerTool( "list_jurisdictions", { description: `Get list of Medicare Administrative Contractor (MAC) jurisdictions. Returns MAC names, jurisdiction codes, and covered states. Use this to find the right jurisdiction for a patient's state. Example: - list_jurisdictions() - get all MAC jurisdictions and their states`, inputSchema: {}, }, async () => { try { const result = await verityRequest<any>("/jurisdictions"); const lines: string[] = [`MAC Jurisdictions (${result.data.length} total):\n`]; result.data.forEach((jur: any) => { lines.push(`[${jur.jurisdiction_code}] ${jur.jurisdiction_name || ""}`); lines.push(` MAC: ${jur.mac_name}${jur.mac_code ? ` (${jur.mac_code})` : ""}`); if (jur.states?.length) lines.push(` States: ${jur.states.join(", ")}`); if (jur.mac_type) lines.push(` Type: ${jur.mac_type}`); if (jur.website_url) lines.push(` Website: ${jur.website_url}`); lines.push(""); }); return { content: [{ type: "text", text: lines.join("\n") }], }; } catch (error) { return { content: [{ type: "text", text: `Error listing jurisdictions: ${error instanceof Error ? error.message : String(error)}` }], }; } } );
- src/index.ts:617-625 (schema)Tool schema defining the description and input schema (empty, as the tool takes no parameters).{ description: `Get list of Medicare Administrative Contractor (MAC) jurisdictions. Returns MAC names, jurisdiction codes, and covered states. Use this to find the right jurisdiction for a patient's state. Example: - list_jurisdictions() - get all MAC jurisdictions and their states`, inputSchema: {}, },