Migrating from 1.x

Guide

The breaking changes in version 2.0.0 (result envelopes, summary records, normalized values, removed and deprecated parameters, stricter input) and how to update callers.

Status
stable
Trust tier
unverified
Generated
claude-code/claude-opus-5-5, 2026-12-05
Tags
migrationbreaking-changesupgradev2

Version 2.0.0 changes what the tools return and tightens what they accept.1 Tool names do not change: search_nsf_awards, search_by_institution, search_by_pi, get_award_details and get_project_outcomes. Code that parses tool results, and prompts that rely on fields that are now omitted by default, need the updates below.2

To upgrade, pull and rebuild (Installation), then restart the client.

Summary of breaking changes

The README’s migration notes list these changes.2

Change in 2.0.0 What to do
Search output is an object envelope, { awards, totalResults, ... }, not a bare array Read structuredContent.awards, or parse content[0].text, which is now the whole envelope
Search records are summaries by default Pass detail: "full" or printFields, or call get_award_details
get_award_details returns { "award": { ... } }, without publications or the outcome report HTML Read .award; pass includePublications: true; use get_project_outcomes for the report
get_project_outcomes returns plain text only Pass includeHtml: true to get outcomesReportHtml too
Amounts are numbers (they were strings) Stop converting them
activeAwd, histAwd and publicAccessMandate are booleans Compare with true, not "true"
pi and coPDPI are arrays of objects in full records Read .name, .email and .former
piMiddeInitial is renamed piMiddleInitial Rename the field in your code
agency is removed from search_nsf_awards Drop the argument
includeExpired is deprecated Use status
Invalid dates and reversed ranges are rejected instead of dropped; awardId must be numeric; offset stops at 9999 Fix the arguments

Search results are an object

Search tools now return an envelope as structuredContent. content[0] holds the same object as JSON text, and content[1] is a paging hint for text-only clients.2 The same hint is also the envelope’s hint field, because some clients pass only the structured content or the first block to the model:3 4

{
  "awards": [ { "id": "2535052", "title": "...", "estimatedTotalAmt": 1113000, "activeAwd": true } ],
  "totalResults": 981,
  "offset": 0,
  "limit": 25,
  "returned": 25,
  "hasMore": true,
  "nextOffset": 25,
  "capped": false,
  "pageSummary": { "totalEstimatedAmt": 12345678, "byInstitution": { "...": 3 }, "byProgram": { "...": 2 } },
  "hint": "Showing 25 of 981 matching awards (offset 0). More results are available: call again with offset=25."
}
Showing 25 of 981 matching awards (offset 0). More results are available: call again with offset=25.

The paging fields are totalResults, hasMore, nextOffset and capped. To get the next page, pass nextOffset as offset.2 capped: true means the API’s 10,000-match cap was reached; narrow the search to reach the rest.4 See Search results for every field.

Search records are summaries by default

Each search record now carries only these fields, in this order (absent values are omitted):5

id, title, pdPIName, coPDPI, awardeeName, awardeeCity, awardeeStateCode, startDate, expDate, estimatedTotalAmt, fundsObligatedAmt, fundProgramName, dirAbbr, divAbbr, transType, activeAwd, hasOutcomesReport

In summaries, coPDPI is a list of names, with ` (Former)` appended for Co-PIs who left the award.5 To get more:

  • detail: "full" returns every field the API sends, including the abstract, except the publications (jrnl, publicationResearch, publicationConference) and the outcome report HTML (projectOutComesReport). Without them a record is about 3-5 KB, so lower limit for full pages.3 6
  • printFields: "id,title,abstractText,estimatedTotalAmt" returns only the named fields of the normalized full record, including jrnl or projectOutComesReport when you name them. Use normalized names (piMiddleInitial, hasOutcomesReport); unknown names are ignored.7 6
  • get_award_details returns one full record.

The search tools share these parameters; see Shared search parameters.

get_award_details returns { award }

