{
  "server": {
    "instructions": "Haplotype Wallet provides secure storage and interoperability for biomarker data, whole genome VCF files, and raw data files from consumer genetic tests. It is intended for educational, research, and wellness information workflows. It does not provide clinical diagnoses, and is not a substitute for a doctor or a genetic counselor.\n\nThe MCP tools expose permissioned access to samples the caller is authorized to use (the web UI calls these genotypes, listed under My People), high-performance mirrors of public reference databases, and endpoints for running publicly available algorithms on authorized data.\n\nSamples: use list_samples to see available samples and get_sample for details on one sample. Both show provenance: how it was produced (imputation pipeline, tools, reference panel, source→target genome build), so you can explain where a result came from. get_run shows what a run consumed (its inputs and the source sample's provenance).\n\nVariants: use lookup_variant_references to look up reference coordinates and alleles for SNP rsIDs, and query_variants to retrieve observed variants by gene, HGVS notation, genomic region, GWAS Catalog trait/allele association, or BRaVa rare-variant association. Batch up to 20 loci per call (positions, or a list of HGVS strings) rather than one call per SNP. query_variants returns genotype calls and public database annotations for context, not determinations.\n\nReference lookups (global, not sample-specific) mirror public databases: lookup_cpic for CPIC gene-drug reference tables, lookup_clingen for ClinGen gene/condition curations and dosage records, and list_gwas_associations to browse GWAS Catalog entries by trait/gene/rsID. GWAS also filters by effect size, p-value, and study sample size. All three accept sort/order (e.g. rank GWAS hits by effect size, largest studies first). list_brava_associations looks up BRaVa rare-variant results (rare coding variants, allele frequency <= 0.001) for a gene or a variant, and list_brava_traits lists its 44 traits. BRaVa stores only results with p <= 0.01, so total_count 0 means no association at or below the requested p_value_max, not that the gene was not studied. Name BRaVa and cite its publication when you report a BRaVa result.\n\nPolygenic scores, discover then run: list_pgs_categories and search_pgs_scores find PGS Catalog models for a trait. Then compute them with the ids from search_pgs_scores, comma-separated, and poll get_run for the results:\n    schedule_run('pgsc_calc', input={'pgs_model_ids': '<ids>'}, sample_id=...)\n\nUse list_member_pgs_scores to read back already-computed scores (check there before re-running pgsc_calc). To explain where a score came from, follow its result_id into get_run(result_id), which returns what the run consumed and how the input sample was imputed.\n\nReports: list_reports names the reports the Wallet can make (for example a polygenic score summary or a pharmacogenomics overview), and get_report(report, sample_id) makes one from stored data and returns its JSON. In the Wallet chat the user can also open the HTML version and download the PDF under that call.\n\nBiobank questions, where these tools are offered: some questions only a large research cohort can answer, such as how often a variant occurs among All of Us participants with a condition. submit_biobank_request queues one for a person to run by hand, and the answer takes days, so tell the user it comes later. If it involves the user's own variant, look the variant up with query_variants first. Phrase the question about the cohort, never about the user, with no names or genotypes, and one question per request. Check on it with get_biobank_request; list_biobank_requests finds answers that arrived since an earlier conversation.\n\nIf a tool fails or returns something clearly wrong, say so plainly and offer to file a bug report with report_issue, passing the '(ref: ...)' from the error message as error_reference so the maintainers get the trace. File it only once the user agrees, and never put genotypes or sequence in a report.",
    "name": "Haplotype Wallet"
  },
  "tools": [
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Get one algorithm's details, including its input schema.\n\nReturns the algorithm's name, description, owner, latest_version, and\ninput_schema — the JSON-schema (OpenAPI) contract describing what the\n`input` dict for schedule_run must contain. Read input_schema before\ncalling schedule_run so you construct a valid input. If the algorithm\nruns over a sample, pass it through schedule_run's `sample_id`\nparameter (using a sample_id from list_samples) rather than embedding it\nin `input`.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "algorithm_name": {
            "description": "The algorithm name from list_algorithms.",
            "type": "string"
          }
        },
        "required": [
          "algorithm_name"
        ],
        "type": "object"
      },
      "name": "get_algorithm",
      "outputSchema": {
        "description": "One algorithm, with the input contract of its latest version.",
        "properties": {
          "description": {
            "type": "string"
          },
          "input_schema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "JSON Schema of the `input` schedule_run expects, passed through from the algorithm. Null if no version exists."
          },
          "latest_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "The version schedule_run runs. Null if none exists."
          },
          "name": {
            "description": "Pass this to get_algorithm and schedule_run.",
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "usage_hint": {
            "description": "How to fill `input`, for algorithms that need it.",
            "type": "string"
          }
        },
        "required": [
          "name",
          "description",
          "latest_version",
          "owner",
          "input_schema"
        ],
        "type": "object"
      },
      "title": "Get Algorithm"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Check on a biobank question: its status, and the answer once there is one.\n\nA person answers each question by hand, so most checks find it still\nqueued or in_progress, with a message saying it is not answered yet.\nOnce answered, `answer` holds a summary with caveats, an aggregate table\nand the data release it came from. A declined request carries\ndecline_reason instead.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "request_id": {
            "description": "The request_id from submit_biobank_request or list_biobank_requests.",
            "type": "string"
          }
        },
        "required": [
          "request_id"
        ],
        "type": "object"
      },
      "name": "get_biobank_request",
      "outputSchema": {
        "description": "One biobank request, with its answer once there is one.",
        "properties": {
          "answer": {
            "description": "Present only when status is answered.",
            "properties": {
              "acknowledgment": {
                "description": "Credit the biobank requires wherever these results are shown or shared. Include it with them.",
                "type": "string"
              },
              "data_release": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "The biobank data release the query ran on."
              },
              "summary": {
                "description": "What the results show, with caveats. Relay the caveats.",
                "type": "string"
              },
              "table": {
                "anyOf": [
                  {
                    "description": "Aggregate results exported from the biobank.",
                    "properties": {
                      "columns": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "rows": {
                        "description": "One list per row, in column order. A count can be a string such as \"≤20\": the biobank does not allow publishing counts from 1 to 20.",
                        "items": {
                          "items": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "integer"
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "type": "array"
                        },
                        "type": "array"
                      }
                    },
                    "required": [
                      "columns",
                      "rows"
                    ],
                    "type": "object"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "summary",
              "data_release",
              "acknowledgment",
              "table"
            ],
            "type": "object"
          },
          "answered_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When it was answered or declined. Null while open."
          },
          "biobank": {
            "description": "all_of_us, the All of Us program.",
            "type": "string"
          },
          "conditions": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "decline_reason": {
            "description": "Present only when status is declined.",
            "type": "string"
          },
          "genes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          },
          "message": {
            "description": "Where the request stands. Before an answer exists it says so; never present an open request as an empty result.",
            "type": "string"
          },
          "question": {
            "type": "string"
          },
          "request_id": {
            "description": "Pass this to get_biobank_request.",
            "type": "string"
          },
          "status": {
            "description": "queued, then in_progress while a person runs the query, then answered or declined.",
            "enum": [
              "queued",
              "in_progress",
              "answered",
              "declined"
            ],
            "type": "string"
          },
          "submitted_at": {
            "type": "string"
          },
          "variants": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "request_id",
          "biobank",
          "status",
          "question",
          "submitted_at",
          "answered_at",
          "variants",
          "genes",
          "conditions",
          "message"
        ],
        "type": "object"
      },
      "title": "Get Biobank Request"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Make one report for one sample and return its JSON version.\n\nCall list_reports first for the names. The report reads the sample's\ngenotypes and stored polygenic scores and computes nothing; a score that\nwas never computed shows as not computed. Nothing is stored.\n\nThe user can view the same report as HTML and download it as PDF in the\nWallet chat, under this tool call, for every format listed in ``formats``.\nMention that when the user wants something to read, print or share,\ninstead of copying the whole report into your answer.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "report": {
            "description": "Report name, exactly as list_reports gives it.",
            "type": "string"
          },
          "sample_id": {
            "description": "The sample identifier (e.g. \"ABCDEFGHIJ001\") from list_samples.",
            "type": "string"
          }
        },
        "required": [
          "report",
          "sample_id"
        ],
        "type": "object"
      },
      "name": "get_report",
      "outputSchema": {
        "description": "One rendered report.",
        "properties": {
          "content": {
            "additionalProperties": true,
            "description": "The report's JSON version, as the template wrote it.",
            "type": "object"
          },
          "formats": {
            "description": "Formats the user can open in the Wallet chat.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "report": {
            "type": "string"
          },
          "sample_id": {
            "description": "Wallet sample_id it was made from.",
            "type": "string"
          }
        },
        "required": [
          "report",
          "sample_id",
          "formats",
          "content"
        ],
        "type": "object"
      },
      "title": "Get Report"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Get a run's status, input, output, and step-by-step task progress.\n\nReturns the run's status (Pending, then Complete or Error), its input and\noutput (output is empty until the run completes), and its\n`tasks` — the underlying execution steps. Each task carries `steps` (the\nplanned step sequence) and `current_step` (where it is now), so you can\ntell the user not just \"Pending\" but \"imputation running, on the phasing\nstep\". Tasks also carry timing: `estimated_duration_seconds` is the average\ncompletion time from past runs of that kind, and `eta_seconds_remaining`\nsays how long an in-flight task has left. Poll this tool to watch an async\nrun progress, waiting `suggested_poll_interval_seconds` between polls.\n\n`provenance` traces a result (e.g. a PGS score reached via its `result_id`)\nback to its source from two independent siblings: `inputs` — what the run\nconsumed (`stage` + chromosome count), run-derived; and `sample_provenance` —\nhow the run's input sample was produced (imputation pipeline, reference panel,\nbuilds), sample-derived. Either may be `null` on its own (a legacy run with no\nrecorded inputs over a reprocessed sample shows `sample_provenance` only);\n`provenance` itself is `null` only when *both* are absent.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "run_id": {
            "description": "The run identifier from schedule_run or list_runs.",
            "type": "string"
          }
        },
        "required": [
          "run_id"
        ],
        "type": "object"
      },
      "name": "get_run",
      "outputSchema": {
        "description": "One run: status, input, output, provenance and task progress.",
        "properties": {
          "algorithm": {
            "type": "string"
          },
          "created": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "input": {
            "additionalProperties": true,
            "description": "The algorithm input, passed through as scheduled.",
            "type": "object"
          },
          "modified": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "output": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The algorithm output, passed through. Empty until the run completes."
          },
          "provenance": {
            "anyOf": [
              {
                "description": "Where a run's result came from. Null only when both parts are absent.",
                "properties": {
                  "inputs": {
                    "anyOf": [
                      {
                        "description": "What a run consumed.",
                        "properties": {
                          "chromosomes": {
                            "description": "Number of per-chromosome files the run read.",
                            "type": "integer"
                          },
                          "stage": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Processing stage of the sample files the run read."
                          }
                        },
                        "required": [
                          "stage",
                          "chromosomes"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Null for runs that predate input tracking."
                  },
                  "sample_provenance": {
                    "anyOf": [
                      {
                        "description": "How a sample was produced: genome builds, imputation, and pipeline steps.",
                        "properties": {
                          "imputation_tool": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Tool of the imputation step, e.g. \"beagle\"."
                          },
                          "impute_reason": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "is_imputed": {
                            "anyOf": [
                              {
                                "type": "boolean"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "pipeline": {
                            "items": {
                              "description": "One step of the processing pipeline that produced a sample.",
                              "properties": {
                                "finished_at": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "started_at": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "step": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Step name, e.g. \"beagle-impute\"."
                                },
                                "tools": {
                                  "description": "Tools the step ran, each as \"name version\".",
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                }
                              },
                              "required": [
                                "step",
                                "tools",
                                "started_at",
                                "finished_at"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "processed_at": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "reference_panel": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Id of the imputation reference panel."
                          },
                          "source_build": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Genome build of the uploaded file, e.g. \"GRCh37\"."
                          },
                          "target_build": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Genome build of the imputation reference panel."
                          },
                          "variant_count": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "is_imputed",
                          "source_build",
                          "target_build",
                          "reference_panel",
                          "variant_count",
                          "impute_reason",
                          "processed_at",
                          "imputation_tool",
                          "pipeline"
                        ],
                        "type": "object"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "How the run's input sample was produced. Null when the sample predates provenance or could not be read."
                  }
                },
                "required": [
                  "inputs",
                  "sample_provenance"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "run_id": {
            "type": "string"
          },
          "sample_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Wallet sample_id the run was computed on."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Pending, then Complete or Error."
          },
          "tasks": {
            "items": {
              "description": "One execution task of a run, with its step plan and progress.",
              "properties": {
                "completed_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "current_step": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "error_message": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "estimated_duration_seconds": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Average completion time of past tasks of this kind."
                },
                "eta_seconds_remaining": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "started_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "pending, running, succeeded, failed or cancelled."
                },
                "steps": {
                  "anyOf": [
                    {
                      "items": {
                        "additionalProperties": true,
                        "type": "object"
                      },
                      "type": "array"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The planned step sequence, passed through."
                },
                "suggested_poll_interval_seconds": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Wait this long before calling get_run again."
                }
              },
              "required": [
                "id",
                "kind",
                "status",
                "current_step",
                "steps",
                "started_at",
                "completed_at",
                "error_message",
                "estimated_duration_seconds",
                "eta_seconds_remaining",
                "suggested_poll_interval_seconds"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "algorithm",
          "version",
          "status",
          "sample_id",
          "input",
          "output",
          "provenance",
          "created",
          "modified",
          "tasks"
        ],
        "type": "object"
      },
      "title": "Get Run"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Get details about a specific sample by its sample_id.\n\nReturns filename, file size, processing timestamp, upload request ID,\nand HaploHub metadata when available. ``provenance`` describes how the\nsample was produced — the imputation pipeline, tools, reference panel, and\nsource→target genome build — or ``null`` for samples processed before\nprovenance was recorded.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "sample_id": {
            "description": "The sample identifier (e.g. \"ABCDEFGHIJ001\") from list_samples.",
            "type": "string"
          }
        },
        "required": [
          "sample_id"
        ],
        "type": "object"
      },
      "name": "get_sample",
      "outputSchema": {
        "description": "One sample, with the upload request it was created from.",
        "properties": {
          "file_size": {
            "description": "Size of the uploaded file in bytes.",
            "type": "integer"
          },
          "haplohub_created": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "When HaploHub created the sample. Absent when the upstream lookup failed."
          },
          "label": {
            "description": "Short display name, e.g. \"Sample #1\".",
            "type": "string"
          },
          "processed_at": {
            "type": "string"
          },
          "provenance": {
            "anyOf": [
              {
                "description": "How a sample was produced, and the uploaded file it came from.",
                "properties": {
                  "imputation_tool": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Tool of the imputation step, e.g. \"beagle\"."
                  },
                  "impute_reason": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "is_imputed": {
                    "anyOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pipeline": {
                    "items": {
                      "description": "One step of the processing pipeline that produced a sample.",
                      "properties": {
                        "finished_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "started_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "step": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Step name, e.g. \"beagle-impute\"."
                        },
                        "tools": {
                          "description": "Tools the step ran, each as \"name version\".",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "required": [
                        "step",
                        "tools",
                        "started_at",
                        "finished_at"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "processed_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "reference_panel": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Id of the imputation reference panel."
                  },
                  "source_build": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Genome build of the uploaded file, e.g. \"GRCh37\"."
                  },
                  "source_upload": {
                    "description": "The uploaded file a sample came from.",
                    "properties": {
                      "filename": {
                        "type": "string"
                      },
                      "uploaded_at": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "filename",
                      "uploaded_at"
                    ],
                    "type": "object"
                  },
                  "target_build": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ],
                    "description": "Genome build of the imputation reference panel."
                  },
                  "variant_count": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "is_imputed",
                  "source_build",
                  "target_build",
                  "reference_panel",
                  "variant_count",
                  "impute_reason",
                  "processed_at",
                  "imputation_tool",
                  "pipeline",
                  "source_upload"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null for samples processed before provenance was recorded, and when the upstream lookup failed."
          },
          "sample_id": {
            "description": "Pass this to get_sample, query_variants, schedule_run and list_runs.",
            "type": "string"
          },
          "source_filename": {
            "type": "string"
          },
          "upload_request_id": {
            "type": "string"
          }
        },
        "required": [
          "sample_id",
          "label",
          "source_filename",
          "file_size",
          "processed_at",
          "provenance",
          "upload_request_id"
        ],
        "type": "object"
      },
      "title": "Get Sample"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "List the analysis algorithms available to run on authorized samples.\n\nEach algorithm is a named, versioned analysis (e.g. imputation, ancestry,\npolygenic scoring). Returns lean summaries — name, description, and\nlatest_version. The input contract is NOT included here (it can be large);\ncall get_algorithm(name) to see the input schema before scheduling a run\nwith schedule_run.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "name": "list_algorithms",
      "outputSchema": {
        "properties": {
          "result": {
            "items": {
              "description": "A named, versioned analysis that schedule_run can run.",
              "properties": {
                "description": {
                  "type": "string"
                },
                "latest_version": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "The version schedule_run runs. Null if none exists."
                },
                "name": {
                  "description": "Pass this to get_algorithm and schedule_run.",
                  "type": "string"
                }
              },
              "required": [
                "name",
                "description",
                "latest_version"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "result"
        ],
        "type": "object",
        "x-fastmcp-wrap-result": true
      },
      "title": "List Algorithms"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "List the user's biobank questions with their status, latest activity first.\n\nUse it at the start of a conversation to find answers that arrived since\nthe question was asked: a request with status answered and a recent\nanswered_at is news for the user. Call get_biobank_request(request_id)\nto read an answer. Requests are ordered by when they were answered, or\nsubmitted if still open. Returns at most 50, or an empty list if the user\nhas asked none.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "name": "list_biobank_requests",
      "outputSchema": {
        "properties": {
          "result": {
            "items": {
              "description": "A biobank request, without its answer.",
              "properties": {
                "answered_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "When it was answered or declined. Null while open."
                },
                "biobank": {
                  "description": "all_of_us, the All of Us program.",
                  "type": "string"
                },
                "question": {
                  "type": "string"
                },
                "request_id": {
                  "description": "Pass this to get_biobank_request.",
                  "type": "string"
                },
                "status": {
                  "description": "queued, then in_progress while a person runs the query, then answered or declined.",
                  "enum": [
                    "queued",
                    "in_progress",
                    "answered",
                    "declined"
                  ],
                  "type": "string"
                },
                "submitted_at": {
                  "type": "string"
                }
              },
              "required": [
                "request_id",
                "biobank",
                "status",
                "question",
                "submitted_at",
                "answered_at"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "result"
        ],
        "type": "object",
        "x-fastmcp-wrap-result": true
      },
      "title": "List Biobank Requests"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Look up BRaVa rare-variant associations by gene or variant (reference data).\n\nBRaVa (Biobank Rare Variant Analysis) is a cross-ancestry meta-analysis of\nrare protein-coding variants (allele frequency <= 0.001) across ten\nbiobanks and 44 traits. Only results with p <= 0.01 are stored, so\ntotal_count 0 means BRaVa has no association at or below the requested\np_value_max (0.01 when not given), not that the gene or variant was not\nstudied. An empty page with total_count above 0 only means offset is past\nthe last result. Common and non-coding\nvariants are outside its scope: use list_gwas_associations for those.\n\nThe gene level tests a gene's rare variants together, per trait, variant\nmask and allele-frequency cap, with four tests: burden (with effect size\nburden_beta), burden (Stouffer), SKAT and SKAT-O. min_p is the smallest of\nthe four. The variant level gives single-variant results with effect size\n(beta, se) and p_value.\n\nEvery item names its trait (code, name, kind), its source (\"BRaVa\"), the\nrelease and the citation URL of the BRaVa publication. Name BRaVa and cite\nthat URL when you report a result. list_brava_traits lists the trait codes.\n\nThis is global reference data, not specific to any sample. To check the\nuser's samples at BRaVa variants, use query_variants(query_type=\"brava\",\n...).\n\nReturns a page {total_count, offset, limit} with the items under\ngene_associations or variant_associations, after the level.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "chromosome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Chromosome, \"chr1\" or \"1\", optionally narrowed with start and end. Variant level only."
          },
          "end": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "1-based end position, inclusive. Variant level only."
          },
          "ensembl_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Ensembl gene id, e.g. \"ENSG00000169174\". Gene level only."
          },
          "gene": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "HGNC gene symbol, e.g. \"PCSK9\". At the variant level it selects the variants inside the gene's GRCh38 span."
          },
          "level": {
            "default": "gene",
            "description": "\"gene\" (default): gene-level results, one per trait, gene, mask and max_maf. \"variant\": single-variant results on GRCh38.",
            "enum": [
              "gene",
              "variant"
            ],
            "type": "string"
          },
          "limit": {
            "default": 20,
            "description": "Page size (default 20, capped at 50).",
            "type": "integer"
          },
          "mask": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Variant class tested: \"pLoF\", \"damaging_missense_or_protein_altering\", \"other_missense_or_protein_altering\", \"synonymous\", or a \";\"-joined combination. Gene level only."
          },
          "max_maf": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Allele-frequency cap of the variants a gene test included: 0.0001 or 0.001. Gene level only."
          },
          "offset": {
            "default": 0,
            "description": "Page offset for paging through total_count.",
            "type": "integer"
          },
          "order": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "\"asc\" (default, most significant first) or \"desc\"."
          },
          "p_value_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Keep results with p at most this value (above 0, at most 1). At the gene level a row matches when any of its four tests reaches it."
          },
          "sort": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Gene level: \"min_p\" (default), \"burden_p\", \"burden_p_stouffer\", \"skat_p\" or \"skato_p\". Variant level: \"p_value\" (default) or \"position\"."
          },
          "start": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "1-based start position. Variant level only."
          },
          "trait": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "BRaVa trait code, e.g. \"LDLC\" or \"AFib\", exactly as list_brava_traits returns it."
          },
          "variant": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "One variant as \"chr:pos:ref:alt\" on GRCh38, e.g. \"chr1:55051215:G:A\". Variant level only."
          }
        },
        "type": "object"
      },
      "name": "list_brava_associations",
      "outputSchema": {
        "description": "A page of BRaVa associations, under the key of the level asked for.",
        "properties": {
          "gene_associations": {
            "description": "Only when level is \"gene\".",
            "items": {
              "description": "A BRaVa gene-level result for one trait, gene, mask and max_maf.\n\nA field is left out when BRaVa has no value for it.",
              "properties": {
                "burden_beta": {
                  "description": "Effect size of the inverse-variance weighted burden test.",
                  "type": "number"
                },
                "burden_het_p": {
                  "description": "Heterogeneity p-value across studies.",
                  "type": "number"
                },
                "burden_p": {
                  "description": "P-value of the inverse-variance weighted burden test.",
                  "type": "number"
                },
                "burden_p_stouffer": {
                  "type": "number"
                },
                "burden_se": {
                  "type": "number"
                },
                "citation": {
                  "description": "URL of the BRaVa publication to cite.",
                  "type": "string"
                },
                "ensembl_id": {
                  "type": "string"
                },
                "gene_symbol": {
                  "type": "string"
                },
                "mask": {
                  "description": "The variant class tested: \"pLoF\", \"damaging_missense_or_protein_altering\", \"other_missense_or_protein_altering\", \"synonymous\", or a \";\"-joined combination.",
                  "type": "string"
                },
                "max_maf": {
                  "description": "Allele-frequency cap of the variants included.",
                  "type": "number"
                },
                "min_p": {
                  "description": "The smallest of the four test p-values.",
                  "type": "number"
                },
                "release_version": {
                  "description": "The BRaVa release, e.g. \"2026-05-21\".",
                  "type": "string"
                },
                "skat_p": {
                  "type": "number"
                },
                "skato_p": {
                  "type": "number"
                },
                "source": {
                  "description": "Always \"BRaVa\".",
                  "type": "string"
                },
                "trait": {
                  "description": "The BRaVa trait an association belongs to.",
                  "properties": {
                    "code": {
                      "description": "Trait code, e.g. \"LDLC\". Pass it as a trait filter.",
                      "type": "string"
                    },
                    "kind": {
                      "description": "\"binary\" (case/control) or \"quantitative\" (a measurement, e.g. LDL cholesterol).",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "name",
                    "kind"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "trait",
                "ensembl_id",
                "mask",
                "max_maf",
                "min_p",
                "source",
                "citation"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total_count": {
            "description": "Matches across all pages, not only this one.",
            "type": "integer"
          },
          "variant_associations": {
            "description": "Only when level is \"variant\".",
            "items": {
              "description": "A BRaVa single-variant result for one trait, on GRCh38.\n\nA field is left out when BRaVa has no value for it.",
              "properties": {
                "alternate": {
                  "type": "string"
                },
                "beta": {
                  "description": "Effect size.",
                  "type": "number"
                },
                "chromosome": {
                  "type": "string"
                },
                "citation": {
                  "description": "URL of the BRaVa publication to cite.",
                  "type": "string"
                },
                "direction": {
                  "description": "One \"+\", \"-\" or \"?\" (missing) per contributing study.",
                  "type": "string"
                },
                "het_p": {
                  "description": "Heterogeneity p-value across studies.",
                  "type": "number"
                },
                "i2": {
                  "type": "number"
                },
                "n": {
                  "description": "Sample size.",
                  "type": "integer"
                },
                "n_cases": {
                  "description": "Cases. Absent for quantitative traits.",
                  "type": "integer"
                },
                "n_effective": {
                  "type": "number"
                },
                "neg_log10_p": {
                  "type": "number"
                },
                "p_value": {
                  "type": "number"
                },
                "position": {
                  "description": "GRCh38 position.",
                  "type": "integer"
                },
                "reference": {
                  "type": "string"
                },
                "release_version": {
                  "description": "The BRaVa release, e.g. \"2026-05-21\".",
                  "type": "string"
                },
                "se": {
                  "type": "number"
                },
                "source": {
                  "description": "Always \"BRaVa\".",
                  "type": "string"
                },
                "trait": {
                  "description": "The BRaVa trait an association belongs to.",
                  "properties": {
                    "code": {
                      "description": "Trait code, e.g. \"LDLC\". Pass it as a trait filter.",
                      "type": "string"
                    },
                    "kind": {
                      "description": "\"binary\" (case/control) or \"quantitative\" (a measurement, e.g. LDL cholesterol).",
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "code",
                    "name",
                    "kind"
                  ],
                  "type": "object"
                }
              },
              "required": [
                "trait",
                "chromosome",
                "position",
                "reference",
                "alternate",
                "p_value",
                "neg_log10_p",
                "source",
                "citation"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "total_count",
          "offset",
          "limit"
        ],
        "type": "object"
      },
      "title": "List BRaVa Associations"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "List the 44 traits of the BRaVa rare-variant meta-analysis.\n\nGlobal reference data, not specific to the user's samples. Each trait has a\ncode (e.g. \"LDLC\", \"AFib\"), a name and a kind: \"binary\" (case/control) or\n\"quantitative\" (a measurement). Pass the code as trait to\nlist_brava_associations, or as trait_id to\nquery_variants(query_type=\"brava\", ...).",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "name": "list_brava_traits",
      "outputSchema": {
        "properties": {
          "result": {
            "items": {
              "description": "A BRaVa trait.",
              "properties": {
                "category": {
                  "type": "string"
                },
                "code": {
                  "description": "Trait code, e.g. \"LDLC\". Pass it as a trait filter.",
                  "type": "string"
                },
                "kind": {
                  "description": "\"binary\" (case/control) or \"quantitative\" (a measurement, e.g. LDL cholesterol).",
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "code",
                "name",
                "kind"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "result"
        ],
        "type": "object",
        "x-fastmcp-wrap-result": true
      },
      "title": "List BRaVa Traits"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Search the GWAS Catalog for published trait associations (reference data).\n\nThe GWAS Catalog records published associations between genetic variants and\ntraits, including biomarkers, quantitative measurements, and wellness\ntraits. This is global reference knowledge — not specific to any sample. To\nintersect these public records with authorized genotype data, use\nquery_variants(query_type=\"gwas\", ...) instead, which returns associations\nrelevant to genotyped loci.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "association_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Fetch a single association by its id instead of listing.\nWhen set, the other filters are ignored and the result is\n{\"item\": <association> | None}."
          },
          "chromosome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Chromosome filter (e.g. \"10\")."
          },
          "gene": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Mapped gene symbol filter (e.g. \"TCF7L2\")."
          },
          "limit": {
            "default": 20,
            "description": "Page size (default 20, capped at 50).",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "Page offset for paging through total_count.",
            "type": "integer"
          },
          "or_beta_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "or_beta_min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "order": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Sort direction, \"asc\" or \"desc\" (default \"desc\")."
          },
          "p_value_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Maximum association p-value (e.g. 5e-8 for genome-wide\nsignificance)."
          },
          "p_value_min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Minimum association p-value."
          },
          "rs_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "SNP rs id filter (e.g. \"rs7903146\")."
          },
          "sample_size_min": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Minimum study sample size (approximated from the study's\nfree-text sample description) — use to favor larger, better-powered\nstudies."
          },
          "search": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Free-text search over trait / gene / study."
          },
          "sort": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Column to sort by (free string; e.g. \"p_value\", \"or_or_beta\",\n\"sample_size\"). Paired with order."
          },
          "trait_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "GWAS Catalog / EFO trait id filter."
          }
        },
        "type": "object"
      },
      "name": "list_gwas_associations",
      "outputSchema": {
        "description": "A page of associations, or a single one when association_id was given.",
        "properties": {
          "item": {
            "anyOf": [
              {
                "description": "A GWAS Catalog association. A field is left out when the catalog has no value.",
                "properties": {
                  "chromosome": {
                    "type": "string"
                  },
                  "ci_text": {
                    "type": "string"
                  },
                  "context": {
                    "type": "string"
                  },
                  "disease_trait": {
                    "type": "string"
                  },
                  "id": {
                    "description": "Pass as association_id to fetch this one record.",
                    "type": "string"
                  },
                  "mapped_gene": {
                    "type": "string"
                  },
                  "mapped_trait": {
                    "type": "string"
                  },
                  "or_or_beta": {
                    "description": "Odds ratio or beta coefficient.",
                    "type": "number"
                  },
                  "p_value": {
                    "type": "number"
                  },
                  "position": {
                    "type": "integer"
                  },
                  "pubmed_id": {
                    "type": "string"
                  },
                  "pvalue_mlog": {
                    "type": "number"
                  },
                  "region": {
                    "type": "string"
                  },
                  "reported_genes": {
                    "type": "string"
                  },
                  "risk_allele_frequency": {
                    "type": "string"
                  },
                  "rs_id": {
                    "type": "string"
                  },
                  "sample_size": {
                    "type": "integer"
                  },
                  "strongest_snp_risk_allele": {
                    "type": "string"
                  },
                  "study_accession": {
                    "type": "string"
                  },
                  "trait_id": {
                    "type": "string"
                  },
                  "trait_label": {
                    "type": "string"
                  }
                },
                "required": [
                  "id"
                ],
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Only when association_id was given. Null if no such association exists."
          },
          "items": {
            "description": "List calls only.",
            "items": {
              "description": "A GWAS Catalog association. A field is left out when the catalog has no value.",
              "properties": {
                "chromosome": {
                  "type": "string"
                },
                "ci_text": {
                  "type": "string"
                },
                "context": {
                  "type": "string"
                },
                "disease_trait": {
                  "type": "string"
                },
                "id": {
                  "description": "Pass as association_id to fetch this one record.",
                  "type": "string"
                },
                "mapped_gene": {
                  "type": "string"
                },
                "mapped_trait": {
                  "type": "string"
                },
                "or_or_beta": {
                  "description": "Odds ratio or beta coefficient.",
                  "type": "number"
                },
                "p_value": {
                  "type": "number"
                },
                "position": {
                  "type": "integer"
                },
                "pubmed_id": {
                  "type": "string"
                },
                "pvalue_mlog": {
                  "type": "number"
                },
                "region": {
                  "type": "string"
                },
                "reported_genes": {
                  "type": "string"
                },
                "risk_allele_frequency": {
                  "type": "string"
                },
                "rs_id": {
                  "type": "string"
                },
                "sample_size": {
                  "type": "integer"
                },
                "strongest_snp_risk_allele": {
                  "type": "string"
                },
                "study_accession": {
                  "type": "string"
                },
                "trait_id": {
                  "type": "string"
                },
                "trait_label": {
                  "type": "string"
                }
              },
              "required": [
                "id"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total_count": {
            "description": "Matches across all pages. List calls only.",
            "type": "integer"
          }
        },
        "type": "object"
      },
      "title": "List GWAS Associations"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "List already-computed polygenic score (PGS) results.\n\nThis is the result-reading step of the PGS loop: scores are produced by\nschedule_run(\"pgsc_calc\", …) (see search_pgs_scores for discovery) and stored\nper authorized member. Returns the most recent score per model. Use this to\ncheck whether a model was already computed before re-running it — match each\nitem's ``pgs_model_id`` against the catalog ids from search_pgs_scores.\n\nEach item has: ``pgs_model_id`` (the scored model as a harmonized id, e.g.\nPGS000123_hmPOS_GRCh38 — its leading PGS number is the PGS Catalog id),\n``percentile`` and ``adjusted_z_score`` (the score), the population-relative\n``population_percentile`` / ``population_z_score`` / ``population_id``, the\nwallet ``sample_id`` it was computed on, ``result_id``, and ``created``.\n\nTo explain where a score came from end to end (\"which run computed it, from\nwhat input, on a sample imputed how?\"), follow ``result_id`` into\nget_run(result_id): its ``provenance`` returns what the run consumed *and*\nhow the input sample was produced. Scores are kept lean here — provenance is\nnot inlined per score (many scores share one run).\n\nScoped to the caller — only scores for data the caller is authorized to\naccess are returned. Returns an empty list if none have been computed yet.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "name": "list_member_pgs_scores",
      "outputSchema": {
        "properties": {
          "result": {
            "items": {
              "description": "A computed polygenic score, the most recent one for its model.",
              "properties": {
                "adjusted_z_score": {
                  "type": "number"
                },
                "created": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "percentile": {
                  "type": "number"
                },
                "pgs_model_id": {
                  "description": "The scored model, as a harmonized id such as PGS000123_hmPOS_GRCh38. The leading PGS number is the PGS Catalog id that search_pgs_scores returns.",
                  "type": "string"
                },
                "population_id": {
                  "description": "Reference population the score is relative to.",
                  "type": "string"
                },
                "population_percentile": {
                  "type": "number"
                },
                "population_z_score": {
                  "type": "number"
                },
                "result_id": {
                  "description": "The run that computed the score. Pass it to get_run to see what the run consumed and how the sample was produced.",
                  "type": "string"
                },
                "sample_id": {
                  "description": "Wallet sample_id the score was computed on.",
                  "type": "string"
                },
                "score_id": {
                  "type": "string"
                }
              },
              "required": [
                "score_id",
                "pgs_model_id",
                "sample_id",
                "result_id",
                "percentile",
                "adjusted_z_score",
                "population_id",
                "population_percentile",
                "population_z_score",
                "created"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "result"
        ],
        "type": "object",
        "x-fastmcp-wrap-result": true
      },
      "title": "List Member PGS Scores"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "List PGS Catalog categories (and their traits) to orient a PGS search.\n\nGlobal reference data, not specific to the user's samples. Each category has\na label, a pgs_count, and its traits (each with an id, label, and pgs_count).\nUse a category id or trait id to narrow search_pgs_scores(category_id=...) /\nsearch_pgs_scores(trait_id=...).",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "name": "list_pgs_categories",
      "outputSchema": {
        "properties": {
          "result": {
            "items": {
              "description": "A PGS Catalog category and its traits.",
              "properties": {
                "id": {
                  "description": "Pass as category_id to search_pgs_scores.",
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "pgs_count": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "traits": {
                  "items": {
                    "description": "A trait within a PGS Catalog category.",
                    "properties": {
                      "id": {
                        "description": "Pass as trait_id to search_pgs_scores.",
                        "type": "string"
                      },
                      "label": {
                        "type": "string"
                      },
                      "pgs_count": {
                        "anyOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "label",
                      "pgs_count"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "id",
                "label",
                "pgs_count",
                "traits"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "result"
        ],
        "type": "object",
        "x-fastmcp-wrap-result": true
      },
      "title": "List PGS Categories"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "List the reports the Wallet can make from a sample.\n\nEach report has a ``name`` (pass it to get_report), a ``description`` of\nwhat it covers and when it helps, and the ``formats`` it exists in. Reads\nno user data. A report reads only stored data: it computes nothing, so a\npolygenic score the user has not computed shows as not computed.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "name": "list_reports",
      "outputSchema": {
        "properties": {
          "result": {
            "items": {
              "description": "A report the Wallet can make from a sample.",
              "properties": {
                "description": {
                  "type": "string"
                },
                "formats": {
                  "description": "Formats this report exists in: `json` (what get_report returns), `html` and `pdf` (for the user, in the Wallet).",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "name": {
                  "description": "Pass it to get_report as `report`.",
                  "type": "string"
                }
              },
              "required": [
                "name",
                "description",
                "formats"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "result"
        ],
        "type": "object",
        "x-fastmcp-wrap-result": true
      },
      "title": "List Reports"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "List algorithm runs scheduled for authorized data.\n\nReturns each run's id, algorithm name + version, status (Pending, then\nComplete or Error), sample_id (a wallet sample_id), created time,\nand a compact `provenance` summary with two decoupled siblings: `inputs` —\nwhat the run consumed (input stage + chromosome count), and `sample_provenance`\n— a compact view of how the input sample was produced (is_imputed, builds,\nreference panel, imputation tool). Either may be `null`; `provenance` itself is\n`null` only when both are. Scoped to the caller — only runs for data the\ncaller is authorized to access are returned. Call get_run(run_id) for a\nrun's input, output, full provenance (with the per-step pipeline), and\nstep-by-step task progress.\n\nReturns an empty list if no runs have been scheduled yet.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "sample_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional: only runs over this sample. Use a wallet sample_id from list_samples."
          }
        },
        "type": "object"
      },
      "name": "list_runs",
      "outputSchema": {
        "properties": {
          "result": {
            "items": {
              "description": "A scheduled run, without its input, output and tasks.",
              "properties": {
                "algorithm": {
                  "type": "string"
                },
                "created": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "provenance": {
                  "anyOf": [
                    {
                      "description": "Where a run's result came from. Null only when both parts are absent.",
                      "properties": {
                        "inputs": {
                          "anyOf": [
                            {
                              "description": "What a run consumed.",
                              "properties": {
                                "chromosomes": {
                                  "description": "Number of per-chromosome files the run read.",
                                  "type": "integer"
                                },
                                "stage": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ],
                                  "description": "Processing stage of the sample files the run read."
                                }
                              },
                              "required": [
                                "stage",
                                "chromosomes"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Null for runs that predate input tracking."
                        },
                        "sample_provenance": {
                          "anyOf": [
                            {
                              "description": "The at-a-glance part of a sample's provenance, without the pipeline steps.",
                              "properties": {
                                "imputation_tool": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "is_imputed": {
                                  "anyOf": [
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "processed_at": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "reference_panel": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "target_build": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "is_imputed",
                                "target_build",
                                "reference_panel",
                                "imputation_tool",
                                "processed_at"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "How the run's input sample was produced. Null when the sample predates provenance or could not be read."
                        }
                      },
                      "required": [
                        "inputs",
                        "sample_provenance"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "run_id": {
                  "description": "Pass this to get_run.",
                  "type": "string"
                },
                "sample_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Wallet sample_id the run was computed on."
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Pending, then Complete or Error."
                },
                "version": {
                  "type": "string"
                }
              },
              "required": [
                "run_id",
                "algorithm",
                "version",
                "status",
                "sample_id",
                "provenance",
                "created"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "result"
        ],
        "type": "object",
        "x-fastmcp-wrap-result": true
      },
      "title": "List Runs"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "List biomarker/genetic samples available through Haplotype Wallet.\n\nReturns sample_id, a friendly label, the original filename, file size,\nwhen it was processed, and `provenance` — how the sample was produced\n(imputation pipeline, tools, reference panel, source→target build), or\n`null` for samples processed before provenance was recorded. Use get_sample\nfor more detail on a specific authorized sample.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {},
        "type": "object"
      },
      "name": "list_samples",
      "outputSchema": {
        "properties": {
          "result": {
            "items": {
              "description": "A sample the caller is authorized to use.",
              "properties": {
                "file_size": {
                  "description": "Size of the uploaded file in bytes.",
                  "type": "integer"
                },
                "haplohub_created": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "When HaploHub created the sample. Absent when the upstream lookup failed."
                },
                "label": {
                  "description": "Short display name, e.g. \"Sample #1\".",
                  "type": "string"
                },
                "processed_at": {
                  "type": "string"
                },
                "provenance": {
                  "anyOf": [
                    {
                      "description": "How a sample was produced, and the uploaded file it came from.",
                      "properties": {
                        "imputation_tool": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Tool of the imputation step, e.g. \"beagle\"."
                        },
                        "impute_reason": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "is_imputed": {
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "pipeline": {
                          "items": {
                            "description": "One step of the processing pipeline that produced a sample.",
                            "properties": {
                              "finished_at": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "started_at": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "step": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Step name, e.g. \"beagle-impute\"."
                              },
                              "tools": {
                                "description": "Tools the step ran, each as \"name version\".",
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              }
                            },
                            "required": [
                              "step",
                              "tools",
                              "started_at",
                              "finished_at"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "processed_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "reference_panel": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Id of the imputation reference panel."
                        },
                        "source_build": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Genome build of the uploaded file, e.g. \"GRCh37\"."
                        },
                        "source_upload": {
                          "description": "The uploaded file a sample came from.",
                          "properties": {
                            "filename": {
                              "type": "string"
                            },
                            "uploaded_at": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "filename",
                            "uploaded_at"
                          ],
                          "type": "object"
                        },
                        "target_build": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ],
                          "description": "Genome build of the imputation reference panel."
                        },
                        "variant_count": {
                          "anyOf": [
                            {
                              "type": "integer"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "is_imputed",
                        "source_build",
                        "target_build",
                        "reference_panel",
                        "variant_count",
                        "impute_reason",
                        "processed_at",
                        "imputation_tool",
                        "pipeline",
                        "source_upload"
                      ],
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "description": "Null for samples processed before provenance was recorded, and when the upstream lookup failed."
                },
                "sample_id": {
                  "description": "Pass this to get_sample, query_variants, schedule_run and list_runs.",
                  "type": "string"
                },
                "source_filename": {
                  "type": "string"
                }
              },
              "required": [
                "sample_id",
                "label",
                "source_filename",
                "file_size",
                "processed_at",
                "provenance"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "result"
        ],
        "type": "object",
        "x-fastmcp-wrap-result": true
      },
      "title": "List Samples"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Look up ClinGen annotations (global reference data).\n\nClinGen is a National Institutes of Health (NIH)-funded resource dedicated\nto building a central resource that defines the clinical relevance of genes\nand variants for use in precision medicine and research.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "classification": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Validity classification filter (e.g. \"Definite\").\nValid for \"gene_validity\"."
          },
          "gene": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Gene symbol filter (e.g. \"BRCA1\"). Valid for both kinds."
          },
          "kind": {
            "default": "gene_validity",
            "description": "Which ClinGen table to read. \"gene_validity\" (default) — gene validity classifications, i.e. curated evidence for a gene-phenotype relationship (filter by gene, classification, and/or search). \"dosage\" — dosage-sensitivity curations (haploinsufficiency / triplosensitivity) for a gene (filter by gene).",
            "enum": [
              "gene_validity",
              "dosage"
            ],
            "type": "string"
          },
          "limit": {
            "default": 20,
            "description": "Page size (default 20, capped at 50).",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "Page offset for paging through total_count.",
            "type": "integer"
          },
          "order": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Sort direction, \"asc\" or \"desc\" (default \"desc\")."
          },
          "search": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Free-text search (gene / phenotype). Valid for \"gene_validity\"."
          },
          "sort": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Column to sort by (free string; the sortable columns differ per\nkind, e.g. \"gene_symbol\", \"classification\"). Paired with order."
          }
        },
        "type": "object"
      },
      "name": "lookup_clingen",
      "outputSchema": {
        "description": "One page of results.",
        "properties": {
          "items": {
            "items": {
              "description": "A ClinGen curation. Which fields are present depends on `kind`.\n\nA field is left out when ClinGen has no value for it.",
              "properties": {
                "classification": {
                  "description": "gene_validity only.",
                  "type": "string"
                },
                "classification_date": {
                  "description": "gene_validity only.",
                  "type": "string"
                },
                "date": {
                  "description": "dosage only.",
                  "type": "string"
                },
                "disease_label": {
                  "description": "gene_validity only.",
                  "type": "string"
                },
                "gcep": {
                  "description": "Gene curation expert panel. gene_validity only.",
                  "type": "string"
                },
                "gene_symbol": {
                  "type": "string"
                },
                "haploinsufficiency": {
                  "description": "dosage only.",
                  "type": "string"
                },
                "hgnc_id": {
                  "type": "string"
                },
                "moi": {
                  "description": "Mode of inheritance. gene_validity only.",
                  "type": "string"
                },
                "mondo_id": {
                  "description": "gene_validity only.",
                  "type": "string"
                },
                "report_url": {
                  "type": "string"
                },
                "triplosensitivity": {
                  "description": "dosage only.",
                  "type": "string"
                }
              },
              "required": [
                "gene_symbol"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total_count": {
            "description": "Matches across all pages, not only this one.",
            "type": "integer"
          }
        },
        "required": [
          "total_count",
          "offset",
          "limit",
          "items"
        ],
        "type": "object"
      },
      "title": "Look Up ClinGen"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Look up CPIC gene-drug reference tables (global reference data).\n\nCPIC (Clinical Pharmacogenetics Implementation Consortium) publishes public\ngene-drug guidance tables and genotype/phenotype mappings. This tool mirrors\nreference knowledge — it is not specific to any sample and does not make\nprescribing recommendations. To connect it to authorized data, first retrieve\nthe relevant genotype with query_variants, then look up the matching gene/drug\nrecord here for educational, research, or wellness context.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "diplotype": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Diplotype filter (e.g. \"*1/*2\"). Valid for \"diplotypes\"."
          },
          "drug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Drug name filter. Valid for \"recommendations\" and \"pairs\"."
          },
          "gene": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Gene symbol filter (e.g. \"CYP2C19\"). Valid for every kind."
          },
          "kind": {
            "default": "recommendations",
            "description": "Which CPIC table to read. \"recommendations\" (default) — public gene/drug guidance tables (filter by gene and/or drug). \"diplotypes\" — diplotype → phenotype / activity-score mappings (filter by gene and/or diplotype). \"pairs\" — curated gene–drug pairs with their CPIC evidence level (filter by gene, drug, and/or level).",
            "enum": [
              "recommendations",
              "diplotypes",
              "pairs"
            ],
            "type": "string"
          },
          "level": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "CPIC evidence level filter (e.g. \"A\"). Valid for \"pairs\"."
          },
          "limit": {
            "default": 20,
            "description": "Page size (default 20, capped at 50).",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "Page offset for paging through total_count.",
            "type": "integer"
          },
          "order": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Sort direction, \"asc\" or \"desc\" (default \"desc\")."
          },
          "sort": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Column to sort by (free string; the sortable columns differ per\nkind, e.g. \"gene\", \"drug\", \"level\"). Paired with order."
          }
        },
        "type": "object"
      },
      "name": "lookup_cpic",
      "outputSchema": {
        "description": "One page of results.",
        "properties": {
          "items": {
            "items": {
              "additionalProperties": true,
              "type": "object"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total_count": {
            "description": "Matches across all pages, not only this one.",
            "type": "integer"
          }
        },
        "required": [
          "total_count",
          "offset",
          "limit",
          "items"
        ],
        "type": "object"
      },
      "title": "Look Up CPIC"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Look up reference genome coordinates and alleles for SNP rsIDs.\n\nReturns `items`, one per requested rsID, each with the `variants` the public\nreference records for it: `chromosome`, GRCh38 `position`, `reference`\nallele, and `alternates`. rsIDs with no record are listed in `not_found`.\n\nThis is reference data only: it does not read any sample. Use it to turn\nrsIDs into coordinates, then pass those to query_variants (`positions`) to\nsee the observed genotypes. Send up to 100 rsIDs in one call rather than one\ncall per SNP.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "rs_ids": {
            "description": "SNP rsIDs to look up, such as ['rs429358', 'rs7412']. Use this for reference coordinates and alleles by rsID. This does not query the user's uploaded sample genotypes.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "rs_ids"
        ],
        "type": "object"
      },
      "name": "lookup_variant_references",
      "outputSchema": {
        "description": "Reference coordinates and alleles for the requested rsIDs.",
        "properties": {
          "items": {
            "items": {
              "description": "The reference records for one requested rsID.",
              "properties": {
                "rs_id": {
                  "type": "string"
                },
                "variants": {
                  "description": "Empty when the reference has no record.",
                  "items": {
                    "description": "Where an rsID sits on the reference genome, and its alleles.",
                    "properties": {
                      "alternates": {
                        "items": {
                          "type": "string"
                        },
                        "type": "array"
                      },
                      "chromosome": {
                        "type": "string"
                      },
                      "position": {
                        "description": "GRCh38 position.",
                        "type": "integer"
                      },
                      "reference": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "chromosome",
                      "position",
                      "reference",
                      "alternates"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                }
              },
              "required": [
                "rs_id",
                "variants"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "not_found": {
            "description": "Requested rsIDs with no reference record.",
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "items",
          "not_found"
        ],
        "type": "object"
      },
      "title": "Look Up Variant References"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Query genetic variants in authorized samples.\n\nUse this tool to retrieve genotyped loci and public annotations by gene,\nHGVS notation, genomic region, GWAS Catalog trait, or BRaVa rare-variant\nassociation. Results include per-sample genotype calls (dosage: 0=genotyped\nwithout the allele, 1=one copy, 2=two copies), plus public ClinVar\nannotations, GWAS Catalog trait associations and BRaVa rare-variant\nassociations at each locus when available (hgvs/region queries return all\nthree; clinvar, gwas and brava queries return their own). BRaVa covers rare\ncoding variants (allele frequency <= 0.001) and keeps only results with\np <= 0.01, so a locus without BRaVa results has no nominal BRaVa signal; it\nmay still have been studied. A brava query leaves out the variants every\nsample is called at without the allele (counted in not_carried), and\nHaploHub reports no variant where no sample has a call. Each BRaVa result\nnames BRaVa as its source\nwith the citation URL: cite it when you report one. This is for\neducational, research, and wellness information workflows, not clinical\ndeterminations.\n\nAlleles: a locus line lists every alternate allele of the genotype record.\nWhen an entry has `allele`, its dosage counts that one allele, and two\nentries can share a locus with different alleles. Region and gwas entries\nhave no `allele`, and their dosage counts any alternate allele.\n\nBatch lookups: put up to 20 loci in one call (positions, or a list of hgvs\nstrings) rather than looping one locus per call. Each call is a full\nupstream query, so the batch is both faster and far cheaper.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "chromosome": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Chromosome accession (e.g. \"chr13\", \"NC_000013.11\"). Required when query_type is \"region\" and positions is not given."
          },
          "clinical_significance": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "ClinVar significance-label filter. Defaults to [\"Pathogenic\", \"Likely_pathogenic\"]. Other useful values: \"Uncertain_significance\", \"Benign\", \"Likely_benign\", \"drug_response\". These labels come from public ClinVar records and are used for reference-database search, not determinations about any person or sample. Case-insensitive substring match."
          },
          "end": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "1-based end position. Required when query_type is \"region\" and positions is not given."
          },
          "gene_symbols": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Gene symbols to query (e.g. [\"APOE\", \"TCF7L2\"]). Required when query_type is \"clinvar\". Use known gene symbols from the user's request or from a prior public reference search; for broad trait questions, identify relevant genes or trait ids with the reference tools first."
          },
          "hgvs": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "HGVS notation (e.g. \"NC_000013.11:g.32356461T>G\"), one string or a list of up to 20 to look up in one call. Required when query_type is \"hgvs\". Supports both c. and g. notation."
          },
          "intent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "One or two sentences on what the user is trying to learn and why this query serves it, under 400 characters. Describe the goal in general terms (e.g. \"Checking known pathogenic variants in hereditary cancer genes the user asked about\"). Do not include names, ages, relatives, symptoms, diagnoses, medications, locations, or genotypes. Stored with the query to review whether queries match what users ask for."
          },
          "limit": {
            "default": 1000,
            "description": "Only used when query_type is \"brava\": how many of the most significant matching BRaVa variants to check (default and max 1000).",
            "type": "integer"
          },
          "p_value_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Maximum association p-value (e.g. 5e-8 for genome-wide significance). Only used when query_type is \"gwas\" or \"brava\"."
          },
          "positions": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Batch of loci for query_type \"region\", up to 20 per call, each \"<chromosome>:<position>\" or \"<chromosome>:<start>-<end>\" (e.g. [\"chr4:67031670\", \"chr5:103743441-103743500\"]). Use this instead of one call per SNP: every call is a full upstream query, so 20 loci in one call cost far less than 20 calls. Takes precedence over chromosome/start/end."
          },
          "query_type": {
            "description": "The type of variant query. \"clinvar\" — search public ClinVar annotations by gene names and ClinVar significance labels. \"hgvs\" — look up a specific variant by HGVS notation (e.g. \"NC_000013.11:g.32356461T>G\"). \"region\" — scan a genomic region by chromosome and position range, or look up a batch of loci via positions. \"gwas\" — find GWAS Catalog trait/allele associations at the authorized genotyped loci, by gene (gene_symbols), rs id (rs_ids), or trait (trait_id). Use for published trait-association lookup and biomarker context, not diagnosis. \"brava\" — check the authorized samples at BRaVa rare coding variants (allele frequency <= 0.001, results with p <= 0.01). It takes the `limit` most significant BRaVa variants (default and max 1000) matching gene_symbols (first non-blank symbol), trait_id and p_value_max, and genotypes the samples there. A variant where every sample is called without the allele (dosage 0) is left out and counted in not_carried. A variant where no sample has a call is not reported at all: sparse genotype data (arrays, many imputed files) rarely covers variants this rare. So an empty result means none of the checked variants is called with the allele in the samples, not that the samples carry no BRaVa variant. Give both a gene and a trait for a focused question; list_brava_traits gives the trait codes. The filters only choose the variants: each returned variant comes with all its BRaVa associations, for every trait.",
            "enum": [
              "clinvar",
              "hgvs",
              "region",
              "gwas",
              "brava"
            ],
            "type": "string"
          },
          "rs_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "SNP rs ids to look up (e.g. [\"rs7903146\"]). Only used when query_type is \"gwas\"."
          },
          "sample_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional: query only this sample instead of all user samples. Use a sample_id from list_samples."
          },
          "start": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "1-based start position. Required when query_type is \"region\" and positions is not given."
          },
          "trait_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "GWAS Catalog / EFO trait id (e.g. an EFO id) to filter associations when query_type is \"gwas\". When query_type is \"brava\", a BRaVa trait code from list_brava_traits (e.g. \"LDLC\")."
          }
        },
        "required": [
          "query_type"
        ],
        "type": "object"
      },
      "name": "query_variants",
      "outputSchema": {
        "description": "Observed variants at the queried loci, with public annotations.",
        "properties": {
          "not_carried": {
            "description": "brava queries only: checked BRaVa variants where every sample is called without the allele (dosage 0). They are left out of `variants`. Variants where no sample has a call are not counted or reported.",
            "type": "integer"
          },
          "samples": {
            "additionalProperties": {
              "type": "string"
            },
            "description": "Label of each queried sample, keyed as in `calls`.",
            "type": "object"
          },
          "unresolved": {
            "description": "Present only when some items did not resolve.",
            "items": {
              "description": "A queried item that matched no variant, or that failed.",
              "properties": {
                "error": {
                  "type": "string"
                },
                "query": {
                  "description": "The item as it was sent.",
                  "type": "string"
                },
                "resolved": {
                  "description": "What the item resolved to, when it did.",
                  "type": "string"
                }
              },
              "required": [
                "query"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "variants": {
            "items": {
              "description": "One variant locus, with the genotype calls observed at it.",
              "properties": {
                "allele": {
                  "description": "The one alternate allele `calls` counts, as ref>alt, e.g. \"T>C\". Present when the result is pinned to one allele: brava and clinvar queries, and any result whose target named its allele. Two entries can share a locus with different alleles.",
                  "type": "string"
                },
                "brava": {
                  "description": "Present only when BRaVa has results for an allele at this locus.",
                  "items": {
                    "description": "A BRaVa rare-variant association for one allele at the locus.",
                    "properties": {
                      "allele": {
                        "description": "The allele BRaVa tested, as ref>alt, e.g. \"G>A\". When the entry has `allele`, the annotation matching it is the one the dosage counts. Otherwise the dosage counts any alternate allele of the record.",
                        "type": "string"
                      },
                      "beta": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Effect size."
                      },
                      "citation": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "URL of the BRaVa publication to cite."
                      },
                      "n": {
                        "anyOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Sample size."
                      },
                      "n_cases": {
                        "anyOf": [
                          {
                            "type": "integer"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Cases. Null for quantitative traits."
                      },
                      "p": {
                        "description": "Association p-value.",
                        "type": "number"
                      },
                      "release": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "The BRaVa release."
                      },
                      "se": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "source": {
                        "description": "Always \"BRaVa\".",
                        "type": "string"
                      },
                      "trait": {
                        "description": "The BRaVa trait an association belongs to.",
                        "properties": {
                          "code": {
                            "description": "Trait code, e.g. \"LDLC\". Pass it as a trait filter.",
                            "type": "string"
                          },
                          "kind": {
                            "description": "\"binary\" (case/control) or \"quantitative\" (a measurement, e.g. LDL cholesterol).",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "name",
                          "kind"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "trait",
                      "allele",
                      "beta",
                      "se",
                      "p",
                      "n",
                      "n_cases",
                      "source",
                      "release",
                      "citation"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "calls": {
                  "additionalProperties": {
                    "type": "integer"
                  },
                  "description": "Dosage per sample, keyed like `samples`: 0 means the sample was genotyped here and does not carry the allele, 1 one copy, 2 two. A sample with no call at the locus is left out. With `allele` or `query`, the dosage counts that allele only. Without them (region and gwas queries) it counts any alternate allele of the record.",
                  "type": "object"
                },
                "clinvar": {
                  "description": "Present only when ClinVar has records here.",
                  "items": {
                    "description": "A public ClinVar record at the locus.",
                    "properties": {
                      "conditions": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "gene": {
                        "type": "string"
                      },
                      "review": {
                        "description": "ClinVar review status.",
                        "type": "string"
                      },
                      "significance": {
                        "description": "ClinVar significance label, e.g. \"Pathogenic\".",
                        "type": "string"
                      }
                    },
                    "required": [
                      "gene",
                      "significance",
                      "conditions",
                      "review"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "error": {
                  "type": "string"
                },
                "gwas": {
                  "description": "Present only when the GWAS Catalog has records here.",
                  "items": {
                    "description": "A GWAS Catalog trait association at the locus.",
                    "properties": {
                      "gene": {
                        "type": "string"
                      },
                      "or_beta": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Odds ratio or beta coefficient."
                      },
                      "p": {
                        "anyOf": [
                          {
                            "type": "number"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "Association p-value."
                      },
                      "pmid": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "PubMed id of the study."
                      },
                      "raf": {
                        "description": "Risk allele frequency, as the catalog reports it.",
                        "type": "string"
                      },
                      "reported_allele": {
                        "description": "The strongest reported risk allele, e.g. \"rs7903146-T\".",
                        "type": "string"
                      },
                      "rs": {
                        "type": "string"
                      },
                      "study": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ],
                        "description": "GWAS Catalog study accession."
                      },
                      "trait": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "rs",
                      "gene",
                      "trait",
                      "reported_allele",
                      "raf",
                      "or_beta",
                      "p",
                      "pmid",
                      "study"
                    ],
                    "type": "object"
                  },
                  "type": "array"
                },
                "locus": {
                  "description": "accession:position, followed by :ref>alt when both alleles are known, e.g. \"NC_000019.10:44908684:T>C\". A record with several alternate alleles lists them all, e.g. \"...:T>C,G\".",
                  "type": "string"
                },
                "query": {
                  "description": "hgvs queries only: the HGVS string this entry answers. `calls` counts the allele it names.",
                  "type": "string"
                },
                "rs": {
                  "type": "string"
                }
              },
              "required": [
                "locus",
                "calls"
              ],
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "samples",
          "variants"
        ],
        "type": "object"
      },
      "title": "Query Variants"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": true,
        "readOnlyHint": false
      },
      "description": "Report a Haplotype Wallet bug or data problem to the maintainers.\n\nCall this only when the user asked to report a problem, or agreed when you\noffered — a report is a message to a human, not a retry. File one call per\nproblem and do not re-file after a failed retry.\n\nPass `error_reference` whenever a tool error gave you one: it joins the\nreport to the server-side trace of that exact failure, which is worth more\nthan any description of it. The caller's identity, the build version, that\ntrace, and your recent tool calls are attached server-side, so\ndescribe the problem rather than the plumbing.\n\nDo not put genetic data in any field — no genotype calls, allele pairs, or\nraw sequence. rsIDs, gene symbols, and genomic coordinates are fine and\nuseful. The server redacts what it recognizes, but it cannot catch\neverything.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "actual": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "What happened instead."
          },
          "category": {
            "description": "What kind of problem this is. \"wrong_result\" — a tool answered, but the answer looks wrong. \"missing_data\" — something the user expects to exist is absent. \"tool_error\" — a tool failed or returned an error. \"slow\" — a tool took unreasonably long or timed out. \"unclear_docs\" — a tool description or field was misleading. \"other\" — anything else.",
            "enum": [
              "wrong_result",
              "missing_data",
              "tool_error",
              "slow",
              "unclear_docs",
              "other"
            ],
            "type": "string"
          },
          "error_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The reference from a failed tool call, e.g. the '(ref: a1b2c3d4)' in an error message. Pass it whenever you have one."
          },
          "expected": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "What the user expected to happen."
          },
          "summary": {
            "description": "One line naming the problem, as an issue title would. Keep it under 200 characters; longer text is truncated.",
            "type": "string"
          },
          "user_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The user's own words about the problem, quoted verbatim. Do not paraphrase or clean this up — it is the one field the maintainers read as the user's, not yours."
          }
        },
        "required": [
          "category",
          "summary"
        ],
        "type": "object"
      },
      "name": "report_issue",
      "outputSchema": {
        "description": "What happened to a report.",
        "properties": {
          "message": {
            "type": "string"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "report_reference": {
            "description": "Give this to the user. It identifies the report.",
            "type": "string"
          },
          "status": {
            "description": "duplicate: this problem was already reported.",
            "enum": [
              "submitted",
              "duplicate"
            ],
            "type": "string"
          },
          "trace_attached": {
            "description": "Whether error_reference matched a recorded failure. Absent on a duplicate.",
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "report_reference",
          "message"
        ],
        "type": "object"
      },
      "title": "Report Issue"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "readOnlyHint": false
      },
      "description": "Schedule a run of an algorithm over an authorized sample.\n\nRuns the algorithm's latest version. Runs are asynchronous: this returns\nimmediately with status \"Pending\". Poll get_run(run_id) to watch progress\nand read results.\n\nBefore calling this, call get_algorithm(algorithm_name) to read the\ninput_schema and construct a valid `input`. Pass the sample through\nthe `sample_id` parameter (never inside `input`).\n\nReturns {run_id, status}.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "algorithm_name": {
            "description": "The algorithm to run, by name, from list_algorithms.",
            "type": "string"
          },
          "input": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Algorithm parameters matching the algorithm's input_schema (call get_algorithm first to read it). Parameters only — do NOT put sample references here; use the sample_id parameter."
          },
          "sample_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Wallet sample_id (from list_samples) to run the algorithm over. Ownership-checked and translated to the internal sample reference. Omit for parameter-only algorithms."
          }
        },
        "required": [
          "algorithm_name"
        ],
        "type": "object"
      },
      "name": "schedule_run",
      "outputSchema": {
        "description": "A run that was just scheduled.",
        "properties": {
          "run_id": {
            "description": "Pass this to get_run to poll.",
            "type": "string"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "run_id",
          "status"
        ],
        "type": "object"
      },
      "title": "Schedule Run"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true
      },
      "description": "Search the PGS Catalog for polygenic score models relevant to a question.\n\nThis is the discovery step before running a polygenic score. The catalog is\nglobal reference data (the published PGS Catalog) — it is not specific to the\ncaller's authorized samples. Use it to find which PGS models to compute,\nthen run them:\n\n  1. (optional) list_pgs_categories() to browse categories and traits.\n  2. search_pgs_scores(query=\"LDL cholesterol\", trait_id?, category_id?) here.\n  3. get_algorithm(\"pgsc_calc\") to see the run input contract.\n  4. schedule_run(\"pgsc_calc\",\n                   input={\"pgs_model_ids\": \"PGS000123,PGS000456\"},\n                   sample_id=\"<authorized sample id from list_samples>\").\n  5. get_run(run_id) to poll until the scores are ready.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Narrow to one category (id from list_pgs_categories)."
          },
          "limit": {
            "default": 20,
            "description": "Page size (default 20, capped at 50).",
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "Page offset for paging through total_count.",
            "type": "integer"
          },
          "query": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Free-text search over score name / trait / publication."
          },
          "trait_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Narrow to one trait (id from list_pgs_categories or a result)."
          }
        },
        "type": "object"
      },
      "name": "search_pgs_scores",
      "outputSchema": {
        "description": "One page of results.",
        "properties": {
          "items": {
            "items": {
              "description": "A PGS Catalog model that pgsc_calc can compute.",
              "properties": {
                "category_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category_label": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "id": {
                  "description": "PGS Catalog id, e.g. PGS000123. Pass it in pgs_model_ids to schedule_run(\"pgsc_calc\").",
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "number_of_variants": {
                  "anyOf": [
                    {
                      "type": "integer"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "original_genome_build": {
                  "type": "string"
                },
                "publication": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "released_on": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reported_trait": {
                  "type": "string"
                },
                "trait_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trait_label": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "reported_trait",
                "trait_id",
                "trait_label",
                "category_id",
                "category_label",
                "number_of_variants",
                "original_genome_build",
                "released_on",
                "publication"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "limit": {
            "type": "integer"
          },
          "offset": {
            "type": "integer"
          },
          "total_count": {
            "description": "Matches across all pages, not only this one.",
            "type": "integer"
          }
        },
        "required": [
          "total_count",
          "offset",
          "limit",
          "items"
        ],
        "type": "object"
      },
      "title": "Search PGS Scores"
    },
    {
      "annotations": {
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false,
        "readOnlyHint": false
      },
      "description": "Queue a question for the All of Us biobank, answered later by a person.\n\nUse it for questions only a large research cohort can answer, such as how\ncommon a variant is among participants with a condition. All of Us cannot\nbe queried live: a person runs each question by hand and attaches the\naggregate results, which takes days. Returns a request_id; check on it\nwith get_biobank_request, or find it later with list_biobank_requests.\n\nIf the question involves the user's own variant, look it up first with\nquery_variants and name the variant, not the user's genotype. One question\nper request. Submitting the same question while it is still open returns\nthe existing request. A user can have at most 3 open requests.",
      "inputSchema": {
        "additionalProperties": false,
        "properties": {
          "conditions": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional: condition names it is about. Up to 20."
          },
          "genes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional: gene symbols it is about. Up to 20."
          },
          "question": {
            "description": "One question about the All of Us cohort, in plain words, for example 'Among participants carrying rs429358 C, how many have a diagnosis of Alzheimer disease?'. Ask about the cohort, never about the user. No names, contact details or genotypes. Up to 1,000 characters; longer text is cut.",
            "type": "string"
          },
          "variants": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Optional: the variants it is about, as rsIDs or HGVS. Up to 20."
          }
        },
        "required": [
          "question"
        ],
        "type": "object"
      },
      "name": "submit_biobank_request",
      "outputSchema": {
        "description": "A question that was queued, or the open request it duplicates.",
        "properties": {
          "message": {
            "description": "What happens next. Tell the user in your own words.",
            "type": "string"
          },
          "request_id": {
            "description": "Pass this to get_biobank_request to check on it.",
            "type": "string"
          },
          "status": {
            "description": "queued, then in_progress while a person runs the query, then answered or declined.",
            "enum": [
              "queued",
              "in_progress",
              "answered",
              "declined"
            ],
            "type": "string"
          }
        },
        "required": [
          "request_id",
          "status",
          "message"
        ],
        "type": "object"
      },
      "title": "Submit Biobank Request"
    }
  ]
}
