Cpic Tools#
Configuration File: cpic_tools.json
Tool Type: Local
Tools Count: 9
This page contains all tools defined in the cpic_tools.json configuration file.
Available Tools#
CPIC_get_alleles (Type: CPICGetAllelesTool)#
Get pharmacogenomics alleles and their functional status for a gene from CPIC. Returns allele nam…
CPIC_get_alleles tool specification
Tool Information:
Name:
CPIC_get_allelesType:
CPICGetAllelesToolDescription: Get pharmacogenomics alleles and their functional status for a gene from CPIC. Returns allele names, activity values, and functional status, plus ‘total_count’ – the number of alleles CPIC curates for the gene, which is often far larger than one page (CYP2D6 has 208). Returns 50 per call by default; use ‘limit’ (max 1000) and ‘offset’ to retrieve the rest. Note: use ‘clinicalfunctionalstatus’ field for the active clinical classification (e.g., ‘No function’, ‘Normal function’); the ‘functionalstatus’ field may be null for some genes. Critical for translating genotype to phenotype (e.g., CYP2D6 *4 = no function, CYP2D6 *1 = normal function). Each allele also carries ‘frequency’, CPIC’s per-ancestry star-allele frequencies: a map keyed by CPIC’s own biogeographic-group labels (‘European’, ‘East Asian’, ‘Sub-Saharan African’, ‘Central/South Asian’, ‘African American/Afro-Caribbean’, ‘Latino’, ‘American’, ‘Near Eastern’, ‘Oceanian’), passed through verbatim and deliberately NOT remapped to gnomAD population codes. CPIC does not publish a frequency for every allele – ‘frequency’ is null on 13 of CYP2C19’s 49 alleles and 25 of CYP2D6’s 208 – and null means ‘not published’, never zero: a published 0.0 for a group is real data and appears as 0.0, and single groups inside the map can be null while others carry values. Alongside it, ‘strength’ is CPIC’s evidence level for the function assignment, ‘inferredfrequency’ is true when CPIC inferred the frequency rather than measuring it, and ‘citations’ lists supporting PMIDs; these are null on the alleles that lack a frequency. CPIC’s narrative ‘findings’ text is not returned (it restates ‘strength’ at ~78 KB per gene).
Parameters:
genesymbol(string) (required) Gene symbol (e.g., ‘CYP2D6’, ‘CYP2C19’, ‘TPMT’, ‘DPYD’)limit([‘integer’, ‘null’]) (optional) Maximum number of alleles to return per call (default 50, max 1000). Compare with ‘total_count’ in the response to see how many exist in total.offset([‘integer’, ‘null’]) (optional) Zero-based index of the first allele to return, for paging through genes with more alleles than one page (e.g. offset=50 returns alleles 51-100). Default: 0.
Example Usage:
query = {
"name": "CPIC_get_alleles",
"arguments": {
"genesymbol": "example_value"
}
}
result = tu.run(query)
CPIC_get_drug_info (Type: BaseRESTTool)#
Get pharmacogenomics information for a drug from the CPIC database. Returns drug identifiers incl…
CPIC_get_drug_info tool specification
Tool Information:
Name:
CPIC_get_drug_infoType:
BaseRESTToolDescription: Get pharmacogenomics information for a drug from the CPIC database. Returns drug identifiers including PharmGKB ID, RxNorm, DrugBank, and ATC codes. Use to find pharmacogenomics guidelines for a specific drug. Example drugs: warfarin, codeine, clopidogrel, simvastatin, tamoxifen, fluorouracil, mercaptopurine.
Parameters:
name(string) (required) Drug name in lowercase (e.g., ‘warfarin’, ‘codeine’, ‘clopidogrel’, ‘simvastatin’)
Example Usage:
query = {
"name": "CPIC_get_drug_info",
"arguments": {
"name": "example_value"
}
}
result = tu.run(query)
CPIC_get_gene_drug_pairs (Type: CPICSearchPairsTool)#
Get all gene-drug pairs for a pharmacogene from CPIC. Shows which drugs are affected by variants …
CPIC_get_gene_drug_pairs tool specification
Tool Information:
Name:
CPIC_get_gene_drug_pairsType:
CPICSearchPairsToolDescription: Get all gene-drug pairs for a pharmacogene from CPIC. Shows which drugs are affected by variants in a specific gene, with CPIC evidence level and PharmGKB clinical annotation level. Evidence levels: A (strongest) to D (weakest). Useful for understanding the clinical significance of a pharmacogene. Provide gene as ‘genesymbol’, ‘gene_symbol’, or ‘gene’.
Parameters:
genesymbol([‘string’, ‘null’]) (optional) Gene symbol (e.g., ‘CYP2D6’, ‘CYP2C19’, ‘SLCO1B1’, ‘TPMT’, ‘DPYD’, ‘VKORC1’)gene_symbol([‘string’, ‘null’]) (optional) Alias for genesymbol (e.g., ‘CYP2D6’)gene([‘string’, ‘null’]) (optional) Alias for genesymbol (e.g., ‘CYP2D6’)
Example Usage:
query = {
"name": "CPIC_get_gene_drug_pairs",
"arguments": {
}
}
result = tu.run(query)
CPIC_get_gene_info (Type: BaseRESTTool)#
Get pharmacogenomics information for a gene from the Clinical Pharmacogenomics Implementation Con…
CPIC_get_gene_info tool specification
Tool Information:
Name:
CPIC_get_gene_infoType:
BaseRESTToolDescription: Get pharmacogenomics information for a gene from the Clinical Pharmacogenomics Implementation Consortium (CPIC) database. Returns gene coordinates, sequence IDs, and cross-references to PharmGKB, HGNC, NCBI, and Ensembl. Use this to find which genes are pharmacogenomically relevant. Example genes: CYP2D6, CYP2C19, CYP2C9, SLCO1B1, TPMT, DPYD, UGT1A1, VKORC1, G6PD.
Parameters:
symbol([‘string’, ‘null’]) (optional) Gene symbol (e.g., ‘CYP2D6’, ‘CYP2C19’, ‘SLCO1B1’, ‘TPMT’, ‘DPYD’)gene([‘string’, ‘null’]) (optional) Gene symbol alias – alternative to symbol.gene_symbol([‘string’, ‘null’]) (optional) Gene symbol alias – alternative to symbol.
Example Usage:
query = {
"name": "CPIC_get_gene_info",
"arguments": {
}
}
result = tu.run(query)
CPIC_get_recommendations (Type: CPICGetRecommendationsTool)#
Get drug dosing recommendations from a CPIC pharmacogenomic guideline. Returns clinically actiona…
CPIC_get_recommendations tool specification
Tool Information:
Name:
CPIC_get_recommendationsType:
CPICGetRecommendationsToolDescription: Get drug dosing recommendations from a CPIC pharmacogenomic guideline. Returns clinically actionable recommendations linking genotype/phenotype to prescribing actions (classification strength, recommendation text, allele status). Accepts drug name (e.g. ‘codeine’, ‘abacavir’) for auto-resolution to guideline_id, or provide guideline_id directly. Without gene/phenotype, returns ALL recommendation rows for every genotype/phenotype combination the guideline covers – pass gene (e.g. ‘CYP2C19’) and/or phenotype (e.g. ‘Poor Metabolizer’, exact CPIC term) to filter to one specific recommendation. Key guideline IDs: 100421 (HLA-B/abacavir), 100416 (CYP2D6,OPRM1,COMT/opioids-codeine), 100414 (CYP2D6,CYP2C19/tricyclic-antidepressants), 100415 (CYP2D6/tamoxifen), 100412 (CYP2C9,HLA-B/phenytoin). Note: warfarin (guideline 100425) uses a dosing calculator and returns 0 rows from this endpoint.
Parameters:
guideline_id(integer) (optional) CPIC guideline numeric ID. Alternative to drug/drug_name. Use CPIC_list_guidelines to browse IDs.drug(string) (optional) Drug name to auto-resolve guideline_id (e.g., ‘codeine’, ‘abacavir’, ‘tamoxifen’).drug_name(string) (optional) Alias for drug.gene([‘string’, ‘null’]) (optional) Filter to recommendation rows for this pharmacogene (e.g. ‘CYP2C19’, ‘CYP2D6’), matched case-insensitively against each row’s own phenotypes dict. Combine with phenotype for an exact single-row lookup.phenotype([‘string’, ‘null’]) (optional) Filter to recommendation rows whose phenotype exactly matches this CPIC term (case-insensitive), e.g. ‘Poor Metabolizer’, ‘Likely Poor Metabolizer’, ‘Normal Metabolizer’, ‘Ultrarapid Metabolizer’. Note ‘Poor Metabolizer’ and ‘Likely Poor Metabolizer’ are distinct CPIC categories, not synonyms – use the exact term. If gene is also given, matches only that gene’s phenotype value; otherwise matches any gene’s phenotype value in the row.limit([‘integer’, ‘null’]) (optional) Maximum number of recommendations to return (default 50). Applied after gene/phenotype filtering, if any.offset([‘integer’, ‘null’]) (optional) Number of recommendations to skip for pagination (default 0). Applied after gene/phenotype filtering, if any.
Example Usage:
query = {
"name": "CPIC_get_recommendations",
"arguments": {
}
}
result = tu.run(query)
CPIC_list_drugs (Type: BaseRESTTool)#
List all drugs in the CPIC database that have pharmacogenomic annotations. Returns drug names and…
CPIC_list_drugs tool specification
Tool Information:
Name:
CPIC_list_drugsType:
BaseRESTToolDescription: List all drugs in the CPIC database that have pharmacogenomic annotations. Returns drug names and their associated CPIC guideline IDs. Drugs without a guideline ID have annotations but no full CPIC dosing guideline yet. Use the guidelineid with CPIC_get_recommendations to retrieve dosing recommendations. Covers 100+ drugs including commonly used medications like warfarin, codeine, clopidogrel, simvastatin, tamoxifen, fluorouracil, and abacavir.
Parameters:
No parameters required.
Example Usage:
query = {
"name": "CPIC_list_drugs",
"arguments": {
}
}
result = tu.run(query)
CPIC_list_guidelines (Type: CPICListGuidelinesTool)#
List all CPIC pharmacogenomic guidelines. Returns ~29 evidence-based guidelines (count may vary a…
CPIC_list_guidelines tool specification
Tool Information:
Name:
CPIC_list_guidelinesType:
CPICListGuidelinesToolDescription: List all CPIC pharmacogenomic guidelines. Returns ~29 evidence-based guidelines (count may vary as guidelines are added/updated) for using pharmacogenomic test results to optimize drug therapy. Each guideline covers one or more gene-drug pairs with specific dosing recommendations based on genotype/phenotype. Includes guideline ID, name, URL, associated genes, and PharmGKB IDs. Use the returned guideline ID with CPIC_get_recommendations to retrieve specific dosing recommendations.
Parameters:
gene(string) (optional) Filter by gene symbol (e.g., CYP2D6, TPMT). Returns only guidelines involving this gene.gene_symbol(string) (optional) Alias for gene. Filter by gene symbol (e.g., CYP2D6, TPMT).drug(string) (optional) Filter by drug name (e.g., ‘codeine’, ‘warfarin’, ‘clopidogrel’). Case-insensitive substring match against drug names in the guideline.drug_name(string) (optional) Alias for drug.
Example Usage:
query = {
"name": "CPIC_list_guidelines",
"arguments": {
}
}
result = tu.run(query)
CPIC_list_pgx_genes (Type: BaseRESTTool)#
List all pharmacogenomics genes curated by the Clinical Pharmacogenomics Implementation Consortiu…
CPIC_list_pgx_genes tool specification
Tool Information:
Name:
CPIC_list_pgx_genesType:
BaseRESTToolDescription: List all pharmacogenomics genes curated by the Clinical Pharmacogenomics Implementation Consortium (CPIC). Returns 130+ genes with known drug interactions including CYP enzymes, transporters, and other pharmacogenes. Includes gene coordinates, sequence IDs, and database cross-references.
Parameters:
No parameters required.
Example Usage:
query = {
"name": "CPIC_list_pgx_genes",
"arguments": {
}
}
result = tu.run(query)
CPIC_search_gene_drug_pairs (Type: CPICSearchPairsTool)#
Search CPIC gene-drug pairs by gene symbol and/or CPIC evidence level. Gene symbol should be the …
CPIC_search_gene_drug_pairs tool specification
Tool Information:
Name:
CPIC_search_gene_drug_pairsType:
CPICSearchPairsToolDescription: Search CPIC gene-drug pairs by gene symbol and/or CPIC evidence level. Gene symbol should be the standard HGNC symbol (e.g., “CYP2D6”, “DPYD”, “TPMT”). CPIC level indicates evidence strength: A=highest evidence, B=moderate, C=limited, D=for information only. Returns gene-drug pairs with guideline IDs for further lookup.
Parameters:
genesymbol([‘string’, ‘null’]) (optional) Gene symbol to filter by (e.g., ‘CYP2D6’, ‘DPYD’, ‘TPMT’). Omit to search all genes.cpiclevel([‘string’, ‘null’]) (optional) CPIC evidence level to filter by (e.g., ‘A’, ‘B’, ‘B/C’, ‘C’, ‘D’). Omit to include all levels.limit([‘integer’, ‘null’]) (optional) Maximum number of results to return (default 50)gene_symbol([‘string’, ‘null’]) (optional) Gene symbol alias (e.g., ‘CYP2D6’, ‘VKORC1’) — alternative to genesymbolgene([‘string’, ‘null’]) (optional) Gene symbol alias (e.g., ‘CYP2D6’) — alternative to genesymbol
Example Usage:
query = {
"name": "CPIC_search_gene_drug_pairs",
"arguments": {
}
}
result = tu.run(query)