executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
open-targetsQuery the Open Targets Platform GraphQL API for gene-drug-disease associations, evidence scores, and therapeutic target validation. Use when the user needs disease associations for a gene, drug evidence for a target, or target prioritization for a disease. NOT for compound property lookup (use pubchem-compound), NOT for bioactivity measurements (use chembl-…
Independent GitHub snapshot · Automated classification · Original documentation governs
Query the Open Targets Platform GraphQL API to explore gene-drug-disease associations, evidence from genetic studies, known drugs, pathway data, and overall target validation scores.
https://api.platform.opentargets.org/api/v4/graphql
All requests use HTTP POST with a JSON body containing query and optionally variables.
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "query { search(queryString: \"BRAF\", entityNames: [\"target\"], page: {size: 5, index: 0}) { total hits { id name entity description } } }"
}' | python3 -m json.tool | head -40
Retrieve detailed information about a specific target by Ensembl gene ID:
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "query { target(ensemblId: \"ENSG00000157764\") { id approvedSymbol approvedName biotype functionDescriptions subcellularLocations { location } } }"
}' | python3 -m json.tool
Find diseases associated with a gene/target, ranked by overall association score:
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "query { target(ensemblId: \"ENSG00000157764\") { approvedSymbol associatedDiseases(page: {size: 10, index: 0}) { count rows { disease { id name } score datatypeScores { id score } } } } }"
}' | python3 -m json.tool | head -60
Find targets associated with a specific disease by EFO ID:
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "query { disease(efoId: \"EFO_0000616\") { id name associatedTargets(page: {size: 10, index: 0}) { count rows { target { id approvedSymbol } score datatypeScores { id score } } } } }"
}' | python3 -m json.tool | head -60
Retrieve known drugs and clinical evidence for a target-disease pair:
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "query { target(ensemblId: \"ENSG00000157764\") { approvedSymbol knownDrugs(page: {size: 10, index: 0}) { count rows { drug { id name mechanismsOfAction { rows { mechanismOfAction } } } phase status diseaseFromSource } } } }"
}' | python3 -m json.tool | head -80
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
-H "Content-Type: application/json" \
-d '{
"query": "query { search(queryString: \"melanoma\", entityNames: [\"disease\"], page: {size: 5, index: 0}) { total hits { id name entity description } } }"
}' | python3 -m json.tool | head -40
The datatypeScores array contains scores for each evidence category:
# Resolve gene symbol to Ensembl ID
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
-H "Content-Type: application/json" \
-d '{"query": "query { search(queryString: \"TP53\", entityNames: [\"target\"], page: {size: 1, index: 0}) { hits { id name } } }"}' | python3 -m json.tool
# Resolve disease name to EFO ID
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
-H "Content-Type: application/json" \
-d '{"query": "query { search(queryString: \"breast cancer\", entityNames: [\"disease\"], page: {size: 1, index: 0}) { hits { id name } } }"}' | python3 -m json.tool
# Get drug details by ChEMBL ID
curl -s -X POST https://api.platform.opentargets.org/api/v4/graphql \
-H "Content-Type: application/json" \
-d '{"query": "query { drug(chemblId: \"CHEMBL941\") { id name drugType maximumClinicalTrialPhase mechanismsOfAction { rows { mechanismOfAction targets { id approvedSymbol } } } } }"}' | python3 -m json.tool
page: {size: N, index: 0} to control result counts; default pages can be large.datatypeScores to focus on specific evidence types relevant to the research question.NEVER fabricate database results from training data. Every protein ID, gene name, compound property, pathway ID, structure detail, and metadata MUST come from an actual API response in this conversation. If the API returns no results, errors, or partial data, report exactly what happened. Do not "fill in" missing data from memory or make up identifiers.