Skip to main content
Glama

get_policy_changes

Track Medicare coverage policy updates, new policies, and retirements by filtering changes by date, policy ID, or change type.

Instructions

Track recent changes to Medicare coverage policies. Useful for monitoring updates, new policies, and retirements. Can filter by date, policy ID, or change type.

Examples:

  • get_policy_changes() - recent changes

  • get_policy_changes({ since: "2024-01-01T00:00:00Z" }) - changes since date

  • get_policy_changes({ policy_id: "L33831" }) - changes to specific policy

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sinceNoISO8601 timestamp - only changes after this date
policy_idNoFilter to a specific policy
change_typeNoFilter by type of change
limitNoResults per page
cursorNoPagination cursor

Implementation Reference

  • The main handler function that queries the Verity API for policy changes based on input parameters, handles pagination, and formats the results into a structured text response for the MCP client.
    async ({ since, policy_id, change_type, limit, cursor }) => { try { const result = await verityRequest<any>("/policies/changes", { params: { since, policy_id, change_type, limit, cursor }, }); if (!result.data || result.data.length === 0) { return { content: [{ type: "text", text: "No policy changes found for the specified criteria." }], }; } const lines: string[] = [`Found ${result.data.length} policy changes:\n`]; result.data.forEach((change: any) => { lines.push(`[${change.change_type.toUpperCase()}] ${change.policy_id}: ${change.policy_title}`); if (change.changed_at) lines.push(` Date: ${change.changed_at}`); if (change.change_summary) lines.push(` Summary: ${change.change_summary}`); if (change.details?.changed_fields) lines.push(` Fields: ${change.details.changed_fields.join(", ")}`); if (change.details?.added_codes?.length) lines.push(` Added codes: ${change.details.added_codes.join(", ")}`); if (change.details?.removed_codes?.length) lines.push(` Removed codes: ${change.details.removed_codes.join(", ")}`); lines.push(""); }); if (result.meta?.pagination?.cursor) { lines.push(`More changes available. Use cursor: "${result.meta.pagination.cursor}"`); } return { content: [{ type: "text", text: lines.join("\n") }], }; } catch (error) { return { content: [{ type: "text", text: `Error getting policy changes: ${error instanceof Error ? error.message : String(error)}` }], }; } }
  • Zod-based input schema defining optional parameters for filtering policy changes by date, ID, type, with pagination support.
    inputSchema: { since: z.string().optional().describe("ISO8601 timestamp - only changes after this date"), policy_id: z.string().max(50).optional().describe("Filter to a specific policy"), change_type: z .enum(["created", "updated", "retired", "codes_changed", "criteria_changed", "metadata_changed"]) .optional() .describe("Filter by type of change"), limit: z.number().min(1).max(100).default(20).describe("Results per page"), cursor: z.string().optional().describe("Pagination cursor"), },
  • src/index.ts:486-545 (registration)
    The server.registerTool call that registers the 'get_policy_changes' tool with the MCP server, including its description, input schema, and handler function.
    server.registerTool( "get_policy_changes", { description: `Track recent changes to Medicare coverage policies. Useful for monitoring updates, new policies, and retirements. Can filter by date, policy ID, or change type. Examples: - get_policy_changes() - recent changes - get_policy_changes({ since: "2024-01-01T00:00:00Z" }) - changes since date - get_policy_changes({ policy_id: "L33831" }) - changes to specific policy`, inputSchema: { since: z.string().optional().describe("ISO8601 timestamp - only changes after this date"), policy_id: z.string().max(50).optional().describe("Filter to a specific policy"), change_type: z .enum(["created", "updated", "retired", "codes_changed", "criteria_changed", "metadata_changed"]) .optional() .describe("Filter by type of change"), limit: z.number().min(1).max(100).default(20).describe("Results per page"), cursor: z.string().optional().describe("Pagination cursor"), }, }, async ({ since, policy_id, change_type, limit, cursor }) => { try { const result = await verityRequest<any>("/policies/changes", { params: { since, policy_id, change_type, limit, cursor }, }); if (!result.data || result.data.length === 0) { return { content: [{ type: "text", text: "No policy changes found for the specified criteria." }], }; } const lines: string[] = [`Found ${result.data.length} policy changes:\n`]; result.data.forEach((change: any) => { lines.push(`[${change.change_type.toUpperCase()}] ${change.policy_id}: ${change.policy_title}`); if (change.changed_at) lines.push(` Date: ${change.changed_at}`); if (change.change_summary) lines.push(` Summary: ${change.change_summary}`); if (change.details?.changed_fields) lines.push(` Fields: ${change.details.changed_fields.join(", ")}`); if (change.details?.added_codes?.length) lines.push(` Added codes: ${change.details.added_codes.join(", ")}`); if (change.details?.removed_codes?.length) lines.push(` Removed codes: ${change.details.removed_codes.join(", ")}`); lines.push(""); }); if (result.meta?.pagination?.cursor) { lines.push(`More changes available. Use cursor: "${result.meta.pagination.cursor}"`); } return { content: [{ type: "text", text: lines.join("\n") }], }; } catch (error) { return { content: [{ type: "text", text: `Error getting policy changes: ${error instanceof Error ? error.message : String(error)}` }], }; } } );

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/tylergibbs1/verity_mcp'

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