Spiral gives your agent every tool with one account. Browse the tools →

opencode · Health

How to Use ClinicalTrials.gov field statistics in opencode

Returns registry-wide field statistics, including study counts for phase and overall-status values. Use it to understand registry terminology and distributions before interpreting a narrower trial search.

Prompts to try with ClinicalTrials.gov field statistics in opencode

Copy an example into opencode, or ask in your own words.

Use ClinicalTrials.gov field statistics to retrieve phase and overall-status counts, then add a registry overview table to this project's research page.

ClinicalTrials.gov field statisticsopencode
Try asking
  • Use ClinicalTrials.gov field statistics to look this up and give me the result as a table. Save the result in ./assets.

  • Pull the latest numbers from ClinicalTrials.gov field statistics and tell me what changed since last week.

  • Check ClinicalTrials.gov field statistics and summarize what you find in three bullet points.

  • Pull the newest data from ClinicalTrials.gov field statistics and give me the result as a table.

How to set up ClinicalTrials.gov field statistics 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.

    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.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    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.

    npx -y spiral-cli@latest init

Call the Spiral API

  1. Create an API key

    In the console, under API keys.

  2. Run ClinicalTrials.gov field statistics

    One request; the result comes back by polling or a webhook.

    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": "clinicaltrials-gov/clinical-trials/field_values",
        "input": {
          "fields": [
            "<fields>"
          ]
        }
      }'

Then paste one of the prompts above: opencode finds ClinicalTrials.gov field statistics on Spiral, shows the price and runs it.

ClinicalTrials.gov field statistics providers and prices

Spiral runs ClinicalTrials.gov field statistics through Alexandria. Open a card for today's price, with every fee included.

AlexandriaHealth
ClinicalTrials.gov · Field values
clinicaltrials-gov/clinical-trials/field_values

What can you do with ClinicalTrials.gov field statistics in opencode?

Build a trial research interface around ClinicalTrials.gov's registered terminology and public study evidence. Use the returned data to populate search controls, comparison tables, and explanations of registry categories.

Build a public trial explorer

Provide registry autocomplete, explain phase and status categories with registry-wide counts, display matching trials, open their protocols, and compare milestones with actual or estimated labels.

Compare a disease portfolio with registry activity

Resolve the registry's condition wording, collect matching trials, and summarize their phases, designs, and milestones. Present registry-wide phase and status counts separately as context for the selected disease portfolio.

Teach clinical registry analysis

Build an exercise around registry terminology, overall phase and status distributions, a reproducible trial search, protocol interpretation, and the difference between actual and estimated milestones.

Create a registry terminology reference

Combine phase and status counts with condition, intervention, sponsor, and facility suggestions. Link terminology explanations to example trial records so analysts can see how the terms appear in practice.

Questions about ClinicalTrials.gov field statistics in opencode

Can opencode use ClinicalTrials.gov field statistics?

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run ClinicalTrials.gov field statistics like any built-in tool.

How much does ClinicalTrials.gov field statistics 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 ClinicalTrials.gov field statistics in opencode?

No. Spiral runs ClinicalTrials.gov field statistics on its own Alexandria account. You sign in to Spiral once and never paste a key.

How long does it take to set up ClinicalTrials.gov field statistics in opencode?

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

Does opencode wait while ClinicalTrials.gov field statistics runs?

ClinicalTrials.gov field statistics runs in the background. opencode starts the run, checks on it and gives you the json when it's ready.

Does ClinicalTrials.gov cover every clinical study?

It includes studies in the United States and many other countries, but coverage is incomplete. Not every study is legally required to register, including some observational studies.

How current is a study's information?

Updates depend on submissions from the organizations conducting the studies. For applicable trials covered by the final rule, recruitment-status changes must be submitted within 30 calendar days, so the registry is not a live enrollment feed.

What does an unknown study status mean?

ClinicalTrials.gov uses unknown status when certain previously ongoing studies have passed their completion date and their status has not been verified within the past two years. It does not establish that the study is still recruiting.

Are individual participants' results available?

ClinicalTrials.gov provides summary-level study results rather than raw data or individual participant-level data. Posted results can include participant flow, baseline characteristics, outcome measures, and adverse events.

Are completion dates confirmed milestones?

Only dates labeled actual represent reported events. Estimated completion dates are researchers' projections; primary completion concerns collection of primary-outcome data and can differ from overall study completion.

Get started

Start using ClinicalTrials.gov field statistics in opencode

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into opencode:

Set up opencode

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options