nsf://award/{id}/outcomes
MCP Resource Template
Resource template that returns the Project Outcomes Report of one NSF award as plain text.
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:
- Takes the
idvariable from the URI (the first value if the SDK supplies an array). - Checks that
idis 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’awardIdargument.1 - Calls the client’s
getProjectOutcomes, which requestsGET /awards/{id}/projectoutcomes.jsonwith the request’s cancellation signal.5 - The client returns nothing (so the read fails as not found) when the award does not exist (HTTP 200 with an
empty
awardlist) or when the record has noprojectOutComesReport(an absent or empty string). An HTTP 404 or a body without aresponseobject is an upstream error, not “not found”.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
scriptandstyleelements are removed with their content.<br>and the closing tags ofp,div,li,h1toh6andtrbecome 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
’,—,©) and every numeric entity (&#...;,&#x...;) is decoded withdecodeHTML. Each entity is decoded once, so&rsquo;becomes’. 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,
­) 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