get_award_details returns { "award": { ... } }.2 The record never includes the outcome report HTML (projectOutComesReport). Publications (jrnl, publicationResearch, publicationConference) are omitted unless includePublications: true. The abstract (abstractText) is included unless includeAbstract: false.8 For the report, call get_project_outcomes; hasOutcomesReport in any record says whether one exists.2 See get_award_details.

get_project_outcomes returns plain text

get_project_outcomes returns { awardId, title, pdPIName, awardeeName, startDate, expDate, outcomesReport }, where outcomesReport is plain text. includeHtml: true adds outcomesReportHtml.2 See get_project_outcomes.

Values are normalized

Every record goes through the same normalization:2

Field 2.0.0 value
estimatedTotalAmt, fundsObligatedAmt Numbers in US dollars (they were strings)
activeAwd, histAwd, publicAccessMandate Booleans
primaryProgram Always an array
pi, coPDPI Arrays of { name, email?, former } in full records; summaries list Co-PI names
piMiddleInitial The API’s misspelled piMiddeInitial, renamed
hasOutcomesReport New: true when the award has a Project Outcomes Report
Fields the API sends as "" Dropped

Dates stay mm/dd/yyyy, and fundsObligated stays a list of strings such as "FY 2011 = $1,498,027.00".7 Each pi and coPDPI entry in a full record has this shape (the values here are placeholders):

{ "name": "First M Last", "email": "name@example.edu", "former": false }

See Award record for every field.

Removed and deprecated parameters

  • agency is removed from search_nsf_awards. The API accepts it, but it has no effect.2
  • includeExpired is deprecated. It remains on search_nsf_awards only. Use status instead: "active", "expired" or "all" (the default).6 includeExpired: false still means "active". When both are given, status wins.3 status is also on search_by_institution and search_by_pi.2
{ "keyword": "wildfire", "status": "active" }

Stricter input

Arguments are validated before any API call, and invalid ones are rejected with an isError result instead of being dropped silently:2 7

  • Dates must be valid mm/dd/yyyy or yyyy-mm-dd values.
  • A date or amount range whose start is after its end is rejected.
  • awardId must be numeric: 1 to 10 digits, for example 2632685.6
  • offset stops at 9999, because the API serves nothing past record 10,000. limit is 1 to 25.6

For example:7

Input validation error: Invalid arguments for tool search_nsf_awards: startDateTo: startDateFrom (12/31/2024) is after startDateTo (01/01/2020)

Tool failures (an unknown award, an API error) also come back as isError: true results with a message in content[0].text.7 See Errors.

New in 2.0.0

These additions are not breaking, but you may want to use them:2

  • expDateFrom and expDateTo on search_by_institution and search_by_pi.
  • city and estimatedTotalAmtFrom and estimatedTotalAmtTo on search_by_institution.
  • status on all three search tools.
  • Resource templates nsf://award/{id} and nsf://award/{id}/outcomes (see Award resource and Award outcomes resource).
  • The Streamable HTTP transport (see HTTP transport).
  • Output schemas on every tool, so clients receive structuredContent.4
  1. package.json ↩

  2. Project README (Migrating from 1.x) ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12

  3. Shared tool helpers (src/tools/shared.ts) ↩ ↩2 ↩3

  4. MCP server factory (src/server.ts) ↩ ↩2 ↩3

  5. Record normalization (src/utils/normalize.ts) ↩ ↩2

  6. Tool input and output schemas ↩ ↩2 ↩3 ↩4 ↩5

  7. User guide (USAGE.md) ↩ ↩2 ↩3 ↩4 ↩5

  8. get_award_details handler ↩

Sources

  1. Project README (Migrating from 1.x) readme
  2. User guide (USAGE.md) usage-guide
  3. Tool input and output schemas tool-schemas
  4. Shared tool helpers (src/tools/shared.ts) tools-shared
  5. Record normalization (src/utils/normalize.ts) normalize
  6. get_award_details handler award-details-tool
  7. MCP server factory (src/server.ts) server-factory
  8. package.json package-json