Skip to main content
Glama

pharmacogenomics-guidelines-mcp-server

Get recommendations

pgx_get_recommendations
Read-onlyIdempotent

Browse CPIC recommendations in drug mode with one exact drugName or drugId. Match across drugs in results mode with geneResults or geneSymbol plus phenotype/activityScore, or genotype mode with up to 25 uniquely resolved gene/diplotype entries. Both matching modes accept an optional drug. Optional view=test_alerts selects complete example CDS alerts instead of recommendations; default view=recommendations. Alert records retain ordered alerttext, No CDS and n/a. Use pgx_list_reference topic phenotypes for source values. Every matched prerequisite must be explicit; omitted results are never normal, negative or No Result. Preserve populations, scores, classifications and source text. Read incompleteDrugs for missing prerequisites across all withheld rows. Follow page.nextOffset and incompletePage.nextOffset independently for complete records and per-row diagnostics; consult source guidelines before clinical use.

Tool call template

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

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

Input Schema

NameRequiredDescriptionDefault
modeYesdrug requires one drugName or drugId; genotype requires genotype; results requires geneResults or geneSymbol with phenotype/activityScore. Genotype/results optionally accept one drug selector.
viewNoSelect source recommendations (default) or example CDS test alerts with the same selectors and independent paging.
limitNoPositive safe-integer recommendation limit; values above 50 are clamped to 50 with a notice (default 10).
drugIdNoExact drugId returned by pgx_search_pairs; blank means unset.
offsetNoZero-based offset; use nextOffset to continue (default 0).
drugNameNoExact case-insensitive drug name; obtain names with pgx_search_pairs. Blank means unset.
genotypeNoRequired in genotype mode: up to 25 explicit gene/diplotype entries. Every entry must resolve uniquely before lookup.
phenotypeNoSource phenotype for geneSymbol; inspect pgx_list_reference topic phenotypes. Excludes activityScore and geneResults.
geneSymbolNoGene for a scalar result or exploratory gene filter. Required for a scalar result when the drug has multiple genes.
populationNoExact source population after outer whitespace trimming; all matching rows are retained.
geneResultsNoExplicit results for 1–25 genes (10 when large panels are disabled); excludes scalar geneSymbol, phenotype, activityScore and genotype.
activityScoreNoSource activity score for geneSymbol; excludes phenotype and geneResults.
incompleteLimitNoPositive safe-integer incomplete diagnostic limit; values above 100 are clamped to 100 with a notice (default 25).
incompleteOffsetNoIndependent zero-based incomplete diagnostic offset; follow incompletePage.nextOffset.

Output Schema

