[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [CMS Part B drug payment limits](https://spiral.ai/integrations/opencode/cms-part-b-drug-payment-limits)

# How to Use CMS Part B drug payment limits in opencode

Returns a quarter’s CMS Medicare Part B drug payment limits by billing code, with associated NDC crosswalk details. Use it to look up a drug or package and check the billing unit behind its published limit.

|  |  |
| --- | --- |
| Model | CMS Part B drug payment limits |
| Available through | Alexandria |
| Category | Health |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with CMS Part B drug payment limits in opencode

- Use CMS Part B drug payment limits to fetch Keytruda for the fourth quarter of 2025 and add its billing code, dosage unit, and payment limit to our reimbursement table.
- Use CMS Part B drug payment limits to look up NDC 00006-3026-02 for the fourth quarter of 2025 and add the returned crosswalk details to our drug reference fixture.
- Use CMS Part B drug payment limits to fetch trastuzumab entries for the fourth quarter of 2025 and compare their codes, dosage units, and limits with the rows in our reference CSV.
- Use CMS Part B drug payment limits to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from CMS Part B drug payment limits and tell me what changed since last week.

## How to set up CMS Part B drug payment limits in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run CMS Part B drug payment limits**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "cms-gov/asp-pricing/payment_limits",
    "input": {
      "ndc": "<ndc>"
    }
  }'
```

Then paste one of the prompts above: opencode finds CMS Part B drug payment limits on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## CMS Part B drug payment limits tools and prices

- [CMS Medicare Drug Prices: Negotiated Prices and Part B ASP Payment Limits · Payment limits](https://spiral.ai/tools/alexandria/cms-gov/asp-pricing/payment_limits) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| ndc |  | — | An NDC-11 as 11 digits (`00006302602`) or hyphenated 5-4-2 (`00006-3026-02`), a hyphenated 10-digit NDC (4-4-2, 5-3-2 or 5-4-1), or an NDC-9 product code (`00006-3026`). A bare 10-digit NDC is ambiguous and rejected. Matches the crosswalk's NDCs. |
| drug |  | — | Brand or generic name, matched case-insensitively anywhere in the code's short description (`Inj pembrolizumab`) or in a crosswalk drug name (`Keytruda`): `keytruda`, `pembrolizumab`, `trastuzumab`. Biosimilars are listed under their brand names (`zarxio`), so the generic name finds only the reference product. |
| hcpcs |  | — | A HCPCS Level II code, a letter and four digits: `J9271`. CPT codes (five digits) are AMA copyright and not served. |
| limit | 1 to 100 | 10 | Most codes to return. |
| offset | 0 to 5000 | 0 | Codes to skip; pass `next_offset` for the next page. |
| quarter |  | — | Quarter the payment limits apply to, `2026-Q4`; defaults to the newest CMS has posted. `quarters_available` lists every quarter CMS links (from 2021-Q1). Pattern: ^[0-9]{4}-[Qq][1-4]$. |

## What can you do with CMS Part B drug payment limits in opencode?

Build a reimbursement comparison table that keeps CMS payment limits, billing codes, and dosage units together. A coding agent can add quarter comparisons and flag changes against the project’s saved reference data.

### Review an oncology drug budget

Compare published limits for Keytruda and Opdivo across quarters, then calculate allowance changes for fixed quantities using each code’s billing unit.

### Audit a reimbursement reference table

Compare an organization’s drug allowance table with CMS limits for the applicable quarters and flag differences for review.

### Compare biosimilar payment trends

Compare published limits for trastuzumab products, keeping each billing code and dosage unit visible so the comparison uses equivalent quantities.

### Check revisions to earlier quarters

Recheck published limits against saved results and identify historical changes that warrant a reimbursement review.

### Prepare a quarterly drug payment briefing

Summarize changes in selected drug codes, including the largest percentage movements and the effective quarters.

### Check a drug package’s billing code

Look up a Keytruda NDC in the CMS crosswalk and review its associated HCPCS code and billing-unit details.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## CMS Part B drug payment limits in other agents

- [Amp](https://spiral.ai/integrations/amp/cms-part-b-drug-payment-limits)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/cms-part-b-drug-payment-limits)
- [Claude](https://spiral.ai/integrations/claude-desktop/cms-part-b-drug-payment-limits)
- [Claude Code](https://spiral.ai/integrations/claude-code/cms-part-b-drug-payment-limits)
- [Cline](https://spiral.ai/integrations/cline/cms-part-b-drug-payment-limits)
- [Codex](https://spiral.ai/integrations/codex/cms-part-b-drug-payment-limits)
- [Cursor](https://spiral.ai/integrations/cursor/cms-part-b-drug-payment-limits)
- [Devin](https://spiral.ai/integrations/devin/cms-part-b-drug-payment-limits)
- [dots](https://spiral.ai/integrations/dots/cms-part-b-drug-payment-limits)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/cms-part-b-drug-payment-limits)
- [Gemini](https://spiral.ai/integrations/gemini/cms-part-b-drug-payment-limits)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/cms-part-b-drug-payment-limits)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/cms-part-b-drug-payment-limits)
- [goose](https://spiral.ai/integrations/goose/cms-part-b-drug-payment-limits)
- [Grok](https://spiral.ai/integrations/grok/cms-part-b-drug-payment-limits)
- [Grok Build](https://spiral.ai/integrations/grok-build/cms-part-b-drug-payment-limits)
- [Hermes](https://spiral.ai/integrations/hermes/cms-part-b-drug-payment-limits)
- [Instinct](https://spiral.ai/integrations/instinct/cms-part-b-drug-payment-limits)
- [Manus](https://spiral.ai/integrations/manus/cms-part-b-drug-payment-limits)
- [Muse](https://spiral.ai/integrations/muse/cms-part-b-drug-payment-limits)
- [Muse Code](https://spiral.ai/integrations/muse-code/cms-part-b-drug-payment-limits)
- [n8n](https://spiral.ai/integrations/n8n/cms-part-b-drug-payment-limits)
- [Notion](https://spiral.ai/integrations/notion/cms-part-b-drug-payment-limits)
- [OpenClaw](https://spiral.ai/integrations/openclaw/cms-part-b-drug-payment-limits)
- [Perplexity](https://spiral.ai/integrations/perplexity/cms-part-b-drug-payment-limits)
- [Raycast](https://spiral.ai/integrations/raycast/cms-part-b-drug-payment-limits)
- [VS Code](https://spiral.ai/integrations/vscode/cms-part-b-drug-payment-limits)
- [Windsurf](https://spiral.ai/integrations/windsurf/cms-part-b-drug-payment-limits)
- [Zapier](https://spiral.ai/integrations/zapier/cms-part-b-drug-payment-limits)

## More opencode guides

- [CMS Part B drug payment limit history](https://spiral.ai/integrations/opencode/cms-part-b-drug-payment-limit-history)
- [CMS clinician procedure volume](https://spiral.ai/integrations/opencode/cms-clinician-procedure-volume)
- [CMS Open Payments research payment records](https://spiral.ai/integrations/opencode/cms-open-payments-research-payment-records)
- [CMS dialysis facilities](https://spiral.ai/integrations/opencode/cms-dialysis-facilities)
- [CMS Open Payments research payment rankings](https://spiral.ai/integrations/opencode/cms-open-payments-research-payment-rankings)
- [CMS dialysis facility details](https://spiral.ai/integrations/opencode/cms-dialysis-facility-details)

## Questions about CMS Part B drug payment limits in opencode

**Can opencode use CMS Part B drug payment limits?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run CMS Part B drug payment limits like any built-in tool.

**How much does CMS Part B drug payment limits cost in opencode?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an Alexandria account to use CMS Part B drug payment limits in opencode?**

No. Spiral runs CMS Part B drug payment limits on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up CMS Part B drug payment limits in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while CMS Part B drug payment limits runs?**

CMS Part B drug payment limits runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

**How often does CMS update the data?**

CMS publishes payment limits quarterly. The underlying ASP data have a two-quarter lag, so a quarter’s effective limit reflects an earlier sales period.

**Does CMS list every Part B drug?**

CMS may omit payment limits or crosswalk entries for manufacturer-reported drugs. These files therefore do not provide a complete inventory of every Part B drug.

**Does a listed drug have Medicare coverage?**

Presence or absence in the payment limit files does not establish Medicare coverage. A published billing code and allowance are not a coverage determination.

**Is the payment limit for a whole vial or package?**

The limit applies to one HCPCS billing unit, as defined by the code’s dosage. Use that unit when comparing products or calculating an allowance for a stated quantity.

**Can a previous quarter’s payment limit change?**

Yes. CMS may issue restatements for up to four previous quarters, so historical limits can change after their initial publication.

