clinicaltrialsgov-mcp-server
Version:
Search ClinicalTrials.gov trials, retrieve study details and results, and match patients to eligible trials via MCP. STDIO or Streamable HTTP.
18 lines • 1.79 kB
JavaScript
/**
* @fileoverview Shared recovery hint strings for error contracts surfaced
* across multiple tools and resources. Centralizing keeps wire-payload
* guidance consistent when the same failure reason fires from different
* surfaces — the service throw site spreads `ctx.recoveryFor(reason)`,
* which resolves whichever contract is attached to the active context.
* @module mcp-server/tools/utils/recovery-hints
*/
export const RECOVERY_HINTS = {
study_not_found: 'Verify the NCT ID at clinicaltrials.gov or call clinicaltrials_search_studies to discover a valid identifier.',
ids_not_found: 'Verify each NCT ID exists at clinicaltrials.gov, or call clinicaltrials_search_studies first to discover valid identifiers.',
field_invalid: 'Call clinicaltrials_get_field_definitions to browse the field tree; use PascalCase piece names like OverallStatus, Phase, or StudyType.',
enum_invalid: 'Call clinicaltrials_get_field_values with fields=["OverallStatus"] or fields=["Phase"] to see the valid enum values the filter accepts.',
query_parse_error: 'Field-scoped search uses advancedFilter with AREA[FieldName]value (call clinicaltrials_get_field_definitions to look up the right FieldName); free-text fields (query, conditionQuery, etc.) take plain words plus AND, OR, NOT — `[ ]` are reserved (advancedFilter AREA[] only); `( )` group sub-expressions and are safe when matched; `,` acts as AND.',
path_not_found: 'Call clinicaltrials_get_field_definitions with `query` (e.g., "phase", "enrollment") to find the field path by concept, or omit both arguments for a top-level overview.',
rate_limited: 'ClinicalTrials.gov rate-limited the request after several retries; wait about a minute before trying again.',
};
//# sourceMappingURL=recovery-hints.js.map