NameRequiredDescriptionDefault
capNoEffective public page limit.
pageNoSource pagination metadata.
errorNoPresent when the call failed. Absent on success.
itemsNoComplete source records; matched rows have every required gene result explicitly supplied.
shownNoNumber of returned rows, equal to page.returned.
alertsNoComplete source alerts in test_alerts view only; recommendation items remain empty.
statusNoExploratory browsing, complete genetic match, no match, missing prerequisites, or unresolved genotype.
noticesNoNotices about this result; empty when none apply.
truncatedNoWhether more matching rows remain after this page.
provenanceNoLive source attribution and retrieval details.
clinicalCaveatNoSource limitations and required clinical qualification.
effectiveQueryNoNormalized selectors and effective page defaults.
incompletePageNoIndependent page of incomplete prerequisite diagnostics; totals computed before either page.
geneResolutionsNoPer-gene genotype diagnostics, including ambiguity and source records.
incompleteDrugsNoUnpaged union of missing prerequisites by drug across the selected view.
incompleteAlertsNoIndependently paged incomplete alerts in test_alerts view only.
incompleteMatchesNoReference possibilities requiring additional results; never matched prescribing advice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changed
    • changedInput schema / properties / geneResults / description
      Previous value: -"Explicit results for 1–10 genes; excludes scalar geneSymbol, phenotype, activityScore and genotype."New value: +"Explicit results for 1–25 genes (10 when large panels are disabled); excludes scalar geneSymbol, phenotype, activityScore and genotype."
    • changedInput schema / properties / genotype / description
      Previous value: -"Required in genotype mode: 1–10 explicit gene/diplotype entries. Every entry must resolve uniquely before lookup."New value: +"Required in genotype mode: up to 25 explicit gene/diplotype entries. Every entry must resolve uniquely before lookup."
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "status",
      -      "items",
      -      "incompleteMatches",
      -      "geneResolutions",
      -      "page",
      -      "incompletePage",
      -      "clinicalCaveat",
      -      "provenance",
      -      "effectiveQuery",
      -      "notices",
      -      "truncated",
      -      "shown",
      -      "cap"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "status",
      +      "items",
      +      "incompleteMatches",
      +      "incompleteDrugs",
      +      "geneResolutions",
      +      "page",
      +      "incompletePage",
      +      "clinicalCaveat",
      +      "provenance",
      +      "effectiveQuery",
      +      "notices",
      +      "truncated",
      +      "shown",
      +      "cap"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • changedOutput schema / properties / effectiveQuery / properties / geneResults / description
      Previous value: -"Explicit results for 1–10 genes; excludes scalar geneSymbol, phenotype, activityScore and genotype."New value: +"Explicit results for 1–25 genes (10 when large panels are disabled); excludes scalar geneSymbol, phenotype, activityScore and genotype."
    • changedOutput schema / properties / effectiveQuery / properties / genotype / description
      Previous value: -"Required in genotype mode: 1–10 explicit gene/diplotype entries. Every entry must resolve uniquely before lookup."New value: +"Required in genotype mode: up to 25 explicit gene/diplotype entries. Every entry must resolve uniquely before lookup."
    • addedOutput schema / properties / incompleteAlerts / items / properties / drugName
      Added value: +{
      +  "description": "Exact source drug name when available.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / incompleteAlerts / items / properties / missingAlleles
      Added value: +{
      +  "description": "Required HLA allele statuses left unknown by results for other alleles.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One unresolved allele-specific requirement.",
      +    "properties": {
      +      "allele": {
      +        "description": "Named HLA allele whose status is required.",
      +        "type": "string"
      +      },
      +      "geneSymbol": {
      +        "description": "Source HLA gene symbol.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "geneSymbol",
      +      "allele"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / incompleteAlerts / items / properties / missingGenes / description
      Previous value: -"Missing source prerequisites; alert text is withheld."New value: +"Required genes that were omitted; no default result is assumed."
    • addedOutput schema / properties / incompleteDrugs
      Added value: +{
      +  "description": "Unpaged union of missing prerequisites by drug across the selected view.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Summary of withheld rows for one drug.",
      +    "properties": {
      +      "drugId": {
      +        "description": "Exact source drug identifier.",
      +        "type": "string"
      +      },
      +      "drugName": {
      +        "description": "Exact source drug name when available.",
      +        "type": "string"
      +      },
      +      "missingAlleles": {
      +        "description": "Required HLA allele statuses left unknown by results for other alleles.",
      +        "items": {
      +          "additionalProperties": false,
      +          "description": "One unresolved allele-specific requirement.",
      +          "properties": {
      +            "allele": {
      +              "description": "Named HLA allele whose status is required.",
      +              "type": "string"
      +            },
      +            "geneSymbol": {
      +              "description": "Source HLA gene symbol.",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "geneSymbol",
      +            "allele"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "missingGenes": {
      +        "description": "Required genes that were omitted; no default result is assumed.",
      +        "items": {
      +          "description": "An explicitly required gene.",
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "rowCount": {
      +        "description": "Number of withheld rows for this drug.",
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "drugId",
      +      "missingGenes",
      +      "rowCount"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / incompleteMatches / items / properties / drugName
      Added value: +{
      +  "description": "Exact source drug name when available.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / incompleteMatches / items / properties / missingAlleles
      Added value: +{
      +  "description": "Required HLA allele statuses left unknown by results for other alleles.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "One unresolved allele-specific requirement.",
      +    "properties": {
      +      "allele": {
      +        "description": "Named HLA allele whose status is required.",
      +        "type": "string"
      +      },
      +      "geneSymbol": {
      +        "description": "Source HLA gene symbol.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "geneSymbol",
      +      "allele"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / incompleteMatches / items / properties / missingGenes / description
      Previous value: -"Missing gene results; no default result is assumed."New value: +"Required genes that were omitted; no default result is assumed."
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Adds substantial behavior beyond the readOnly/openWorld/idempotent annotations: limit clamping with notices, independent paging cursors for records versus incomplete diagnostics, the rule that omitted results are never normal/negative/No Result, alert records retaining literal 'No CDS' and 'n/a' text, and a clinical-use caveat. This is exactly the context annotations cannot carry.

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

Conciseness3/5

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

The content is valuable but the prose is dense and run-on, mixing selector rules, paging, alert text, and a clinical disclaimer into a block of long sentences without headers or bullets. Mode semantics are front-loaded, which helps, but several clauses restate schema constraints.

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

Completeness4/5

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

For a 14-parameter, nested, multi-mode tool with an output schema, the description covers mode selection, paging, withheld-row diagnostics, and the alert vs recommendation distinction. Only the exact interaction between drug selectors and the genotype cap is slightly under-specified.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description still adds cross-parameter meaning the schema only hints at, such as mode-determined selector exclusivity, the 25-entry genotype cap, and independent nextOffset handling for the two result streams. It does not add value beyond the schema for individual field formats, hence not a 5.

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

Purpose4/5

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

States a specific verb and resource (browse CPIC recommendations) and immediately enumerates the three selector shapes (drug, results, genotype) plus the view switch. This distinguishes it from lookup siblings, though the first sentence is packed and requires parsing to extract the mode structure.

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

Usage Guidelines4/5

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

Gives explicit per-mode prerequisites ('drug mode with one exact drugName or drugId', 'results mode with geneResults or geneSymbol plus phenotype/activityScore') and routes to pgx_list_reference for legal phenotype source values. It does not explicitly say when to prefer this over pgx_get_guideline, but the selector requirements are clear enough to choose correctly.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.