Pharmgkb Tools¶
Configuration File: pharmgkb_tools.json
Tool Type: Local
Tools Count: 10
This page contains all tools defined in the pharmgkb_tools.json configuration file.
Available Tools¶
PharmGKB_get_clinical_annotations (Type: PharmGKBTool)¶
Get clinical annotations showing gene-drug-phenotype relationships. Returns variant-level clinica…
PharmGKB_get_clinical_annotations tool specification
Tool Information:
Name:
PharmGKB_get_clinical_annotationsType:
PharmGKBToolDescription: Get clinical annotations showing gene-drug-phenotype relationships. Returns variant-level clinical significance data. Always provide annotation_id — gene_id lookup is not supported by the API and returns an error with guidance.
Parameters:
annotation_id(string) (optional) PharmGKB clinical annotation ID (e.g., ‘1447954390’). Required for reliable results.gene_id(string) (optional) PharmGKB Gene Accession ID (e.g., “PA128”). NOTE: Gene-based lookup is not supported — will return an error with instructions to use annotation_id instead.gene(string) (optional) NOT SUPPORTED: PharmGKB API requires a specific annotation_id (e.g. “1447954390”), not a gene symbol. Browse https://www.pharmgkb.org/clinicalAnnotation to find annotation IDs. For gene-drug dosing use CPIC_list_guidelines instead.gene_symbol(string) (optional) Alias for gene — NOT SUPPORTED. See gene parameter.
Example Usage:
query = {
"name": "PharmGKB_get_clinical_annotations",
"arguments": {
}
}
result = tu.run(query)
PharmGKB_get_dosing_guidelines (Type: PharmGKBTool)¶
Get pharmacogenetic dosing guidelines (CPIC/DPWG) from PharmGKB by guideline_id. IMPORTANT: use t…
PharmGKB_get_dosing_guidelines tool specification
Tool Information:
Name:
PharmGKB_get_dosing_guidelinesType:
PharmGKBToolDescription: Get pharmacogenetic dosing guidelines (CPIC/DPWG) from PharmGKB by guideline_id. IMPORTANT: use the ‘clinpgxid’ field from CPIC_list_guidelines (e.g., ‘PA166251454’), NOT the ‘pharmgkbid’ field — old-format pharmgkbid values (e.g., ‘PA166104996’) return HTTP 404. The test example PA166251465 is for the warfarin guideline.
Parameters:
guideline_id(string) (required) PharmGKB ClinPGx guideline ID from CPIC_list_guidelines ‘clinpgxid’ field (e.g., ‘PA166251465’ for warfarin, ‘PA166251454’ for opioids/codeine, ‘PA166251458’ for tamoxifen). Use clinpgxid, NOT pharmgkbid.gene(string) (optional) Gene symbol (e.g., ‘CYP2D6’). NOTE: Filtering by gene symbol is unreliable and may return a generic prompt instead of actual guidelines. Use guideline_id instead.
Example Usage:
query = {
"name": "PharmGKB_get_dosing_guidelines",
"arguments": {
"guideline_id": "example_value"
}
}
result = tu.run(query)
PharmGKB_get_drug_details (Type: PharmGKBTool)¶
Get detailed information for a drug using its PharmGKB Chemical ID. Returns structural info, cros…
PharmGKB_get_drug_details tool specification
Tool Information:
Name:
PharmGKB_get_drug_detailsType:
PharmGKBToolDescription: Get detailed information for a drug using its PharmGKB Chemical ID. Returns structural info, cross-references, and related genes.
Parameters:
drug_id(string) (required) PharmGKB Chemical ID (e.g., ‘PA452637’).
Example Usage:
query = {
"name": "PharmGKB_get_drug_details",
"arguments": {
"drug_id": "example_value"
}
}
result = tu.run(query)
PharmGKB_get_drug_label_annotations (Type: PharmGKBTool)¶
Get regulatory drug-label pharmacogenomic annotations from PharmGKB/ClinPGx. By default lists FDA…
PharmGKB_get_drug_label_annotations tool specification
Tool Information:
Name:
PharmGKB_get_drug_label_annotationsType:
PharmGKBToolDescription: Get regulatory drug-label pharmacogenomic annotations from PharmGKB/ClinPGx. By default lists FDA label annotations (id + name), capped by ‘limit’. Pass source to switch agency (FDA, EMA, HCSC, PMDA). Pass label_id (e.g., ‘PA166114907’ for bosutinib) for one full annotation including biomarkerStatus, alternateDrugAvailable, dosingInformation, cancerGenome, and source literature. Keyless.
Parameters:
label_id(string) (optional) PharmGKB Label Annotation ID (e.g., ‘PA166114907’ for the FDA bosutinib label). When provided, returns the full single annotation and ignores ‘source’/’limit’.source(string) (optional) Regulatory agency for the listing mode. One of FDA, EMA, HCSC, PMDA. Defaults to FDA. Ignored when label_id is given.limit(integer) (optional) Maximum number of label annotations to return in listing mode (default 50, max 500).id(string) (optional) Alias for label_id.
Example Usage:
query = {
"name": "PharmGKB_get_drug_label_annotations",
"arguments": {
}
}
result = tu.run(query)
PharmGKB_get_gene_details (Type: PharmGKBTool)¶
Get detailed information for a gene using its PharmGKB Accession ID. Returns chromosomal location…
PharmGKB_get_gene_details tool specification
Tool Information:
Name:
PharmGKB_get_gene_detailsType:
PharmGKBToolDescription: Get detailed information for a gene using its PharmGKB Accession ID. Returns chromosomal location, cross-references, and other metadata.
Parameters:
gene_id(string) (required) PharmGKB Gene Accession ID (e.g., ‘PA128’).
Example Usage:
query = {
"name": "PharmGKB_get_gene_details",
"arguments": {
"gene_id": "example_value"
}
}
result = tu.run(query)
PharmGKB_get_pathway (Type: PharmGKBTool)¶
Get a curated pharmacogenomic pathway from PharmGKB/ClinPGx by pathway ID (e.g., ‘PA145011113’ = …
PharmGKB_get_pathway tool specification
Tool Information:
Name:
PharmGKB_get_pathwayType:
PharmGKBToolDescription: Get a curated pharmacogenomic pathway from PharmGKB/ClinPGx by pathway ID (e.g., ‘PA145011113’ = ‘Warfarin Pathway, Pharmacokinetics’). Returns name, authors, biopaxLink, and a full HTML description of the pharmacokinetic/pharmacodynamic pathway. Keyless. Lookup by ID is required (name-based listing is unreliable upstream).
Parameters:
pathway_id(string) (required) PharmGKB Pathway Accession ID (e.g., ‘PA145011113’ for the Warfarin Pharmacokinetics pathway). Browse https://www.pharmgkb.org/pathways to find IDs.id(string) (optional) Alias for pathway_id.
Example Usage:
query = {
"name": "PharmGKB_get_pathway",
"arguments": {
"pathway_id": "example_value"
}
}
result = tu.run(query)
PharmGKB_get_variant_annotations (Type: PharmGKBTool)¶
Get variant-level literature annotations from PharmGKB/ClinPGx, filtered by gene or chemical Phar…
PharmGKB_get_variant_annotations tool specification
Tool Information:
Name:
PharmGKB_get_variant_annotationsType:
PharmGKBToolDescription: Get variant-level literature annotations from PharmGKB/ClinPGx, filtered by gene or chemical PharmGKB Accession ID. Provide gene_id (e.g., ‘PA126’ for CYP2C9) OR chemical_id (e.g., ‘PA451906’ for warfarin). Each annotation gives allele/genotype, phenotype category, drug context, significance, and source literature. Results are capped by ‘limit’. Keyless. Resolve gene/drug names to PA IDs first via PharmGKB_search_genes / PharmGKB_search_drugs.
Parameters:
gene_id(string) (optional) PharmGKB Gene Accession ID (e.g., ‘PA126’ for CYP2C9). Queried via location.genes.accessionId. Provide either gene_id or chemical_id.chemical_id(string) (optional) PharmGKB Chemical/drug Accession ID (e.g., ‘PA451906’ for warfarin). Queried via relatedChemicals.accessionId. Provide either gene_id or chemical_id.drug_id(string) (optional) Alias for chemical_id.limit(integer) (optional) Maximum number of variant annotations to return (default 50, max 500). CYP2C9 alone has over 1000 annotations.
Example Usage:
query = {
"name": "PharmGKB_get_variant_annotations",
"arguments": {
}
}
result = tu.run(query)
PharmGKB_search_drugs (Type: PharmGKBTool)¶
Search for drugs in PharmGKB by name or PharmGKB ID. Returns drug name, ID, and basic metadata.
PharmGKB_search_drugs tool specification
Tool Information:
Name:
PharmGKB_search_drugsType:
PharmGKBToolDescription: Search for drugs in PharmGKB by name or PharmGKB ID. Returns drug name, ID, and basic metadata.
Parameters:
query(string) (optional) Drug name or PharmGKB Chemical ID (e.g., ‘warfarin’, ‘PA452637’). Aliases: drug_name, name, drug.drug_name(string) (optional) Alias for query. Drug name to search (e.g., ‘warfarin’, ‘metformin’).name(string) (optional) Alias for query. Drug name to search.drug(string) (optional) Alias for query. Drug name to search.
Example Usage:
query = {
"name": "PharmGKB_search_drugs",
"arguments": {
}
}
result = tu.run(query)
PharmGKB_search_genes (Type: PharmGKBTool)¶
Search for genes in PharmGKB by name, symbol, or ID. Returns PharmGKB Gene ID and basic gene meta…
PharmGKB_search_genes tool specification
Tool Information:
Name:
PharmGKB_search_genesType:
PharmGKBToolDescription: Search for genes in PharmGKB by name, symbol, or ID. Returns PharmGKB Gene ID and basic gene metadata.
Parameters:
query(string) (required) Gene name, symbol, or PharmGKB Accession ID (e.g., ‘CYP2D6’, ‘PA128’).
Example Usage:
query = {
"name": "PharmGKB_search_genes",
"arguments": {
"query": "example_value"
}
}
result = tu.run(query)
PharmGKB_search_variants (Type: PharmGKBTool)¶
Search for genetic variants in PharmGKB by rsID or name. Returns variant IDs and associated gene …
PharmGKB_search_variants tool specification
Tool Information:
Name:
PharmGKB_search_variantsType:
PharmGKBToolDescription: Search for genetic variants in PharmGKB by rsID or name. Returns variant IDs and associated gene info.
Parameters:
query(string) (required) Variant name or rsID (e.g., ‘rs1799853’).
Example Usage:
query = {
"name": "PharmGKB_search_variants",
"arguments": {
"query": "example_value"
}
}
result = tu.run(query)