Skip to main content
Glama
clinicaltrialsgov-mcp-server

clinicaltrialsgov-mcp-server

by cyanheads

Clinicaltrials Get Study Record

clinicaltrials_get_study_record
Read-onlyIdempotent

Fetches a full ClinicalTrials.gov study record by NCT ID, including protocol, eligibility, outcomes, arms, interventions, contacts, and locations, with optional limits to trim locations, outcomes, or references.

Instructions

Fetch a single clinical trial study by NCT ID from ClinicalTrials.gov. Returns the full study record including protocol details, eligibility criteria, outcomes, arms, interventions, contacts, and locations. Optional locationLimit / outcomeLimit / referenceLimit / nearLocation parameters trim locations, outcomes, and references — original totals are preserved in filtersApplied only when a cap actually trims the set.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "nctId": "<nctId>"
    },
    "name": "clinicaltrials_get_study_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
nctIdYesNCT identifier — format `NCT` followed by 8 digits (e.g., `NCT03722472`).
nearLocationNoFilter returned locations to those within radius of (lat, lon) and sort by distance. Adds distanceMi to each location. Locations without published coordinates are dropped — most US sites carry them; international sites less reliably so. Distances reflect ClinicalTrials.gov geocoding granularity — typically city-centroid, not facility-level — so multiple sites in the same city resolve to near-identical distances. For broader geographic filtering across studies, use clinicaltrials_search_studies with geoFilter.
outcomeLimitNoOptional cap on the number of secondary and other outcomes returned. Omit for no cap (full upstream lists); 0 leaves the secondary and other outcomes out; a value at or past a list length also returns that whole list. Primary outcomes are never capped. Original totals preserved in filtersApplied.totalSecondaryOutcomes / totalOtherOutcomes only when the cap trims a list.
locationLimitNoOptional cap on the number of locations returned. Omit for no cap (full upstream list); 0 leaves the locations out; a value at or past the list length also returns every location. Pairs naturally with nearLocation for narrowing a large multi-site trial. Original total preserved in filtersApplied.totalLocations only when the cap trims the list.
referenceLimitNoOptional cap on the number of references returned. Omit for no cap (full upstream list); 0 leaves the references out; a value at or past the list length also returns every reference. Original total preserved in filtersApplied.totalReferences only when the cap trims the list. seeAlsoLinks are never capped.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
studyNoFull study record with caller-requested filters already applied to locations and outcomes. Top-level keys: protocolSection (identification, status, sponsor, conditions, design, arms/interventions, outcomes, eligibility, contacts/locations), derivedSection (MeSH-normalized terms), hasResults, documentSection. The heavy resultsSection is omitted — see resultsSummary for counts and clinicaltrials_get_study_results for full results data. Use clinicaltrials_get_field_definitions to explore the schema.
filtersAppliedNoMetadata about the filtering applied to `study`.
resultsSummaryNoCompact counts of posted results, present when hasResults is true. The full resultsSection is intentionally omitted from this record-level tool — fetch it via clinicaltrials_get_study_results.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.11.3
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `study_not_found`: The provided NCT ID does not match any study at ClinicalTrials.gov. `rate_limited`: ClinicalTrials.gov answered HTTP 429 on every attempt, or the call’s time budget ran out after a 429. `retry_deadline_exceeded`: ClinicalTrials.gov did not answer within the call’s time budget, which covers every request, retry, and wait the call makes. `upstream_timeout`: ClinicalTrials.gov answered HTTP 504 (gateway timeout) on every attempt. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `study_not_found`: The provided NCT ID does not match any study at ClinicalTrials.gov. `rate_limited`: ClinicalTrials.gov answered HTTP 429 on every attempt, or the call’s time budget ran out after a 429. `retry_deadline_exceeded`: ClinicalTrials.gov did not answer within the call’s time budget, which covers every request, retry, and wait the call makes. `upstream_timeout`: ClinicalTrials.gov answered HTTP 504 (gateway timeout) or 408 (request timeout), or sent no answer within the per-attempt timeout, on every attempt. `upstream_unavailable`: Every attempt failed on ClinicalTrials.gov’s side — HTTP 500, 502, or 503, a dropped connection or one the network gave up opening, or a 200 body that is not the JSON the route serves (an HTML page, unparseable text, the wrong shape) — or it answered with another 5xx, such as 505, or the connection was refused or its host name did not resolve, none of which is retried. `upstream_rejected`: ClinicalTrials.gov refused the request with a status its API does not use for a bad query — HTTP 501, a 3xx, or a 4xx such as 401, 403, or 410 — or answered with an HTML error page in place of its own 404. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "study_not_found",
      -  "rate_limited",
      -  "retry_deadline_exceeded",
      -  "upstream_timeout"
      -]New value: +[
      +  "study_not_found",
      +  "rate_limited",
      +  "retry_deadline_exceeded",
      +  "upstream_timeout",
      +  "upstream_unavailable",
      +  "upstream_rejected"
      +]
  2. Changed8 schema fields changedv2.11.2
    • changedInput schema / properties / locationLimit / description
      Previous value: -"Optional cap on the number of locations returned. Omit for no cap (full upstream list); a value at or past the list length also returns every location. Pairs naturally with nearLocation for narrowing a large multi-site trial. Original total preserved in filtersApplied.totalLocations only when the cap trims the list."New value: +"Optional cap on the number of locations returned. Omit for no cap (full upstream list); 0 leaves the locations out; a value at or past the list length also returns every location. Pairs naturally with nearLocation for narrowing a large multi-site trial. Original total preserved in filtersApplied.totalLocations only when the cap trims the list."
    • changedInput schema / properties / locationLimit / minimum
      Previous value: -1New value: +0
    • changedInput schema / properties / outcomeLimit / description
      Previous value: -"Optional cap on the number of secondary and other outcomes returned. Omit for no cap (full upstream lists); a value at or past a list length also returns that whole list. Primary outcomes are never capped. Original totals preserved in filtersApplied.totalSecondaryOutcomes / totalOtherOutcomes only when the cap trims a list."New value: +"Optional cap on the number of secondary and other outcomes returned. Omit for no cap (full upstream lists); 0 leaves the secondary and other outcomes out; a value at or past a list length also returns that whole list. Primary outcomes are never capped. Original totals preserved in filtersApplied.totalSecondaryOutcomes / totalOtherOutcomes only when the cap trims a list."
    • changedInput schema / properties / outcomeLimit / minimum
      Previous value: -1New value: +0
    • changedInput schema / properties / referenceLimit / description
      Previous value: -"Optional cap on the number of references returned. Omit for no cap (full upstream list); a value at or past the list length also returns every reference. Original total preserved in filtersApplied.totalReferences only when the cap trims the list. seeAlsoLinks are never capped."New value: +"Optional cap on the number of references returned. Omit for no cap (full upstream list); 0 leaves the references out; a value at or past the list length also returns every reference. Original total preserved in filtersApplied.totalReferences only when the cap trims the list. seeAlsoLinks are never capped."
    • changedInput schema / properties / referenceLimit / minimum
      Previous value: -1New value: +0
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `study_not_found`: The provided NCT ID does not match any study at ClinicalTrials.gov. `rate_limited`: ClinicalTrials.gov returned 429 after retry budget exhausted. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `study_not_found`: The provided NCT ID does not match any study at ClinicalTrials.gov. `rate_limited`: ClinicalTrials.gov answered HTTP 429 on every attempt, or the call’s time budget ran out after a 429. `retry_deadline_exceeded`: ClinicalTrials.gov did not answer within the call’s time budget, which covers every request, retry, and wait the call makes. `upstream_timeout`: ClinicalTrials.gov answered HTTP 504 (gateway timeout) on every attempt. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "study_not_found",
      -  "rate_limited"
      -]New value: +[
      +  "study_not_found",
      +  "rate_limited",
      +  "retry_deadline_exceeded",
      +  "upstream_timeout"
      +]
  3. Changed1 schema field changedv2.11.0
    • changedOutput schema / properties / resultsSummary / description
      Previous value: -"Compact counts of posted results, present when hasResults is true. The full resultsSection is intentionally omitted from this record-level tool — fetch it via clinicaltrials_get_study_results or the clinicaltrials://{nctId} resource."New value: +"Compact counts of posted results, present when hasResults is true. The full resultsSection is intentionally omitted from this record-level tool — fetch it via clinicaltrials_get_study_results."
  4. Changed8 schema fields changedv2.10.1
    • changedInput schema / properties / locationLimit / description
      Previous value: -"Optional cap on the number of locations returned. Omit for no cap (full upstream list). Pairs naturally with nearLocation for narrowing a large multi-site trial. Original total preserved in filtersApplied.totalLocations only when the cap trims the list."New value: +"Optional cap on the number of locations returned. Omit for no cap (full upstream list); a value at or past the list length also returns every location. Pairs naturally with nearLocation for narrowing a large multi-site trial. Original total preserved in filtersApplied.totalLocations only when the cap trims the list."
    • changedInput schema / properties / locationLimit / maximum
      Previous value: -500New value: +9007199254740991
    • changedInput schema / properties / nearLocation / properties / radiusMi / description
      Previous value: -"Radius in miles. Default 50."New value: +"Radius in miles, at least 1. Default 50. A radius past the farthest site keeps every site with published coordinates."
    • removedInput schema / properties / nearLocation / properties / radiusMi / maximum
      Removed value: -500
    • changedInput schema / properties / outcomeLimit / description
      Previous value: -"Optional cap on the number of secondary and other outcomes returned. Omit for no cap (full upstream lists). Primary outcomes are never capped. Original totals preserved in filtersApplied.totalSecondaryOutcomes / totalOtherOutcomes only when the cap trims a list."New value: +"Optional cap on the number of secondary and other outcomes returned. Omit for no cap (full upstream lists); a value at or past a list length also returns that whole list. Primary outcomes are never capped. Original totals preserved in filtersApplied.totalSecondaryOutcomes / totalOtherOutcomes only when the cap trims a list."
    • changedInput schema / properties / outcomeLimit / maximum
      Previous value: -100New value: +9007199254740991
    • changedInput schema / properties / referenceLimit / description
      Previous value: -"Optional cap on the number of references returned. Omit for no cap (full upstream list). Original total preserved in filtersApplied.totalReferences only when the cap trims the list. seeAlsoLinks are never capped."New value: +"Optional cap on the number of references returned. Omit for no cap (full upstream list); a value at or past the list length also returns every reference. Original total preserved in filtersApplied.totalReferences only when the cap trims the list. seeAlsoLinks are never capped."
    • changedInput schema / properties / referenceLimit / maximum
      Previous value: -100New value: +9007199254740991
  5. Changed7 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
    • addedInput schema / properties / nearLocation / 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": [
      +      "study",
      +      "filtersApplied"
      +    ]
      +  },
      +  {
      +    "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: `study_not_found`: The provided NCT ID does not match any study at ClinicalTrials.gov. `rate_limited`: ClinicalTrials.gov returned 429 after retry budget exhausted. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "study_not_found",
      +            "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: -[
      -  "study",
      -  "filtersApplied"
      -]
  6. Changed7 schema fields changedv2.7.1
    • changedInput schema / properties / locationLimit / description
      Previous value: -"Optional cap on the number of locations returned. Omit for no cap (full upstream list). Pairs naturally with nearLocation for narrowing a large multi-site trial. Original total preserved in filtersApplied.totalLocations whenever a cap is applied."New value: +"Optional cap on the number of locations returned. Omit for no cap (full upstream list). Pairs naturally with nearLocation for narrowing a large multi-site trial. Original total preserved in filtersApplied.totalLocations only when the cap trims the list."
    • changedInput schema / properties / nearLocation / description
      Previous value: -"Filter returned locations to those within radius of (lat, lon) and sort by distance. Adds distanceMi to each location. Locations without published coordinates are dropped — most US sites carry them; international sites less reliably so. For broader geographic filtering across studies, use clinicaltrials_search_studies with geoFilter."New value: +"Filter returned locations to those within radius of (lat, lon) and sort by distance. Adds distanceMi to each location. Locations without published coordinates are dropped — most US sites carry them; international sites less reliably so. Distances reflect ClinicalTrials.gov geocoding granularity — typically city-centroid, not facility-level — so multiple sites in the same city resolve to near-identical distances. For broader geographic filtering across studies, use clinicaltrials_search_studies with geoFilter."
    • changedInput schema / properties / outcomeLimit / description
      Previous value: -"Optional cap on the number of secondary and other outcomes returned. Omit for no cap (full upstream lists). Primary outcomes are never capped. Original totals preserved in filtersApplied.totalSecondaryOutcomes / totalOtherOutcomes whenever a cap is applied."New value: +"Optional cap on the number of secondary and other outcomes returned. Omit for no cap (full upstream lists). Primary outcomes are never capped. Original totals preserved in filtersApplied.totalSecondaryOutcomes / totalOtherOutcomes only when the cap trims a list."
    • changedInput schema / properties / referenceLimit / description
      Previous value: -"Optional cap on the number of references returned. Omit for no cap (full upstream list). Original total preserved in filtersApplied.totalReferences whenever a cap is applied. seeAlsoLinks are never capped."New value: +"Optional cap on the number of references returned. Omit for no cap (full upstream list). Original total preserved in filtersApplied.totalReferences only when the cap trims the list. seeAlsoLinks are never capped."
    • changedOutput schema / properties / filtersApplied / properties / locationLimit / description
      Previous value: -"Echo of the locationLimit input."New value: +"Echo of the locationLimit input — present only when the cap trimmed the list."
    • changedOutput schema / properties / filtersApplied / properties / outcomeLimit / description
      Previous value: -"Echo of the outcomeLimit input."New value: +"Echo of the outcomeLimit input — present only when the cap trimmed a list."
    • changedOutput schema / properties / filtersApplied / properties / referenceLimit / description
      Previous value: -"Echo of the referenceLimit input."New value: +"Echo of the referenceLimit input — present only when the cap trimmed the list."
  7. Changed3 schema fields changedv2.7.0
    • addedInput schema / properties / referenceLimit
      Added value: +{
      +  "description": "Optional cap on the number of references returned. Omit for no cap (full upstream list). Original total preserved in filtersApplied.totalReferences whenever a cap is applied. seeAlsoLinks are never capped.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / filtersApplied / properties / referenceLimit
      Added value: +{
      +  "description": "Echo of the referenceLimit input.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / filtersApplied / properties / totalReferences
      Added value: +{
      +  "description": "Upstream reference count before referenceLimit was applied.",
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
  8. Changed2 schema fields changedv2.6.1
    • addedOutput schema / properties / resultsSummary
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Compact counts of posted results, present when hasResults is true. The full resultsSection is intentionally omitted from this record-level tool — fetch it via clinicaltrials_get_study_results or the clinicaltrials://{nctId} resource.",
      +  "properties": {
      +    "baselineMeasures": {
      +      "description": "Baseline characteristic measures.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "otherAdverseEvents": {
      +      "description": "Distinct other (non-serious) adverse-event terms.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "outcomeMeasures": {
      +      "description": "Posted outcome measures.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "participantFlowPeriods": {
      +      "description": "Participant-flow periods.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "seriousAdverseEvents": {
      +      "description": "Distinct serious adverse-event terms.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedOutput schema / properties / study / description
      Previous value: -"Full study record with caller-requested filters already applied to locations and outcomes. Top-level keys: protocolSection (identification, status, sponsor, conditions, design, arms/interventions, outcomes, eligibility, contacts/locations), derivedSection (MeSH-normalized terms), hasResults, resultsSection, documentSection. Use clinicaltrials_get_field_definitions to explore the schema."New value: +"Full study record with caller-requested filters already applied to locations and outcomes. Top-level keys: protocolSection (identification, status, sponsor, conditions, design, arms/interventions, outcomes, eligibility, contacts/locations), derivedSection (MeSH-normalized terms), hasResults, documentSection. The heavy resultsSection is omitted — see resultsSummary for counts and clinicaltrials_get_study_results for full results data. Use clinicaltrials_get_field_definitions to explore the schema."
  9. Addedv2.5.1
  10. Removedv2.4.12
  11. Addedv2.0.6

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond them: which record sections come back, and that trimming preserves original totals in `filtersApplied` only when a cap actually removes items. It stops short of covering error behavior for malformed or unknown NCT IDs, which keeps it off a 5.

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

Conciseness4/5

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

Three sentences, front-loaded with the action and the identifier format, then the payload, then the optional caps — every sentence carries information. One mild imprecision: the summary lumps nearLocation with the 'trim' parameters even though it filters and sorts by distance rather than capping a list count.

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

Completeness4/5

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

With an output schema present, the description needn't detail return shape, and annotations cover the safety profile, so the remaining burden is purpose plus any surprising filter semantics — both handled. An agent has enough to call it correctly; the only gap is the absence of guidance on obtaining or validating the NCT ID.

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% and the nested nearLocation object carries rich documentation (radius defaults, coordinate granularity, dropped locations). The description's parameter sentence restates the same trimming/filtersApplied contract the schema already documents, adding only a compact overview rather than new meaning. Baseline 3 is appropriate.

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

Purpose4/5

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

States a specific verb and resource — 'Fetch a single clinical trial study by NCT ID from ClinicalTrials.gov' — and enumerates the record sections returned (protocol, eligibility, outcomes, arms, interventions, contacts, locations). This clearly separates it from single-section siblings like get_study_results or get_study_count by declaring the full record, but it never names an alternative explicitly, so sibling differentiation is inferred rather than stated.

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

Usage Guidelines3/5

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

Usage is implied by the required NCT ID: an agent understands this is the lookup path once an identifier is in hand. However, there is no explicit when-to-use guidance, no mention that search_studies is the way to obtain an NCT ID, and no stated exclusions (e.g., don't loop this over many IDs).

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