Skip to main content
Glama
cyanheads

clinicaltrialsgov-mcp-server

by cyanheads

Clinicaltrials Get Study Results

clinicaltrials_get_study_results
Read-onlyIdempotent

Fetch completed-study results from ClinicalTrials.gov: outcome measures, adverse events, participant flow, baseline, and metadata. Use search first; optional summary mode or section/event limits handle large records.

Instructions

Fetch clinical trial results data from ClinicalTrials.gov for completed studies — outcome measures with statistics, adverse events, participant flow, baseline characteristics, and results metadata (limitations & caveats, certain-agreement disclosure restrictions, results point of contact). Only available for studies where hasResults is true. Use clinicaltrials_search_studies first to find studies with results. A results-rich record can exceed 500KB per study in full mode — bound it with summary=true, narrower sections, or the outcomeLimit / adverseEventLimit caps, whose trims are reported per study in filtersApplied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nctIdsYesOne or more NCT IDs (max 20) — an empty list is rejected. E.g., "NCT12345678" or ["NCT12345678", "NCT87654321"]. Use summary=true for large batches to avoid large payloads.
summaryNoReturn condensed summaries instead of full data. Full mode renders every row and field on both output channels, so a large results set can exceed 500KB per study; summary mode reduces that to ~5KB. Summaries include outcome titles, types, timeframes, group counts, and top-level stats — omitting individual measurements, analyses, and per-group data. For a middle ground, keep full mode and cap the two lists that carry the bulk with outcomeLimit / adverseEventLimit.
sectionsNoFilter which sections to return. Values: outcomes, adverseEvents, participantFlow, baseline, moreInfo. Omit for all sections — an empty list is rejected, not treated as omission.
outcomeLimitNoOptional cap on the number of outcome measures returned per study, taken in the order ClinicalTrials.gov publishes them. Omit for no cap (every measure). Applies to full mode only — summary mode is already condensed. Each surviving measure keeps its complete groups/classes/measurements/analyses tree. Upstream total preserved in filtersApplied.totalOutcomes only when the cap trims the list.
adverseEventLimitNoOptional cap on the number of serious and other adverse events returned per study, applied to each list separately in upstream order. Omit for no cap (every event). Applies to full mode only — summary mode already ranks the top 20 by participants affected. Event groups are never capped. Upstream totals preserved in filtersApplied.totalSeriousEvents / totalOtherEvents only when the cap trims a list.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
resultsNoResults per study.
truncatedNoTrue when a cap trimmed a list on at least one study; absent when nothing was trimmed, matching filtersApplied one level down. Which study and which list is named in that study’s filtersApplied.
fetchErrorsNoStudies that could not be fetched.
studiesWithoutResultsNoNCT IDs that do not have results data.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.9.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "results"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `blank_value`: A parameter was supplied with a blank, whitespace-only, or empty-list value. `rate_limited`: ClinicalTrials.gov returned 429 after retry budget exhausted. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "blank_value",
      +            "rate_limited"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "results"
      -]
  2. Changed8 schema fields changedv2.9.1
    • addedInput schema / properties / adverseEventLimit
      Added value: +{
      +  "description": "Optional cap on the number of serious and other adverse events returned per study, applied to each list separately in upstream order. Omit for no cap (every event). Applies to full mode only — summary mode already ranks the top 20 by participants affected. Event groups are never capped. Upstream totals preserved in filtersApplied.totalSeriousEvents / totalOtherEvents only when the cap trims a list.",
      +  "maximum": 500,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / nctIds / anyOf
      Previous value: -[
      -  {
      -    "description": "A single NCT ID.",
      -    "pattern": "^NCT\\d{8}$",
      -    "type": "string"
      -  },
      -  {
      -    "description": "Multiple NCT IDs (max 20).",
      -    "items": {
      -      "pattern": "^NCT\\d{8}$",
      -      "type": "string"
      -    },
      -    "maxItems": 20,
      -    "minItems": 1,
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "description": "A single NCT ID.",
      +    "pattern": "^NCT\\d{8}$",
      +    "type": "string"
      +  },
      +  {
      +    "description": "Multiple NCT IDs (max 20).",
      +    "items": {
      +      "pattern": "^NCT\\d{8}$",
      +      "type": "string"
      +    },
      +    "maxItems": 20,
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / nctIds / description
      Previous value: -"One or more NCT IDs (max 20). E.g., \"NCT12345678\" or [\"NCT12345678\", \"NCT87654321\"]. Use summary=true for large batches to avoid large payloads."New value: +"One or more NCT IDs (max 20) — an empty list is rejected. E.g., \"NCT12345678\" or [\"NCT12345678\", \"NCT87654321\"]. Use summary=true for large batches to avoid large payloads."
    • addedInput schema / properties / outcomeLimit
      Added value: +{
      +  "description": "Optional cap on the number of outcome measures returned per study, taken in the order ClinicalTrials.gov publishes them. Omit for no cap (every measure). Applies to full mode only — summary mode is already condensed. Each surviving measure keeps its complete groups/classes/measurements/analyses tree. Upstream total preserved in filtersApplied.totalOutcomes only when the cap trims the list.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • changedInput schema / properties / sections / description
      Previous value: -"Filter which sections to return. Values: outcomes, adverseEvents, participantFlow, baseline, moreInfo. Omit for all sections."New value: +"Filter which sections to return. Values: outcomes, adverseEvents, participantFlow, baseline, moreInfo. Omit for all sections — an empty list is rejected, not treated as omission."
    • changedInput schema / properties / summary / description
      Previous value: -"Return condensed summaries instead of full data. Reduces payload from ~200KB to ~5KB per study. Summaries include outcome titles, types, timeframes, group counts, and top-level stats — omitting individual measurements, analyses, and per-group data."New value: +"Return condensed summaries instead of full data. Full mode renders every row and field on both output channels, so a large results set can exceed 500KB per study; summary mode reduces that to ~5KB. Summaries include outcome titles, types, timeframes, group counts, and top-level stats — omitting individual measurements, analyses, and per-group data. For a middle ground, keep full mode and cap the two lists that carry the bulk with outcomeLimit / adverseEventLimit."
    • addedOutput schema / properties / results / items / properties / filtersApplied
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "What a cap trimmed on this study — present only when a cap actually reduced a list. Absent means the payload is the complete upstream set for the requested sections.",
      +  "properties": {
      +    "adverseEventLimit": {
      +      "description": "Echo of the adverseEventLimit input — present only when the cap trimmed a list.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "outcomeLimit": {
      +      "description": "Echo of the outcomeLimit input — present only when the cap trimmed the list.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "totalOtherEvents": {
      +      "description": "Upstream other adverse event count before adverseEventLimit trimmed the list.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "totalOutcomes": {
      +      "description": "Upstream outcome measure count before outcomeLimit trimmed the list.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "totalSeriousEvents": {
      +      "description": "Upstream serious adverse event count before adverseEventLimit trimmed the list.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when a cap trimmed a list on at least one study; absent when nothing was trimmed, matching filtersApplied one level down. Which study and which list is named in that study’s filtersApplied.",
      +  "type": "boolean"
      +}
  3. Changed4 schema fields changedv2.6.1
    • changedInput schema / properties / sections / anyOf
      Previous value: -[
      -  {
      -    "description": "A single section name.",
      -    "enum": [
      -      "outcomes",
      -      "adverseEvents",
      -      "participantFlow",
      -      "baseline"
      -    ],
      -    "type": "string"
      -  },
      -  {
      -    "description": "Multiple section names.",
      -    "items": {
      -      "enum": [
      -        "outcomes",
      -        "adverseEvents",
      -        "participantFlow",
      -        "baseline"
      -      ],
      -      "type": "string"
      -    },
      -    "type": "array"
      -  }
      -]New value: +[
      +  {
      +    "description": "A single section name.",
      +    "enum": [
      +      "outcomes",
      +      "adverseEvents",
      +      "participantFlow",
      +      "baseline",
      +      "moreInfo"
      +    ],
      +    "type": "string"
      +  },
      +  {
      +    "description": "Multiple section names.",
      +    "items": {
      +      "enum": [
      +        "outcomes",
      +        "adverseEvents",
      +        "participantFlow",
      +        "baseline",
      +        "moreInfo"
      +      ],
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +]
    • changedInput schema / properties / sections / description
      Previous value: -"Filter which sections to return. Values: outcomes, adverseEvents, participantFlow, baseline. Omit for all sections."New value: +"Filter which sections to return. Values: outcomes, adverseEvents, participantFlow, baseline, moreInfo. Omit for all sections."
    • changedOutput schema / properties / results / items / properties / adverseEvents / description
      Previous value: -"Adverse events. Summary mode: timeFrame, groupCount, seriousEventCount, otherEventCount. Full mode: adds eventGroups, seriousEvents, otherEvents with per-event term and per-group affected/at-risk stats."New value: +"Adverse events. Summary mode: timeFrame, groupCount, seriousEventCount, otherEventCount, plus topEvents — the most frequent events ranked by participants affected, aggregated across arms (term, organSystem, kind, numAffected, numAtRisk). Full mode: adds eventGroups, seriousEvents, otherEvents with per-event term and per-group affected/at-risk stats."
    • addedOutput schema / properties / results / items / properties / moreInfo
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Results metadata from moreInfoModule. Summary mode: limitationsAndCaveats, certainAgreement flags (piSponsorEmployee, restrictiveAgreement, restrictionType), and pointOfContact. Full mode: adds certainAgreement.otherDetails.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  4. Addedv2.5.1
  5. Removedv2.4.12
  6. Addedv2.0.6

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, so no contradiction exists. The description adds meaningful behavioral context beyond annotations: full mode can exceed 500KB per study, results can be bounded with summary or caps, and trims are reported per study in filtersApplied. This is valuable operational disclosure not present in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with no filler; it opens with the core action and resource, then states the critical prerequisite, then the performance caveat. Every sentence carries load-bearing information for correct invocation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the rich input schema, output schema, and annotations, the description covers the remaining non-obvious context: the hasResults precondition, the upstream search step, and the large-payload risk with mitigation options. Nothing essential for an agent to select and invoke the tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3 because the schema already documents every parameter, including defaults, enums, bounds, and per-parameter behaviors. The description body adds a useful cross-parameter guidance about using summary/caps to bound payloads, but it does not add meaning beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource: 'Fetch clinical trial results data from ClinicalTrials.gov,' and enumerates the included categories (outcome measures, adverse events, participant flow, baseline, results metadata). It also scopes the tool with 'for completed studies' and 'Only available for studies where hasResults is true,' making its purpose distinguishable from siblings like clinicaltrials_get_study_record.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives an explicit when: use it for study results data, and an explicit when-not: only when hasResults is true. It also names the follow-on workflow: 'Use clinicaltrials_search_studies first to find studies with results,' which routes the agent away from calling this tool prematurely.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.