nsf://award/{id}/outcomes

MCP Resource Template

Resource template that returns the Project Outcomes Report of one NSF award as plain text.

Status
stable
Trust tier
unverified
Generated
claude-code/claude-opus-5-5, 2026-12-05
Resource
nsf://award/{id}/outcomes
Tags
resourcesoutcomestext

nsf://award/{id}/outcomes is an MCP resource template. Reading a URI built from it, such as nsf://award/1114898/outcomes, returns the award’s Project Outcomes Report (the public summary of results that a PI files after an award ends) as plain text. The text is the same outcomesReport string that get_project_outcomes returns.1 2

Only some awards have a report. Reports exist only for completed awards, from roughly 2010 on; older awards and active awards lack one.1 3 Check hasOutcomesReport in any award record (a search summary, get_award_details or nsf://award/{id}) before reading this resource. Award 1114898 has a report; award 9307607 (1993) does not.4

The resource has no options. It returns plain text only; for the report HTML as filed, call get_project_outcomes with includeHtml: true. For the award’s other fields (title, PI, dates) use nsf://award/{id} or the tool.

Template

Property Value
Registered name nsf-award-outcomes
URI template nsf://award/{id}/outcomes
Title NSF Project Outcomes Report
Description Project Outcomes Report of one NSF award, as plain text
MIME type text/plain
Listing None (list: undefined); the template is discoverable through resources/templates/list only

Values from registerResources in src/server.ts.1

Reading

When a client reads nsf://award/<id>/outcomes, the server:

  1. Takes the id variable from the URI (the first value if the SDK supplies an array).
  2. Checks that id is all digits (/^\d+$/). Any other id is treated as not found without an API call. There is no length limit and no trimming, unlike the tools’ awardId argument.1
  3. Calls the client’s getProjectOutcomes, which requests GET /awards/{id}/projectoutcomes.json with the request’s cancellation signal.5
  4. The client returns nothing (so the read fails as not found) when the award does not exist (HTTP 200 with an empty award list) or when the record has no projectOutComesReport (an absent or empty string). An HTTP 404 or a body without a response object is an upstream error, not “not found”.5
  5. Otherwise the report HTML is converted to plain text and returned as one content item with the same URI and MIME type text/plain.1

See GET /awards/{id}/projectoutcomes.json for the upstream endpoint. The API names the report field projectOutComesReport, with a capital C.3

Content

The text comes from htmlToText in src/utils/html-utils.ts, a small converter that uses the entities package for entity decoding:6 7

  • script and style elements are removed with their content.
  • <br> and the closing tags of p, div, li, h1 to h6 and tr become line breaks.
  • Each <li> opening tag becomes - , so list items read as bullets.
  • All other tags are removed. A tag cut off at the end of the report (some reports are truncated mid-tag) is dropped.
  • Every HTML5 named entity (for example &rsquo;, &mdash;, &copy;) and every numeric entity (&#...;, &#x...;) is decoded with decodeHTML. Each entity is decoded once, so &amp;rsquo; becomes &rsquo;. A numeric entity out of the Unicode range becomes U+FFFD, the replacement character. Unknown names such as &bogus; are left as written.
  • Non-breaking spaces become plain spaces, and soft hyphens (U+00AD, &shy;) are removed.
  • Carriage returns, indentation at line starts and ends, empty bullets and runs of three or more line breaks are collapsed, and the result is trimmed.

See Normalization for the rest of the record processing.

Errors

A read that finds no report fails with a protocol-level ResourceNotFoundError whose message is No Project Outcomes Report for award <id>.1 8 The resource message has no explanation after the id. The tool’s message adds one: No Project Outcomes Report for award <id>: the award does not exist, is still active, or predates outcome reports.2

Upstream failures are thrown with the client messages listed in Errors, for example NSF API project outcomes lookup failed (timed out) or, for an HTTP 404, which is not retried, NSF API project outcomes lookup failed (HTTP 404).5

Examples

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "resources/read",
  "params": { "uri": "nsf://award/1114898/outcomes" }
}

Shape of the result (report text abbreviated):9

{
  "contents": [
    {
      "uri": "nsf://award/1114898/outcomes",
      "mimeType": "text/plain",
      "text": "In the past half century many thousands o..."
    }
  ]
}

Reading nsf://award/9307607/outcomes fails, because that award predates outcome reports. The error message contains No Project Outcomes Report for award 9307607.8

  1. MCP server factory, tool registration and resource templates ↩ ↩2 ↩3 ↩4 ↩5 ↩6

  2. get_project_outcomes tool handler ↩ ↩2

  3. Live API behaviour notes in CLAUDE.md ↩ ↩2

  4. User guide ↩

  5. NSF Award API client ↩ ↩2 ↩3

  6. HTML-to-text conversion for outcomes reports ↩

  7. package.json (runtime dependencies, including entities) ↩

  8. In-process MCP protocol tests ↩ ↩2

  9. Trimmed live API record of award 1114898 ↩

Sources

  1. MCP server factory, tool registration and resource templates server-source
  2. NSF Award API client api-client
  3. HTML-to-text conversion for outcomes reports html-utils
  4. get_project_outcomes tool handler outcomes-tool
  5. In-process MCP protocol tests server-tests
  6. User guide usage-guide
  7. Live API behaviour notes in CLAUDE.md api-behaviour
  8. Trimmed live API record of award 1114898 fixture-1114898
  9. package.json (runtime dependencies, including entities) package-json