/** * @fileoverview Discover valid field values with study counts from ClinicalTrials.gov. * @module mcp-server/tools/definitions/get-field-values.tool */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const getFieldValues: import("@cyanheads/mcp-ts-core").ToolDefinition]>; }, z.core.$strip>, z.ZodObject<{ fieldStats: z.ZodArray; multiValued: z.ZodOptional; uniqueValuesCount: z.ZodOptional; uniqueValuesCounted: z.ZodOptional>; topValues: z.ZodOptional>>; longest: z.ZodOptional>; }, z.core.$strip>>; trueCount: z.ZodOptional; falseCount: z.ZodOptional; min: z.ZodOptional>; max: z.ZodOptional>; avg: z.ZodOptional; formats: z.ZodOptional>; }, z.core.$strip>>; }, z.core.$strip>, readonly [{ readonly reason: "blank_value"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "A parameter was supplied with a blank, whitespace-only, or empty-list value."; readonly recovery: "Supply a value containing non-whitespace, or for a list parameter at least one non-blank entry. Only when the parameter is optional and you meant to leave it unset, omit it entirely instead — omission and a blank value mean different things here."; }, { readonly reason: "field_invalid"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "A requested name is not a field (a record or index-only piece such as NumLocations, or an alt name of one; a search area such as ConditionSearch is not), names a group of fields such as LeadSponsor or ConditionMesh instead of its leaf pieces, or names a leaf whose type ClinicalTrials.gov does not count, such as LocationGeoPoint."; readonly recovery: "Call clinicaltrials_get_field_definitions to browse the field tree; use PascalCase piece names like OverallStatus, Phase, or StudyType. AREA expressions and clinicaltrials_get_field_values take leaf pieces only: LeadSponsorName, not the group LeadSponsor."; readonly thrownBy: "service"; }, { readonly reason: "request_too_long"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "The fields list makes the request URL longer than ClinicalTrials.gov accepts — a few hundred piece names in one call."; readonly recovery: "Shorten the longest inputs — a free-text query, advancedFilter, or a long fields or conditions list — or split a long list across several calls with fewer entries each, so the request URL fits within the length ClinicalTrials.gov accepts."; readonly thrownBy: "service"; }, { readonly reason: "rate_limited"; readonly code: JsonRpcErrorCode.RateLimited; readonly when: "ClinicalTrials.gov answered HTTP 429 on every attempt, or the call’s time budget ran out after a 429."; readonly recovery: "ClinicalTrials.gov rate-limited the request after several retries; wait about a minute before trying again."; readonly retryable: true; readonly thrownBy: "service"; }, { readonly reason: "retry_deadline_exceeded"; readonly code: JsonRpcErrorCode.Timeout; readonly when: "ClinicalTrials.gov did not answer within the call’s time budget, which covers every request, retry, and wait the call makes."; readonly recovery: "Retry after a minute or two. If the call asked for a lot at once — a large pageSize, many fields, or many nctIds — ask for less per call, or split the request across several calls."; readonly retryable: true; readonly thrownBy: "service"; }, { readonly reason: "upstream_timeout"; readonly code: JsonRpcErrorCode.Timeout; readonly when: "ClinicalTrials.gov answered HTTP 504 (gateway timeout) or 408 (request timeout), or sent no answer within the per-attempt timeout, on every attempt."; readonly recovery: "Retry after a few minutes. If it fails again, narrow the request — a more specific query or filter, a smaller pageSize, or fewer fields or nctIds — so ClinicalTrials.gov has less to compute and return."; readonly retryable: true; readonly thrownBy: "service"; }, { readonly reason: "upstream_unavailable"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "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."; readonly recovery: "Retry the same call unchanged after a few minutes — the arguments were not at fault. If it keeps failing, ClinicalTrials.gov is down; tell the user rather than rewording the query."; readonly retryable: true; readonly thrownBy: "service"; }, { readonly reason: "upstream_rejected"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "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."; readonly recovery: "Do not retry the same call right away or reword it — ClinicalTrials.gov refused it for a reason unrelated to the arguments, and it will refuse again. Tell the user the registry is not serving this request, and try again later."; readonly retryable: false; readonly thrownBy: "service"; }], { readonly notice: z.ZodOptional; }>; //# sourceMappingURL=get-field-values.tool.d.ts.map