Skip to main content
Glama
clinicaltrialsgov-mcp-server

clinicaltrialsgov-mcp-server

by cyanheads

Clinicaltrials Get Study Record

clinicaltrials_get_study_record
Read-onlyIdempotent

Fetch a ClinicalTrials.gov trial by NCT ID to retrieve protocol, eligibility, outcomes, arms, interventions, contacts, and locations, with optional limits on locations, outcomes, and 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. 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"
      +]
  2. 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."
  3. 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
  4. 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"
      -]
  5. 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."
  6. 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"
      +}
  7. 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."
  8. Addedv2.5.1
  9. Removedv2.4.12
  10. Addedv2.0.6

TDQS

A4.6/5.0
Behavior5/5

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

Beyond readOnly/idempotent/openWorld annotations, it discloses real behavioral traits: limits only record totals in filtersApplied when they actually trim, primary outcomes are never capped, seeAlsoLinks are never capped, and nearLocation drops sites lacking published coordinates. It also warns that distances are city-centroid granularity rather than facility-level, which is non-obvious operational context.

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?

Front-loaded with the core action and return scope in the first two sentences, then the parameter caveats. The final sentence is dense and partly duplicates the schema, but no sentence is wasted given the nested parameter semantics.

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?

Complete for a single-record fetch with an output schema: it sets expectations about record breadth, explains trimming behavior and what metadata survives, and covers the only non-trivial nested parameter. An agent could call this correctly without opening the schema.

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

Parameters4/5

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

Schema coverage is 100% and the schema already documents cap behavior and filtersApplied echoes, so much of the third sentence restates structured data. Still, the description usefully synthesizes the parameter interactions (limits pair with nearLocation; primary outcomes exempt) into one place, giving a small edge over the baseline.

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?

States a specific verb and resource with scope: 'Fetch a single clinical trial study by NCT ID from ClinicalTrials.gov,' and enumerates the record's contents. 'Single ... by NCT ID' implicitly separates it from clinicaltrials_search_studies, whose broader geo filtering is explicitly named as the alternative for that case.

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

Usage Guidelines4/5

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

Explicitly routes geographic filtering across many studies to clinicaltrials_search_studies with geoFilter, and specifies omit-vs-0 semantics for the limit parameters. It stops short of a direct 'use this when you already have an NCT ID, otherwise search first' statement, so the primary routing rule is implied rather than stated.

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