.gitattributes CHANGED
@@ -42,5 +42,6 @@ static/images/treatmentpc.jpg filter=lfs diff=lfs merge=lfs -text
42
  static/images/txagent_capabilities.jpg filter=lfs diff=lfs merge=lfs -text
43
  static/images/txagent_train.jpg filter=lfs diff=lfs merge=lfs -text
44
  static/images/txagent.jpg filter=lfs diff=lfs merge=lfs -text
45
- anatomyofAgentResponse.jpg filter=lfs diff=lfs merge=lfs -text
46
- anatomyofAgentResponse.pptx filter=lfs diff=lfs merge=lfs -text
 
 
42
  static/images/txagent_capabilities.jpg filter=lfs diff=lfs merge=lfs -text
43
  static/images/txagent_train.jpg filter=lfs diff=lfs merge=lfs -text
44
  static/images/txagent.jpg filter=lfs diff=lfs merge=lfs -text
45
+ static/videos/q1.mov filter=lfs diff=lfs merge=lfs -text
46
+ static/videos/q2.mov filter=lfs diff=lfs merge=lfs -text
47
+ static/videos/q3.mov filter=lfs diff=lfs merge=lfs -text
.nojekyll ADDED
@@ -0,0 +1 @@
 
 
1
+
README.md CHANGED
@@ -1,92 +1,12 @@
1
  ---
2
- title: TxAgent RAO Evaluation
3
- emoji: 🌍
4
- colorFrom: yellow
5
- colorTo: indigo
6
  sdk: gradio
7
- sdk_version: 5.28.0
8
  app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- The TxAgent Rare-as-one Evaluation Portal is a Gradio-based web application designed to facilitate the human evaluation of TxAgent's responses compared to other models. Users log in with their credentials, receive questions relevant to their expertise, and then perform pairwise comparisons and detailed ratings of model responses.
13
-
14
- ---
15
-
16
- ## Features
17
-
18
- * **User Registration:** The portal collects user information such as name, email, evaluator ID, medical specialty, subspecialty, NPI ID, and years of experience.
19
- * **Dynamic Question Assignment:** Questions are fetched based on the evaluator's ID. The system tracks previously evaluated questions to ensure users don't see the same questions twice.
20
- * **Model Response Display:** Two model responses are presented side-by-side in scrollable chat windows for easy comparison.
21
- * **Reference Answer:** A reference answer is provided to offer context and guidance during evaluation.
22
- * **Pairwise Comparison:** Users compare Model A and Model B across five criteria: Problem Resolution, Helpfulness, Scientific Consensus, Accuracy, and Completeness.
23
- * **Detailed Rating:** Evaluators can rate each model's response individually on a 1-5 scale for the same five criteria, with an "Unable to Judge" option.
24
- * **Constraint-Based Rating:** To maintain consistency, individual model ratings are restricted based on the pairwise comparison choices. For instance, if Model A is chosen as "better" in a pairwise comparison, its individual rating for that criterion cannot be lower than Model B's.
25
- * **Validation:** The system checks for inconsistencies between pairwise comparisons and individual ratings, providing feedback to the user.
26
- * **Progress Tracking:** Users are informed about how many questions they have remaining to evaluate.
27
- * **Data Submission:** All evaluation data is submitted to a Google Sheet for storage and analysis. Importantly, the Google Sheet name is dynamically generated using a **base name (`TxAgent_Human_Eval_Results_CROWDSOURCED`) combined with the evaluator's unique ID**, ensuring that each evaluator's submissions are organized into their own dedicated sheet (e.g., `TxAgent_Human_Eval_Results_CROWDSOURCED_1234`).
28
-
29
- ---
30
-
31
- ## Application Flow
32
-
33
- The application guides the user through a multi-page evaluation process:
34
-
35
- 1. **Welcome Page (`page-1`):** This is the initial landing page featuring a "Participate in TxAgent Evaluation" button and general information about the TxAgent project.
36
- 2. **Registration/Information Page (`page0`):** Users input their personal and professional details here. Once submitted, the application uses this information to assign relevant questions.
37
- 3. **Evaluation Progress Modal:** A pop-up appears, informing the user of the number of questions they have left to evaluate.
38
- 4. **Pairwise Comparison Page (`page1`):** On this page, users compare two model responses for a given prompt based on the predefined criteria.
39
- 5. **Detailed Rating Page (`page2`):** Users then provide individual ratings for each model's response across the same criteria.
40
- 6. **Confirmation Modal:** Before final submission, a pop-up asks the user to confirm their evaluation.
41
- 7. **Final Page (`final_page`):** Once all assigned questions are evaluated, a thank you message is displayed.
42
- 8. **Error Modal:** Any validation errors or important messages are conveyed through this pop-up.
43
-
44
- ---
45
-
46
- ## Code Components and Interactions
47
-
48
- The Gradio application is built using several key components and functions that orchestrate the user experience and data handling.
49
-
50
- ### Configuration and Data Handling
51
-
52
- * **`REPO_ID`**: This variable points to the Hugging Face dataset repository where evaluation data is stored.
53
- * **`EVALUATOR_MAP_DICT`**: This is the name of the JSON file within the Hugging Face repository that maps evaluator IDs to their specific data directories.
54
- * **`TXAGENT_RESULTS_SHEET_BASE_NAME`**: As mentioned, this string forms the base for the Google Sheet names. The actual sheet used for saving data will append the user's evaluator ID to this base name.
55
- * **Tool Lists**: The application dynamically loads JSON files from the `tool_lists` directory. These files define the various tools used by the models.
56
- * **`tool_database_labels`**: This dictionary is constructed from the loaded tool lists and is used by the `format_chat` function to clearly label tool calls within the displayed model responses, making the reasoning trace more understandable.
57
- * **HTML & Image Assets**: `index.html` provides the content for the initial project page, dynamically embedding images (like `anatomyofAgentResponse.jpg`) by converting them to base64 strings.
58
- * **Specialty Data**: `specialties.json` and `subspecialties.json` provide the lists of medical specialties and subspecialties for the dropdown menus during user registration.
59
-
60
- ### Core Logic Functions
61
-
62
- * **`encode_image_to_base64(image_path)`**: A utility to convert image files into base64 strings, allowing them to be directly embedded into HTML without requiring separate file hosting.
63
- * **`preprocess_question_id(question_id)`**: Ensures that question IDs are consistently formatted as strings, regardless of their original type.
64
- * **`get_evaluator_questions(evaluator_id, all_files, evaluator_directory)`**: This crucial function orchestrates the retrieval of questions for a given evaluator. It downloads the relevant evaluation data from Hugging Face based on the evaluator's assigned directory. Crucially, it then filters these questions against previously submitted evaluations (read from the evaluator's specific Google Sheet), ensuring that users only receive questions they haven't already answered. It returns the list of `(question_ID, other_model_name)` pairs to be evaluated and all the loaded model data.
65
- * **`format_chat(reasoning_trace, tool_database_labels)`**: This function takes a model's raw reasoning trace and transforms it into a clean, human-readable chat history format, highlighting tool calls using the labels from `tool_database_labels`.
66
- * **`append_to_sheet(...)` and `read_sheet_to_df(...)`**: These (presumed) utility functions handle the integration with Google Sheets. `append_to_sheet` writes the collected evaluation data, and `read_sheet_to_df` reads existing data to prevent re-evaluation of questions. The `custom_sheet_name` parameter in these functions is where the dynamic sheet naming (base name + evaluator ID) comes into play.
67
-
68
- ### User Interface and Page Transitions
69
-
70
- The application uses various Gradio UI components for input, display, and interaction:
71
-
72
- * **Layout Components**: `gr.Column` and `gr.Row` are used to arrange UI elements effectively.
73
- * **Content Display**: `gr.HTML` and `gr.Markdown` are used for embedding rich content, instructions, and formatted text, such as the highlighted prompt and reference answers.
74
- * **Input Fields**: `gr.Textbox` handles text input for user details and comments. `gr.Dropdown` provides multi-select options for specialties. `gr.Radio` is used for single-choice selections like years of experience, pairwise comparisons, and individual ratings.
75
- * **Interactive Display**: `gr.Chatbot` provides scrollable, interactive displays for model responses, capable of rendering markdown.
76
- * **Buttons**: `gr.Button` elements control navigation (`Next`, `Back`, `Home Page`), initiate actions (`Participate in Evaluation`, `Submit`), and manage specific UI elements (`Clear Selection`, `This question does not make sense`).
77
- * **`gr.State()`**: This fundamental Gradio component is used to store and pass information between different function calls and pages. Variables like `user_info_state`, `pairwise_state`, and `data_subset_state` preserve crucial evaluation context.
78
- * **`Modal()`**: Used for presenting critical information or confirmation requests in a pop-up window, enhancing user experience for actions like submission or error notifications.
79
-
80
- ### Event Handling and Validation
81
-
82
- Gradio's event handling mechanism (`.click()`, `.change()`, `.then()`) is central to the application's interactive nature:
83
-
84
- * **`go_to_eval_progress_modal(...)`**: Triggered by clicking "Next" on the registration page. It validates user inputs, then fetches and prepares the first question for evaluation, showing the `eval_progress_modal`.
85
- * **`go_to_page2(...)`**: Activated by the "Next: Rate Responses" button on the pairwise comparison page. It saves the pairwise choices and reasons, then transitions the user to the detailed rating page.
86
- * **`restrict_choices(...)`**: This function is a key part of the constraint-based rating. It is triggered whenever a rating radio button for Model A or Model B is changed. It dynamically updates the available choices for the *other* model's rating based on the selected pairwise comparison and the current rating, ensuring consistency.
87
- * **`validate_ratings(...)`**: This function is called when the "Submit" button is clicked. It performs a consistency check between the pairwise comparisons and the individual model ratings. If any discrepancies are found (e.g., Model A rated lower than B but chosen as "better" in pairwise), an error message is generated.
88
- * **Submission Flow**: The `submit_btn`'s `.click()` event first calls `validate_ratings`. Its `.then()` method then processes the validation result. If valid, a confirmation modal (`confirm_modal`) appears.
89
- * **`final_submit(...)`**: If the user confirms submission, this function is executed. It constructs the complete evaluation record using `build_row_dict`, appends it to the correct Google Sheet (`TXAGENT_RESULTS_SHEET_BASE_NAME` + evaluator ID), and then re-evaluates the remaining questions. Based on the count, it either shows the `eval_progress_modal` for the next question or the `final_page` if no more questions are available.
90
- * **`reset_everything_except_user_info()`**: After a successful submission and when proceeding to a new question, this function resets all evaluation-specific UI components to their default empty or unselected states, ensuring a clean slate for the next task.
91
-
92
- ---
 
1
  ---
2
+ title: ExpertEval
3
+ emoji: πŸ‘€
4
+ colorFrom: purple
5
+ colorTo: pink
6
  sdk: gradio
7
+ sdk_version: 5.29.0
8
  app_file: app.py
9
  pinned: false
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app.py CHANGED
The diff for this file is too large to render. See raw diff
 
fda_drug_labeling_tools.json ADDED
The diff for this file is too large to render. See raw diff
 
tool_lists/monarch_tools.json β†’ monarch_tools.json RENAMED
@@ -28,14 +28,10 @@
28
  }
29
  },
30
  "query_schema": {
31
- "category": [
32
- "biolink:DiseaseToPhenotypicFeatureAssociation"
33
- ],
34
  "object": null,
35
  "compact": true,
36
- "object_category": [
37
- "biolink:PhenotypicFeature"
38
- ],
39
  "limit": 500,
40
  "offset": 0
41
  },
@@ -100,9 +96,7 @@
100
  },
101
  "query_schema": {
102
  "query": null,
103
- "category": [
104
- "biolink:PhenotypicFeature"
105
- ],
106
  "limit": 20,
107
  "offset": 0
108
  },
 
28
  }
29
  },
30
  "query_schema": {
31
+ "category": ["biolink:DiseaseToPhenotypicFeatureAssociation"],
 
 
32
  "object": null,
33
  "compact": true,
34
+ "object_category": ["biolink:PhenotypicFeature"],
 
 
35
  "limit": 500,
36
  "offset": 0
37
  },
 
96
  },
97
  "query_schema": {
98
  "query": null,
99
+ "category": ["biolink:PhenotypicFeature"],
 
 
100
  "limit": 20,
101
  "offset": 0
102
  },
tool_lists/opentarget_tools.json β†’ opentarget_tools.json RENAMED
@@ -1,6 +1,6 @@
1
  [
2
  {
3
- "name": "OpenTargets_get_associated_targets_by_disease_efoId",
4
  "description": "Find targets associated with a specific disease or phenotype based on efoId.",
5
  "label": [
6
  "Disease",
@@ -24,7 +24,7 @@
24
  "type": "OpenTarget"
25
  },
26
  {
27
- "name": "OpenTargets_get_associated_diseases_phenotypes_by_target_ensemblID",
28
  "description": "Find diseases or phenotypes associated with a specific target using ensemblId.",
29
  "label": [
30
  "Target",
@@ -48,7 +48,7 @@
48
  "type": "OpenTarget"
49
  },
50
  {
51
- "name": "OpenTargets_target_disease_evidence",
52
  "description": "Explore evidence that supports a specific target-disease association. Input is disease efoId and target ensemblID.",
53
  "label": [
54
  "Target",
@@ -77,7 +77,7 @@
77
  "type": "OpenTarget"
78
  },
79
  {
80
- "name": "OpenTargets_get_drug_warnings_by_chemblId",
81
  "description": "Retrieve warnings for a specific drug using ChEMBL ID.",
82
  "parameter": {
83
  "type": "object",
@@ -104,7 +104,7 @@
104
  "type": "OpenTarget"
105
  },
106
  {
107
- "name": "OpenTargets_get_drug_mechanisms_of_action_by_chemblId",
108
  "description": "Retrieve the mechanisms of action associated with a specific drug using chemblId.",
109
  "parameter": {
110
  "type": "object",
@@ -129,7 +129,7 @@
129
  "type": "OpenTarget"
130
  },
131
  {
132
- "name": "OpenTargets_get_associated_drugs_by_disease_efoId",
133
  "description": "Retrieve known drugs associated with a specific disease by disease efoId.",
134
  "parameter": {
135
  "type": "object",
@@ -147,6 +147,19 @@
147
  }
148
  },
149
  "query_schema": "\n query diseaseKnownDrugs($efoId: String!, $size: Int!, $freeTextQuery: String) {\n disease(efoId: $efoId) {\n id\n name\n knownDrugs(size: $size, freeTextQuery: $freeTextQuery) {\n count\n rows {\n drug {\n id\n name\n tradeNames\n maximumClinicalTrialPhase\n isApproved\n hasBeenWithdrawn\n }\n phase\n status\n mechanismOfAction\n target {\n id\n approvedSymbol\n }\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  "label": [
151
  "OpenTarget",
152
  "Disease",
@@ -157,7 +170,7 @@
157
  "type": "OpenTarget"
158
  },
159
  {
160
- "name": "OpenTargets_get_similar_entities_by_disease_efoId",
161
  "description": "Retrieve similar entities for a given disease efoId using a model trained with PubMed.",
162
  "parameter": {
163
  "type": "object",
@@ -191,7 +204,7 @@
191
  "type": "OpenTarget"
192
  },
193
  {
194
- "name": "OpenTargets_get_similar_entities_by_drug_chemblId",
195
  "description": "Retrieve similar entities for a given drug chemblId using a model trained with PubMed.",
196
  "parameter": {
197
  "type": "object",
@@ -225,7 +238,7 @@
225
  "type": "OpenTarget"
226
  },
227
  {
228
- "name": "OpenTargets_get_similar_entities_by_target_ensemblID",
229
  "description": "Retrieve similar entities for a given target ensemblID using a model trained with PubMed.",
230
  "parameter": {
231
  "type": "object",
@@ -259,7 +272,7 @@
259
  "type": "OpenTarget"
260
  },
261
  {
262
- "name": "OpenTargets_get_associated_phenotypes_by_disease_efoId",
263
  "description": "Find HPO phenotypes asosciated with the specified disease efoId.",
264
  "parameter": {
265
  "type": "object",
@@ -283,7 +296,7 @@
283
  "type": "OpenTarget"
284
  },
285
  {
286
- "name": "OpenTargets_get_drug_withdrawn_blackbox_status_by_chemblId",
287
  "description": "Find withdrawn and black-box warning statuses for a specific drug by chemblId.",
288
  "parameter": {
289
  "type": "object",
@@ -309,7 +322,7 @@
309
  "type": "OpenTarget"
310
  },
311
  {
312
- "name": "OpenTargets_search_category_counts_by_query_string",
313
  "description": "Get the count of entries in each entity category (disease, target, drug) based on a query string.",
314
  "parameter": {
315
  "type": "object",
@@ -334,7 +347,7 @@
334
  "type": "OpenTarget"
335
  },
336
  {
337
- "name": "OpenTargets_get_disease_id_description_by_name",
338
  "description": "Retrieve the efoId and additional details of a disease based on its name.",
339
  "parameter": {
340
  "type": "object",
@@ -359,8 +372,8 @@
359
  "type": "OpenTarget"
360
  },
361
  {
362
- "name": "OpenTargets_get_drug_id_description_by_name",
363
- "description": "Fetch the drug chemblId and description based on the drug generic name.",
364
  "parameter": {
365
  "type": "object",
366
  "properties": {
@@ -383,31 +396,7 @@
383
  "type": "OpentargetToolDrugNameMatch"
384
  },
385
  {
386
- "name": "OpenTargets_get_drug_chembId_by_generic_name",
387
- "description": "Fetch the drug chemblId and description based on the drug generic name.",
388
- "parameter": {
389
- "type": "object",
390
- "properties": {
391
- "drugName": {
392
- "type": "string",
393
- "description": "The generic name of the drug for which the ID is required.",
394
- "required": true
395
- }
396
- }
397
- },
398
- "query_schema": "\n query getDrugIdByName($drugName: String!) {\n search(queryString: $drugName, entityNames: [\"drug\"]) {\n hits {\n id\n name\n description\n }\n }\n }\n ",
399
- "label": [
400
- "Identification",
401
- "Search",
402
- "Name",
403
- "Drug",
404
- "OpenTarget",
405
- "GraphQL"
406
- ],
407
- "type": "OpentargetToolDrugNameMatch"
408
- },
409
- {
410
- "name": "OpenTargets_get_drug_indications_by_chemblId",
411
  "description": "Fetch indications (treatable phenotypes/diseases) for a given drug chemblId.",
412
  "parameter": {
413
  "type": "object",
@@ -419,7 +408,7 @@
419
  }
420
  }
421
  },
422
- "query_schema": "\n query drugIndications($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n indications {\n rows {\n disease {\n id\n name\n }\n maxPhaseForIndication\n references {\n source\n }\n }\n }\n }\n }\n ",
423
  "label": [
424
  "Drug",
425
  "Indications",
@@ -431,7 +420,7 @@
431
  "type": "OpenTarget"
432
  },
433
  {
434
- "name": "OpenTargets_get_target_gene_ontology_by_ensemblID",
435
  "description": "Retrieve Gene Ontology annotations for a specific target by Ensembl ID.",
436
  "parameter": {
437
  "type": "object",
@@ -444,6 +433,35 @@
444
  }
445
  },
446
  "query_schema": "\n query targetGeneOntology($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n geneOntology {\n aspect\n evidence\n geneProduct\n source\n term {\n id\n name\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  "label": [
448
  "Target",
449
  "GeneOntology",
@@ -453,7 +471,7 @@
453
  "type": "OpenTarget"
454
  },
455
  {
456
- "name": "OpenTargets_get_target_homologues_by_ensemblID",
457
  "description": "Fetch homologues for a specific target by Ensembl ID.",
458
  "parameter": {
459
  "type": "object",
@@ -466,6 +484,35 @@
466
  }
467
  },
468
  "query_schema": "\n query targetHomologues($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n homologues {\n homologyType\n queryPercentageIdentity\n speciesId\n speciesName\n targetGeneId\n targetGeneSymbol\n targetPercentageIdentity\n isHighConfidence\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
469
  "label": [
470
  "OpenTarget",
471
  "Target Information",
@@ -475,7 +522,7 @@
475
  "type": "OpenTarget"
476
  },
477
  {
478
- "name": "OpenTargets_get_target_safety_profile_by_ensemblID",
479
  "description": "Retrieve known target safety liabilities for a specific target Ensembl ID.",
480
  "parameter": {
481
  "type": "object",
@@ -488,6 +535,35 @@
488
  }
489
  },
490
  "query_schema": "\n query targetSafetyLiabilities($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n safetyLiabilities {\n event\n eventId\n biosamples {\n cellFormat\n cellLabel\n tissueLabel\n tissueId\n }\n effects {\n dosing\n direction\n }\n studies {\n name\n type\n description\n }\n datasource\n literature\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
491
  "label": [
492
  "Target",
493
  "SafetyLiability",
@@ -499,7 +575,7 @@
499
  "type": "OpenTarget"
500
  },
501
  {
502
- "name": "OpenTargets_get_biological_mouse_models_by_ensemblID",
503
  "description": "Retrieve biological mouse models, including allelic compositions and genetic backgrounds, for a specific target.",
504
  "parameter": {
505
  "type": "object",
@@ -512,6 +588,26 @@
512
  }
513
  },
514
  "query_schema": "\n query fetchBiologicalModels($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n mousePhenotypes {\n biologicalModels {\n allelicComposition\n geneticBackground\n id\n literature\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
515
  "label": [
516
  "OpenTarget",
517
  "Target Information",
@@ -521,7 +617,7 @@
521
  "type": "OpenTarget"
522
  },
523
  {
524
- "name": "OpenTargets_get_target_genomic_location_by_ensemblID",
525
  "description": "Retrieve genomic location data for a specific target, including chromosome, start, end, and strand.",
526
  "parameter": {
527
  "type": "object",
@@ -534,6 +630,35 @@
534
  }
535
  },
536
  "query_schema": "\n query targetGenomicLocation($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n genomicLocation {\n chromosome\n start\n end\n strand\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
537
  "label": [
538
  "Target",
539
  "GenomicLocation",
@@ -543,7 +668,7 @@
543
  "type": "OpenTarget"
544
  },
545
  {
546
- "name": "OpenTargets_get_target_subcellular_locations_by_ensemblID",
547
  "description": "Retrieve information about subcellular locations for a specific target ensemblID.",
548
  "parameter": {
549
  "type": "object",
@@ -556,6 +681,35 @@
556
  }
557
  },
558
  "query_schema": "\n query targetSubcellularLocations($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n subcellularLocations {\n location\n source\n termSL\n labelSL\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
559
  "label": [
560
  "Target",
561
  "Subcellular Locations",
@@ -565,7 +719,7 @@
565
  "type": "OpenTarget"
566
  },
567
  {
568
- "name": "OpenTargets_get_target_synonyms_by_ensemblID",
569
  "description": "Retrieve synonyms for specified target, including alternative names and symbols, using given ensemblID.",
570
  "parameter": {
571
  "type": "object",
@@ -578,6 +732,35 @@
578
  }
579
  },
580
  "query_schema": "\n query retrieveTargetSynonyms($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n synonyms {\n label\n source\n }\n symbolSynonyms {\n label\n source\n }\n nameSynonyms {\n label\n source\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
581
  "label": [
582
  "OpenTarget",
583
  "Target Information",
@@ -587,7 +770,7 @@
587
  "type": "OpenTarget"
588
  },
589
  {
590
- "name": "OpenTargets_get_target_tractability_by_ensemblID",
591
  "description": "Retrieve tractability assessments, including modality and values, for a specific target ensembl ID.",
592
  "parameter": {
593
  "type": "object",
@@ -600,6 +783,35 @@
600
  }
601
  },
602
  "query_schema": "\n query targetTractabilityAssessment($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n tractability {\n label\n modality\n value\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
603
  "label": [
604
  "Target",
605
  "Tractability",
@@ -610,7 +822,7 @@
610
  "type": "OpenTarget"
611
  },
612
  {
613
- "name": "OpenTargets_get_target_classes_by_ensemblID",
614
  "description": "Retrieve the target classes associated with a specific target ensemblID.",
615
  "parameter": {
616
  "type": "object",
@@ -623,6 +835,35 @@
623
  }
624
  },
625
  "query_schema": "\n query fetchTargetClasses($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n targetClass {\n id\n label\n level\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
626
  "label": [
627
  "OpenTarget",
628
  "Target Information",
@@ -632,7 +873,7 @@
632
  "type": "OpenTarget"
633
  },
634
  {
635
- "name": "OpenTargets_get_target_enabling_packages_by_ensemblID",
636
  "description": "Retrieve the Target Enabling Packages (TEP) associated with a specific target ensemblID.",
637
  "parameter": {
638
  "type": "object",
@@ -645,6 +886,17 @@
645
  }
646
  },
647
  "query_schema": "\n query fetchTargetEnablingPackages($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n tep {\n name\n uri\n therapeuticArea\n description\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
648
  "label": [
649
  "OpenTarget",
650
  "Target Information",
@@ -654,7 +906,7 @@
654
  "type": "OpenTarget"
655
  },
656
  {
657
- "name": "OpenTargets_get_target_interactions_by_ensemblID",
658
  "description": "Retrieve interaction data for a specific target ensemblID, including interaction partners and evidence.",
659
  "label": [
660
  "Target",
@@ -691,11 +943,52 @@
691
  }
692
  }
693
  },
694
- "query_schema": "\n query targetInteractions($ensemblId: String!, $page: Pagination) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n interactions(page: $page) {\n count\n rows {\n intA\n targetA {\n id\n approvedSymbol\n }\n intB\n targetB {\n id\n approvedSymbol\n }\n score\n sourceDatabase\n evidences {\n evidenceScore\n pubmedId\n interactionDetectionMethodShortName\n }\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
695
  "type": "OpenTarget"
696
  },
697
  {
698
- "name": "OpenTargets_get_disease_ancestors_parents_by_efoId",
699
  "description": "Retrieve the disease ancestors and parents in the ontology using the disease EFO ID.",
700
  "parameter": {
701
  "type": "object",
@@ -717,7 +1010,7 @@
717
  "type": "OpenTarget"
718
  },
719
  {
720
- "name": "OpenTargets_get_disease_descendants_children_by_efoId",
721
  "description": "Retrieve the disease descendants and children in the ontology using the disease EFO ID.",
722
  "parameter": {
723
  "type": "object",
@@ -739,7 +1032,7 @@
739
  "type": "OpenTarget"
740
  },
741
  {
742
- "name": "OpenTargets_get_disease_locations_by_efoId",
743
  "description": "Retrieve the disease's direct location and indirect location disease terms and IDs using the disease EFO ID.",
744
  "parameter": {
745
  "type": "object",
@@ -761,7 +1054,7 @@
761
  "type": "OpenTarget"
762
  },
763
  {
764
- "name": "OpenTargets_get_disease_synonyms_by_efoId",
765
  "description": "Retrieve disease synonyms by its EFO ID.",
766
  "parameter": {
767
  "type": "object",
@@ -783,7 +1076,7 @@
783
  "type": "OpenTarget"
784
  },
785
  {
786
- "name": "OpenTargets_get_disease_description_by_efoId",
787
  "description": "Retrieve disease description, name, database cros references, obsolete terms, and whether it's a therapeutic area, all using the specified efoId.",
788
  "parameter": {
789
  "type": "object",
@@ -796,6 +1089,35 @@
796
  }
797
  },
798
  "query_schema": "\n query getDiseaseDetailsByEfoId($efoId: String!) {\n disease(efoId: $efoId) {\n id\n name\n description\n dbXRefs\n obsoleteTerms\n isTherapeuticArea\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
799
  "label": [
800
  "OpenTarget",
801
  "Disease",
@@ -805,7 +1127,7 @@
805
  "type": "OpenTarget"
806
  },
807
  {
808
- "name": "OpenTargets_get_disease_therapeutic_areas_by_efoId",
809
  "description": "Retrieve the therapeutic areas associated with a specific disease efoId.",
810
  "parameter": {
811
  "type": "object",
@@ -818,6 +1140,35 @@
818
  }
819
  },
820
  "query_schema": "\n query diseaseTherapeuticAreas($efoId: String!) {\n disease(efoId: $efoId) {\n id\n name\n therapeuticAreas {\n id\n name\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
821
  "label": [
822
  "OpenTarget",
823
  "Disease",
@@ -827,7 +1178,7 @@
827
  "type": "OpenTarget"
828
  },
829
  {
830
- "name": "OpenTargets_get_drug_adverse_events_by_chemblId",
831
  "description": "Retrieve significant adverse events reported for a specific drug chemblId.",
832
  "parameter": {
833
  "type": "object",
@@ -856,7 +1207,7 @@
856
  }
857
  }
858
  },
859
- "query_schema": "\n query drugAdverseEvents($chemblId: String!, $page: Pagination) {\n drug(chemblId: $chemblId) {\n id\n name\n adverseEvents(page: $page) {\n count\n criticalValue\n rows {\n name\n meddraCode\n count\n logLR\n }\n }\n }\n }\n ",
860
  "label": [
861
  "Drug",
862
  "AdverseEvents",
@@ -870,7 +1221,7 @@
870
  "type": "OpenTarget"
871
  },
872
  {
873
- "name": "OpenTargets_get_known_drugs_by_drug_chemblId",
874
  "description": "Get a list of known drugs and associated information using the specified chemblId.",
875
  "parameter": {
876
  "type": "object",
@@ -892,7 +1243,7 @@
892
  "type": "OpenTarget"
893
  },
894
  {
895
- "name": "OpenTargets_get_parent_child_molecules_by_drug_chembl_ID",
896
  "description": "Get parent and child molecules of specified drug chemblId.",
897
  "parameter": {
898
  "type": "object",
@@ -914,7 +1265,7 @@
914
  "type": "OpenTarget"
915
  },
916
  {
917
- "name": "OpenTargets_get_approved_indications_by_drug_chemblId",
918
  "description": "Retrieve detailed information about multiple drugs using a list of ChEMBL IDs.",
919
  "parameter": {
920
  "type": "object",
@@ -936,7 +1287,7 @@
936
  "type": "OpenTarget"
937
  },
938
  {
939
- "name": "OpenTargets_get_drug_description_by_chemblId",
940
  "description": "Get drug name, year of first approval, type, cross references, and max clinical trial phase based on specified chemblId.",
941
  "parameter": {
942
  "type": "object",
@@ -958,7 +1309,7 @@
958
  "type": "OpenTarget"
959
  },
960
  {
961
- "name": "OpenTargets_get_drug_synonyms_by_chemblId",
962
  "description": "Retrieve the synonyms associated with a specific drug chemblId.",
963
  "parameter": {
964
  "type": "object",
@@ -971,6 +1322,35 @@
971
  }
972
  },
973
  "query_schema": "\n query drugSynonyms($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n synonyms\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
974
  "label": [
975
  "OpenTarget",
976
  "Drug Information",
@@ -980,7 +1360,7 @@
980
  "type": "OpenTarget"
981
  },
982
  {
983
- "name": "OpenTargets_get_drug_trade_names_by_chemblId",
984
  "description": "Retrieve the trade names associated with a specific drug chemblId.",
985
  "parameter": {
986
  "type": "object",
@@ -993,6 +1373,35 @@
993
  }
994
  },
995
  "query_schema": "\n query drugTradeNames($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n tradeNames\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
996
  "label": [
997
  "Drug",
998
  "OpenTarget",
@@ -1002,7 +1411,7 @@
1002
  "type": "OpenTarget"
1003
  },
1004
  {
1005
- "name": "OpenTargets_get_drug_approval_status_by_chemblId",
1006
  "description": "Retrieve the approval status of a specific drug chemblId.",
1007
  "parameter": {
1008
  "type": "object",
@@ -1015,6 +1424,35 @@
1015
  }
1016
  },
1017
  "query_schema": "\n query drugApprovalStatus($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n isApproved\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1018
  "label": [
1019
  "Drug",
1020
  "Drug Information",
@@ -1024,7 +1462,7 @@
1024
  "type": "OpenTarget"
1025
  },
1026
  {
1027
- "name": "OpenTargets_get_chemical_probes_by_target_ensemblID",
1028
  "description": "Retrieve chemical probes associated with a specific target using its ensemblID.",
1029
  "parameter": {
1030
  "type": "object",
@@ -1037,6 +1475,35 @@
1037
  }
1038
  },
1039
  "query_schema": "\n query getTargetChemicalProbes($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n chemicalProbes {\n id\n control\n drugId\n mechanismOfAction\n isHighQuality\n origin\n probeMinerScore\n probesDrugsScore\n scoreInCells\n scoreInOrganisms\n targetFromSourceId\n urls {\n niceName\n url\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1040
  "label": [
1041
  "OpenTarget",
1042
  "Drug Information",
@@ -1046,7 +1513,7 @@
1046
  "type": "OpenTarget"
1047
  },
1048
  {
1049
- "name": "OpenTargets_drug_pharmacogenomics_data",
1050
  "description": "Retrieve pharmacogenomics data for a specific drug, including evidence levels and genotype annotations.",
1051
  "label": [
1052
  "Drug",
@@ -1084,12 +1551,53 @@
1084
  }
1085
  }
1086
  },
1087
- "query_schema": "\n query drugPharmacogenomicsData($chemblId: String!, $page: Pagination) {\n drug(chemblId: $chemblId) {\n id\n name\n pharmacogenomics(page: $page) {\n datasourceId\n datatypeId\n genotype\n evidenceLevel\n genotypeAnnotationText\n genotypeId\n haplotypeFromSourceId\n haplotypeId\n literature\n pgxCategory\n phenotypeFromSourceId\n phenotypeText\n studyId\n targetFromSourceId\n variantFunctionalConsequenceId\n variantRsId\n isDirectTarget\n variantFunctionalConsequence {\n id\n label\n }\n drugs {\n drugId\n drug {\n name\n }\n }\n target {\n id\n approvedSymbol\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1088
  "type": "OpenTarget"
1089
  },
1090
  {
1091
- "name": "OpenTargets_get_associated_drugs_by_target_ensemblID",
1092
- "description": "Get known drugs and information (e.g. id, name, MoA) associated with a specific target ensemblID, including clinical trial phase and mechanism of action of the drugs.",
1093
  "parameter": {
1094
  "type": "object",
1095
  "properties": {
@@ -1111,6 +1619,39 @@
1111
  }
1112
  },
1113
  "query_schema": "\n query targetKnownDrugs($ensemblId: String!, $size: Int!, $cursor: String) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n knownDrugs(size: $size, cursor: $cursor) {\n count\n rows {\n drug {\n id\n name\n tradeNames\n maximumClinicalTrialPhase\n isApproved\n hasBeenWithdrawn\n }\n phase\n status\n mechanismOfAction\n disease {\n id\n name\n }\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1114
  "label": [
1115
  "Target",
1116
  "Drug",
@@ -1122,7 +1663,7 @@
1122
  "type": "OpenTarget"
1123
  },
1124
  {
1125
- "name": "OpenTargets_get_associated_diseases_by_drug_chemblId",
1126
  "description": "Retrieve the list of diseases associated with a specific drug chemblId based on clinical trial data or post-marketed drugs.",
1127
  "parameter": {
1128
  "type": "object",
@@ -1135,6 +1676,35 @@
1135
  }
1136
  },
1137
  "query_schema": "\n query fetchLinkedDiseasesForDrug($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n linkedDiseases {\n count\n rows {\n id\n name\n description\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1138
  "label": [
1139
  "Drug",
1140
  "Disease",
@@ -1145,7 +1715,7 @@
1145
  "type": "OpenTarget"
1146
  },
1147
  {
1148
- "name": "OpenTargets_get_associated_targets_by_drug_chemblId",
1149
  "description": "Retrieve the list of targets linked to a specific drug chemblId based on its mechanism of action.",
1150
  "parameter": {
1151
  "type": "object",
@@ -1158,6 +1728,35 @@
1158
  }
1159
  },
1160
  "query_schema": "\n query fetchLinkedTargetsForDrug($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n linkedTargets {\n count\n rows {\n id\n approvedSymbol\n approvedName\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1161
  "label": [
1162
  "Drug",
1163
  "Target",
@@ -1168,7 +1767,7 @@
1168
  "type": "OpenTarget"
1169
  },
1170
  {
1171
- "name": "OpenTargets_multi_entity_search_by_query_string",
1172
  "description": "Perform a multi-entity search based on a query string, filtering by entity names and pagination settings.",
1173
  "parameter": {
1174
  "type": "object",
@@ -1206,6 +1805,53 @@
1206
  }
1207
  },
1208
  "query_schema": "\n query multiEntitySearch($queryString: String!, $entityNames: [String!], $page: Pagination) {\n search(queryString: $queryString, entityNames: $entityNames, page: $page) {\n total\n hits {\n id\n entity\n description\n name\n score\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1209
  "label": [
1210
  "Search and Mapping Functions",
1211
  "MultiEntitySearch",
@@ -1216,7 +1862,7 @@
1216
  "type": "OpenTarget"
1217
  },
1218
  {
1219
- "name": "OpenTargets_get_gene_ontology_terms_by_goID",
1220
  "description": "Retrieve Gene Ontology terms based on a list of GO IDs.",
1221
  "parameter": {
1222
  "type": "object",
@@ -1232,6 +1878,47 @@
1232
  }
1233
  },
1234
  "query_schema": "\n query fetchGeneOntologyTerms($goIds: [String!]!) {\n geneOntologyTerms(goIds: $goIds) {\n id\n name\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1235
  "label": [
1236
  "GeneOntology",
1237
  "Data Retrieval and Aggregation",
@@ -1241,7 +1928,7 @@
1241
  "type": "OpenTarget"
1242
  },
1243
  {
1244
- "name": "OpenTargets_get_target_constraint_info_by_ensemblID",
1245
  "description": "Retrieve genetic constraint information for a specific target ensemblID, including expected and observed values, and scores.",
1246
  "parameter": {
1247
  "type": "object",
@@ -1254,6 +1941,35 @@
1254
  }
1255
  },
1256
  "query_schema": "\n query targetConstraintInfo($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n geneticConstraint {\n constraintType\n exp\n obs\n oe\n oeLower\n oeUpper\n score\n upperBin\n upperBin6\n upperRank\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1257
  "label": [
1258
  "Target",
1259
  "Constraint",
@@ -1264,7 +1980,7 @@
1264
  "type": "OpenTarget"
1265
  },
1266
  {
1267
- "name": "OpenTargets_get_publications_by_disease_efoId",
1268
  "description": "Retrieve publications related to a disease efoId, including PubMed IDs and publication dates.",
1269
  "parameter": {
1270
  "type": "object",
@@ -1305,6 +2021,17 @@
1305
  }
1306
  },
1307
  "query_schema": "\n query entityPublications($entityId: String!, $additionalIds: [String!], $startYear: Int, $startMonth: Int, $endYear: Int, $endMonth: Int) {\n disease(efoId: $entityId) {\n id\n name\n literatureOcurrences(additionalIds: $additionalIds, startYear: $startYear, startMonth: $startMonth, endYear: $endYear, endMonth: $endMonth) {\n count\n filteredCount\n earliestPubYear\n rows {\n pmid\n pmcid\n publicationDate\n sentences {\n section\n matches {\n mappedId\n matchedLabel\n sectionStart\n sectionEnd\n startInSentence\n endInSentence\n matchedType\n }\n }\n }\n }\n }\n }\n ",
 
 
 
 
 
 
 
 
 
 
 
1308
  "label": [
1309
  "Publications",
1310
  "Data Retrieval and Aggregation",
@@ -1314,7 +2041,7 @@
1314
  "type": "OpenTarget"
1315
  },
1316
  {
1317
- "name": "OpenTargets_get_publications_by_target_ensemblID",
1318
  "description": "Retrieve publications related to a target ensemblID, including PubMed IDs and publication dates.",
1319
  "parameter": {
1320
  "type": "object",
@@ -1364,7 +2091,7 @@
1364
  "type": "OpenTarget"
1365
  },
1366
  {
1367
- "name": "OpenTargets_get_publications_by_drug_chemblId",
1368
  "description": "Retrieve publications related to a drug chemblId, including PubMed IDs and publication dates.",
1369
  "parameter": {
1370
  "type": "object",
@@ -1414,7 +2141,7 @@
1414
  "type": "OpenTarget"
1415
  },
1416
  {
1417
- "name": "OpenTargets_get_target_id_description_by_name",
1418
  "description": "Get the ensemblId and description based on the target name.",
1419
  "parameter": {
1420
  "type": "object",
@@ -1435,5 +2162,5 @@
1435
  "GraphQL"
1436
  ],
1437
  "type": "OpenTarget"
1438
- }
1439
  ]
 
1
  [
2
  {
3
+ "name": "get_associated_targets_by_disease_efoId",
4
  "description": "Find targets associated with a specific disease or phenotype based on efoId.",
5
  "label": [
6
  "Disease",
 
24
  "type": "OpenTarget"
25
  },
26
  {
27
+ "name": "get_associated_diseases_phenotypes_by_target_ensemblID",
28
  "description": "Find diseases or phenotypes associated with a specific target using ensemblId.",
29
  "label": [
30
  "Target",
 
48
  "type": "OpenTarget"
49
  },
50
  {
51
+ "name": "target_disease_evidence",
52
  "description": "Explore evidence that supports a specific target-disease association. Input is disease efoId and target ensemblID.",
53
  "label": [
54
  "Target",
 
77
  "type": "OpenTarget"
78
  },
79
  {
80
+ "name": "get_drug_warnings_by_chemblId",
81
  "description": "Retrieve warnings for a specific drug using ChEMBL ID.",
82
  "parameter": {
83
  "type": "object",
 
104
  "type": "OpenTarget"
105
  },
106
  {
107
+ "name": "get_drug_mechanisms_of_action_by_chemblId",
108
  "description": "Retrieve the mechanisms of action associated with a specific drug using chemblId.",
109
  "parameter": {
110
  "type": "object",
 
129
  "type": "OpenTarget"
130
  },
131
  {
132
+ "name": "get_associated_drugs_by_disease_efoId",
133
  "description": "Retrieve known drugs associated with a specific disease by disease efoId.",
134
  "parameter": {
135
  "type": "object",
 
147
  }
148
  },
149
  "query_schema": "\n query diseaseKnownDrugs($efoId: String!, $size: Int!, $freeTextQuery: String) {\n disease(efoId: $efoId) {\n id\n name\n knownDrugs(size: $size, freeTextQuery: $freeTextQuery) {\n count\n rows {\n drug {\n id\n name\n tradeNames\n maximumClinicalTrialPhase\n isApproved\n hasBeenWithdrawn\n }\n phase\n status\n mechanismOfAction\n target {\n id\n approvedSymbol\n }\n }\n }\n }\n }\n ",
150
+ "examples": [
151
+ {
152
+ "question": "Please list the drugs associated with the disease with efoId 'EFO_0005548' and filter by 'dopamine'.",
153
+ "query": {
154
+ "name": "get_associated_drugs_by_disease_efoId",
155
+ "arguments": {
156
+ "efoId": "EFO_0005548",
157
+ "size": 10,
158
+ "freeTextQuery": "dopamine"
159
+ }
160
+ }
161
+ }
162
+ ],
163
  "label": [
164
  "OpenTarget",
165
  "Disease",
 
170
  "type": "OpenTarget"
171
  },
172
  {
173
+ "name": "get_similar_entities_by_disease_efoId",
174
  "description": "Retrieve similar entities for a given disease efoId using a model trained with PubMed.",
175
  "parameter": {
176
  "type": "object",
 
204
  "type": "OpenTarget"
205
  },
206
  {
207
+ "name": "get_similar_entities_by_drug_chemblId",
208
  "description": "Retrieve similar entities for a given drug chemblId using a model trained with PubMed.",
209
  "parameter": {
210
  "type": "object",
 
238
  "type": "OpenTarget"
239
  },
240
  {
241
+ "name": "get_similar_entities_by_target_ensemblID",
242
  "description": "Retrieve similar entities for a given target ensemblID using a model trained with PubMed.",
243
  "parameter": {
244
  "type": "object",
 
272
  "type": "OpenTarget"
273
  },
274
  {
275
+ "name": "get_associated_phenotypes_by_disease_efoId",
276
  "description": "Find HPO phenotypes asosciated with the specified disease efoId.",
277
  "parameter": {
278
  "type": "object",
 
296
  "type": "OpenTarget"
297
  },
298
  {
299
+ "name": "get_drug_withdrawn_blackbox_status_by_chemblId",
300
  "description": "Find withdrawn and black-box warning statuses for a specific drug by chemblId.",
301
  "parameter": {
302
  "type": "object",
 
322
  "type": "OpenTarget"
323
  },
324
  {
325
+ "name": "search_category_counts_by_query_string",
326
  "description": "Get the count of entries in each entity category (disease, target, drug) based on a query string.",
327
  "parameter": {
328
  "type": "object",
 
347
  "type": "OpenTarget"
348
  },
349
  {
350
+ "name": "get_disease_id_description_by_name",
351
  "description": "Retrieve the efoId and additional details of a disease based on its name.",
352
  "parameter": {
353
  "type": "object",
 
372
  "type": "OpenTarget"
373
  },
374
  {
375
+ "name": "get_drug_id_description_by_name",
376
+ "description": "Fetch the drug chemblId and description based on the drug name.",
377
  "parameter": {
378
  "type": "object",
379
  "properties": {
 
396
  "type": "OpentargetToolDrugNameMatch"
397
  },
398
  {
399
+ "name": "get_drug_indications_by_chemblId",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  "description": "Fetch indications (treatable phenotypes/diseases) for a given drug chemblId.",
401
  "parameter": {
402
  "type": "object",
 
408
  }
409
  }
410
  },
411
+ "query_schema": "\n query drugIndications($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n indications {\n rows {\n disease {\n id\n name\n }\n maxPhaseForIndication\n references {\n source\n ids\n }\n }\n }\n }\n }\n ",
412
  "label": [
413
  "Drug",
414
  "Indications",
 
420
  "type": "OpenTarget"
421
  },
422
  {
423
+ "name": "get_target_gene_ontology_by_ensemblID",
424
  "description": "Retrieve Gene Ontology annotations for a specific target by Ensembl ID.",
425
  "parameter": {
426
  "type": "object",
 
433
  }
434
  },
435
  "query_schema": "\n query targetGeneOntology($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n geneOntology {\n aspect\n evidence\n geneProduct\n source\n term {\n id\n name\n }\n }\n }\n }\n ",
436
+ "examples": [
437
+ {
438
+ "question": "Can you retrieve the Gene Ontology annotations for the target with Ensembl ID 'ENSG00000136492'?",
439
+ "query": {
440
+ "name": "get_target_gene_ontology_by_ensemblID",
441
+ "arguments": {
442
+ "ensemblId": "ENSG00000136492"
443
+ }
444
+ }
445
+ },
446
+ {
447
+ "question": "What are the Gene Ontology annotations for the target identified by Ensembl ID 'ENSG00000138653'?",
448
+ "query": {
449
+ "name": "get_target_gene_ontology_by_ensemblID",
450
+ "arguments": {
451
+ "ensemblId": "ENSG00000138653"
452
+ }
453
+ }
454
+ },
455
+ {
456
+ "question": "Please provide the Gene Ontology annotations for the target with Ensembl ID 'ENSG00000186162'.",
457
+ "query": {
458
+ "name": "get_target_gene_ontology_by_ensemblID",
459
+ "arguments": {
460
+ "ensemblId": "ENSG00000186162"
461
+ }
462
+ }
463
+ }
464
+ ],
465
  "label": [
466
  "Target",
467
  "GeneOntology",
 
471
  "type": "OpenTarget"
472
  },
473
  {
474
+ "name": "get_target_homologues_by_ensemblID",
475
  "description": "Fetch homologues for a specific target by Ensembl ID.",
476
  "parameter": {
477
  "type": "object",
 
484
  }
485
  },
486
  "query_schema": "\n query targetHomologues($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n homologues {\n homologyType\n queryPercentageIdentity\n speciesId\n speciesName\n targetGeneId\n targetGeneSymbol\n targetPercentageIdentity\n isHighConfidence\n }\n }\n }\n ",
487
+ "examples": [
488
+ {
489
+ "question": "Can you fetch homologues for the target with Ensembl ID 'ENSG00000100033'?",
490
+ "query": {
491
+ "name": "get_target_homologues_by_ensemblID",
492
+ "arguments": {
493
+ "ensemblId": "ENSG00000100033"
494
+ }
495
+ }
496
+ },
497
+ {
498
+ "question": "What are the homologues for the target identified by Ensembl ID 'ENSG00000288534'?",
499
+ "query": {
500
+ "name": "get_target_homologues_by_ensemblID",
501
+ "arguments": {
502
+ "ensemblId": "ENSG00000288534"
503
+ }
504
+ }
505
+ },
506
+ {
507
+ "question": "Please provide the homologues for the target with Ensembl ID 'ENSG00000198937'.",
508
+ "query": {
509
+ "name": "get_target_homologues_by_ensemblID",
510
+ "arguments": {
511
+ "ensemblId": "ENSG00000198937"
512
+ }
513
+ }
514
+ }
515
+ ],
516
  "label": [
517
  "OpenTarget",
518
  "Target Information",
 
522
  "type": "OpenTarget"
523
  },
524
  {
525
+ "name": "get_target_safety_profile_by_ensemblID",
526
  "description": "Retrieve known target safety liabilities for a specific target Ensembl ID.",
527
  "parameter": {
528
  "type": "object",
 
535
  }
536
  },
537
  "query_schema": "\n query targetSafetyLiabilities($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n safetyLiabilities {\n event\n eventId\n biosamples {\n cellFormat\n cellLabel\n tissueLabel\n tissueId\n }\n effects {\n dosing\n direction\n }\n studies {\n name\n type\n description\n }\n datasource\n literature\n }\n }\n }\n ",
538
+ "examples": [
539
+ {
540
+ "question": "Can you provide the safety liabilities for the target with Ensembl ID 'ENSG00000175274'?",
541
+ "query": {
542
+ "name": "target_safety_liabilities",
543
+ "arguments": {
544
+ "ensemblId": "ENSG00000175274"
545
+ }
546
+ }
547
+ },
548
+ {
549
+ "question": "What are the known safety effects for the target identified by Ensembl ID 'ENSG00000226446'?",
550
+ "query": {
551
+ "name": "target_safety_liabilities",
552
+ "arguments": {
553
+ "ensemblId": "ENSG00000226446"
554
+ }
555
+ }
556
+ },
557
+ {
558
+ "question": "Please retrieve the safety risk information for the target with Ensembl ID 'ENSG00000151929'.",
559
+ "query": {
560
+ "name": "target_safety_liabilities",
561
+ "arguments": {
562
+ "ensemblId": "ENSG00000151929"
563
+ }
564
+ }
565
+ }
566
+ ],
567
  "label": [
568
  "Target",
569
  "SafetyLiability",
 
575
  "type": "OpenTarget"
576
  },
577
  {
578
+ "name": "get_biological_mouse_models_by_ensemblID",
579
  "description": "Retrieve biological mouse models, including allelic compositions and genetic backgrounds, for a specific target.",
580
  "parameter": {
581
  "type": "object",
 
588
  }
589
  },
590
  "query_schema": "\n query fetchBiologicalModels($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n mousePhenotypes {\n biologicalModels {\n allelicComposition\n geneticBackground\n id\n literature\n }\n }\n }\n }\n ",
591
+ "examples": [
592
+ {
593
+ "question": "What are the allelic compositions and genetic backgrounds for the target identified by Ensembl ID 'ENSG00000196639'?",
594
+ "query": {
595
+ "name": "get_biological_mouse_models_by_ensemblID",
596
+ "arguments": {
597
+ "ensemblId": "ENSG00000196639"
598
+ }
599
+ }
600
+ },
601
+ {
602
+ "question": "Please provide the biological models for the target with the Ensembl ID 'ENSG00000171862'.",
603
+ "query": {
604
+ "name": "get_biological_mouse_models_by_ensemblID",
605
+ "arguments": {
606
+ "ensemblId": "ENSG00000171862"
607
+ }
608
+ }
609
+ }
610
+ ],
611
  "label": [
612
  "OpenTarget",
613
  "Target Information",
 
617
  "type": "OpenTarget"
618
  },
619
  {
620
+ "name": "get_target_genomic_location_by_ensemblID",
621
  "description": "Retrieve genomic location data for a specific target, including chromosome, start, end, and strand.",
622
  "parameter": {
623
  "type": "object",
 
630
  }
631
  },
632
  "query_schema": "\n query targetGenomicLocation($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n genomicLocation {\n chromosome\n start\n end\n strand\n }\n }\n }\n ",
633
+ "examples": [
634
+ {
635
+ "question": "Can you provide the genomic location for the target with Ensembl ID 'ENSG00000114098'?",
636
+ "query": {
637
+ "name": "get_target_genomic_location_by_ensemblID",
638
+ "arguments": {
639
+ "ensemblId": "ENSG00000114098"
640
+ }
641
+ }
642
+ },
643
+ {
644
+ "question": "What is the genomic location data for the target identified by Ensembl ID 'ENSG00000231404'?",
645
+ "query": {
646
+ "name": "get_target_genomic_location_by_ensemblID",
647
+ "arguments": {
648
+ "ensemblId": "ENSG00000231404"
649
+ }
650
+ }
651
+ },
652
+ {
653
+ "question": "Please retrieve the genomic location information for the target with Ensembl ID 'ENSG00000167258'.",
654
+ "query": {
655
+ "name": "get_target_genomic_location_by_ensemblID",
656
+ "arguments": {
657
+ "ensemblId": "ENSG00000167258"
658
+ }
659
+ }
660
+ }
661
+ ],
662
  "label": [
663
  "Target",
664
  "GenomicLocation",
 
668
  "type": "OpenTarget"
669
  },
670
  {
671
+ "name": "get_target_subcellular_locations_by_ensemblID",
672
  "description": "Retrieve information about subcellular locations for a specific target ensemblID.",
673
  "parameter": {
674
  "type": "object",
 
681
  }
682
  },
683
  "query_schema": "\n query targetSubcellularLocations($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n subcellularLocations {\n location\n source\n termSL\n labelSL\n }\n }\n }\n ",
684
+ "examples": [
685
+ {
686
+ "question": "Can you provide the subcellular locations for the target with Ensembl ID 'ENSG00000121898'?",
687
+ "query": {
688
+ "name": "get_target_subcellular_locations_by_ensemblID",
689
+ "arguments": {
690
+ "ensemblId": "ENSG00000121898"
691
+ }
692
+ }
693
+ },
694
+ {
695
+ "question": "What are the subcellular locations for the target identified by Ensembl ID 'ENSG00000274286'?",
696
+ "query": {
697
+ "name": "get_target_subcellular_locations_by_ensemblID",
698
+ "arguments": {
699
+ "ensemblId": "ENSG00000274286"
700
+ }
701
+ }
702
+ },
703
+ {
704
+ "question": "Please retrieve the subcellular location information for the target with Ensembl ID 'ENSG00000171843'.",
705
+ "query": {
706
+ "name": "get_target_subcellular_locations_by_ensemblID",
707
+ "arguments": {
708
+ "ensemblId": "ENSG00000171843"
709
+ }
710
+ }
711
+ }
712
+ ],
713
  "label": [
714
  "Target",
715
  "Subcellular Locations",
 
719
  "type": "OpenTarget"
720
  },
721
  {
722
+ "name": "get_target_synonyms_by_ensemblID",
723
  "description": "Retrieve synonyms for specified target, including alternative names and symbols, using given ensemblID.",
724
  "parameter": {
725
  "type": "object",
 
732
  }
733
  },
734
  "query_schema": "\n query retrieveTargetSynonyms($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n synonyms {\n label\n source\n }\n symbolSynonyms {\n label\n source\n }\n nameSynonyms {\n label\n source\n }\n }\n }\n ",
735
+ "examples": [
736
+ {
737
+ "question": "Can you retrieve synonyms for the target with the Ensembl ID 'ENSG00000188986'?",
738
+ "query": {
739
+ "name": "get_target_synonyms_by_ensemblID",
740
+ "arguments": {
741
+ "ensemblId": "ENSG00000188986"
742
+ }
743
+ }
744
+ },
745
+ {
746
+ "question": "What are the alternative names and symbols for the target identified by Ensembl ID 'ENSG00000269335'?",
747
+ "query": {
748
+ "name": "get_target_synonyms_by_ensemblID",
749
+ "arguments": {
750
+ "ensemblId": "ENSG00000269335"
751
+ }
752
+ }
753
+ },
754
+ {
755
+ "question": "Please provide the synonyms for the target with Ensembl ID 'ENSG00000141052'.",
756
+ "query": {
757
+ "name": "get_target_synonyms_by_ensemblID",
758
+ "arguments": {
759
+ "ensemblId": "ENSG00000141052"
760
+ }
761
+ }
762
+ }
763
+ ],
764
  "label": [
765
  "OpenTarget",
766
  "Target Information",
 
770
  "type": "OpenTarget"
771
  },
772
  {
773
+ "name": "get_target_tractability_by_ensemblID",
774
  "description": "Retrieve tractability assessments, including modality and values, for a specific target ensembl ID.",
775
  "parameter": {
776
  "type": "object",
 
783
  }
784
  },
785
  "query_schema": "\n query targetTractabilityAssessment($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n tractability {\n label\n modality\n value\n }\n }\n }\n ",
786
+ "examples": [
787
+ {
788
+ "question": "Can you retrieve the tractability assessment for the target with Ensembl ID 'ENSG00000141736'?",
789
+ "query": {
790
+ "name": "get_target_tractability_by_ensemblID",
791
+ "arguments": {
792
+ "ensemblId": "ENSG00000141736"
793
+ }
794
+ }
795
+ },
796
+ {
797
+ "question": "What are the tractability assessments for the target identified by Ensembl ID 'ENSG00000169249'?",
798
+ "query": {
799
+ "name": "get_target_tractability_by_ensemblID",
800
+ "arguments": {
801
+ "ensemblId": "ENSG00000169249"
802
+ }
803
+ }
804
+ },
805
+ {
806
+ "question": "Please provide the tractability assessment details for the target with Ensembl ID 'ENSG00000122548'.",
807
+ "query": {
808
+ "name": "get_target_tractability_by_ensemblID",
809
+ "arguments": {
810
+ "ensemblId": "ENSG00000122548"
811
+ }
812
+ }
813
+ }
814
+ ],
815
  "label": [
816
  "Target",
817
  "Tractability",
 
822
  "type": "OpenTarget"
823
  },
824
  {
825
+ "name": "get_target_classes_by_ensemblID",
826
  "description": "Retrieve the target classes associated with a specific target ensemblID.",
827
  "parameter": {
828
  "type": "object",
 
835
  }
836
  },
837
  "query_schema": "\n query fetchTargetClasses($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n targetClass {\n id\n label\n level\n }\n }\n }\n ",
838
+ "examples": [
839
+ {
840
+ "question": "Can you retrieve the target classes for the target with Ensembl ID 'ENSG00000185324'?",
841
+ "query": {
842
+ "name": "get_target_classes_by_ensemblID",
843
+ "arguments": {
844
+ "ensemblId": "ENSG00000185324"
845
+ }
846
+ }
847
+ },
848
+ {
849
+ "question": "What are the target classes associated with the Ensembl ID 'ENSG00000141646'?",
850
+ "query": {
851
+ "name": "get_target_classes_by_ensemblID",
852
+ "arguments": {
853
+ "ensemblId": "ENSG00000141646"
854
+ }
855
+ }
856
+ },
857
+ {
858
+ "question": "Please provide the target classes for the target identified by Ensembl ID 'ENSG00000141736'.",
859
+ "query": {
860
+ "name": "get_target_classes_by_ensemblID",
861
+ "arguments": {
862
+ "ensemblId": "ENSG00000141736"
863
+ }
864
+ }
865
+ }
866
+ ],
867
  "label": [
868
  "OpenTarget",
869
  "Target Information",
 
873
  "type": "OpenTarget"
874
  },
875
  {
876
+ "name": "get_target_enabling_packages_by_ensemblID",
877
  "description": "Retrieve the Target Enabling Packages (TEP) associated with a specific target ensemblID.",
878
  "parameter": {
879
  "type": "object",
 
886
  }
887
  },
888
  "query_schema": "\n query fetchTargetEnablingPackages($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n tep {\n name\n uri\n therapeuticArea\n description\n }\n }\n }\n ",
889
+ "examples": [
890
+ {
891
+ "question": "Can you retrieve the Target Enabling Packages for the target with Ensembl ID 'ENSG00000167258'?",
892
+ "query": {
893
+ "name": "get_target_enabling_packages_by_ensemblID",
894
+ "arguments": {
895
+ "ensemblId": "ENSG00000167258"
896
+ }
897
+ }
898
+ }
899
+ ],
900
  "label": [
901
  "OpenTarget",
902
  "Target Information",
 
906
  "type": "OpenTarget"
907
  },
908
  {
909
+ "name": "get_target_interactions_by_ensemblID",
910
  "description": "Retrieve interaction data for a specific target ensemblID, including interaction partners and evidence.",
911
  "label": [
912
  "Target",
 
943
  }
944
  }
945
  },
946
+ "query_schema": "\n query targetInteractions($ensemblId: String!, $page: Pagination!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n interactions(page: $page) {\n count\n rows {\n intA\n targetA {\n id\n approvedSymbol\n }\n intB\n targetB {\n id\n approvedSymbol\n }\n score\n sourceDatabase\n evidences {\n evidenceScore\n pubmedId\n interactionDetectionMethodShortName\n }\n }\n }\n }\n }\n ",
947
+ "examples": [
948
+ {
949
+ "question": "Can you retrieve interaction data for the target with Ensembl ID 'ENSG00000134508' from the source database 'BioGRID'?",
950
+ "query": {
951
+ "name": "target_interactions",
952
+ "arguments": {
953
+ "ensemblId": "ENSG00000134508",
954
+ "page": {
955
+ "index": 1,
956
+ "size": 10
957
+ }
958
+ }
959
+ }
960
+ },
961
+ {
962
+ "question": "What are the interaction partners and evidence for the target identified by Ensembl ID 'ENSG00000276601'?",
963
+ "query": {
964
+ "name": "target_interactions",
965
+ "arguments": {
966
+ "ensemblId": "ENSG00000276601",
967
+ "page": {
968
+ "index": 2,
969
+ "size": 5
970
+ }
971
+ }
972
+ }
973
+ },
974
+ {
975
+ "question": "Please provide the interaction data for the target with Ensembl ID 'ENSG00000287061' on the first page with 20 items per page.",
976
+ "query": {
977
+ "name": "target_interactions",
978
+ "arguments": {
979
+ "ensemblId": "ENSG00000287061",
980
+ "page": {
981
+ "index": 1,
982
+ "size": 20
983
+ }
984
+ }
985
+ }
986
+ }
987
+ ],
988
  "type": "OpenTarget"
989
  },
990
  {
991
+ "name": "get_disease_ancestors_parents_by_efoId",
992
  "description": "Retrieve the disease ancestors and parents in the ontology using the disease EFO ID.",
993
  "parameter": {
994
  "type": "object",
 
1010
  "type": "OpenTarget"
1011
  },
1012
  {
1013
+ "name": "get_disease_descendants_children_by_efoId",
1014
  "description": "Retrieve the disease descendants and children in the ontology using the disease EFO ID.",
1015
  "parameter": {
1016
  "type": "object",
 
1032
  "type": "OpenTarget"
1033
  },
1034
  {
1035
+ "name": "get_disease_locations_by_efoId",
1036
  "description": "Retrieve the disease's direct location and indirect location disease terms and IDs using the disease EFO ID.",
1037
  "parameter": {
1038
  "type": "object",
 
1054
  "type": "OpenTarget"
1055
  },
1056
  {
1057
+ "name": "get_disease_synonyms_by_efoId",
1058
  "description": "Retrieve disease synonyms by its EFO ID.",
1059
  "parameter": {
1060
  "type": "object",
 
1076
  "type": "OpenTarget"
1077
  },
1078
  {
1079
+ "name": "get_disease_description_by_efoId",
1080
  "description": "Retrieve disease description, name, database cros references, obsolete terms, and whether it's a therapeutic area, all using the specified efoId.",
1081
  "parameter": {
1082
  "type": "object",
 
1089
  }
1090
  },
1091
  "query_schema": "\n query getDiseaseDetailsByEfoId($efoId: String!) {\n disease(efoId: $efoId) {\n id\n name\n description\n dbXRefs\n obsoleteTerms\n isTherapeuticArea\n }\n }\n ",
1092
+ "examples": [
1093
+ {
1094
+ "question": "Can you provide detailed information about the disease with the EFO ID 'MONDO_0000030'?",
1095
+ "query": {
1096
+ "name": "get_disease_description_by_efoId",
1097
+ "arguments": {
1098
+ "efoId": "MONDO_0000030"
1099
+ }
1100
+ }
1101
+ },
1102
+ {
1103
+ "question": "What are the details of the disease identified by the EFO ID 'EFO_0007468'?",
1104
+ "query": {
1105
+ "name": "get_disease_description_by_efoId",
1106
+ "arguments": {
1107
+ "efoId": "EFO_0007468"
1108
+ }
1109
+ }
1110
+ },
1111
+ {
1112
+ "question": "Please retrieve information about the disease with the EFO ID 'Orphanet_217563'.",
1113
+ "query": {
1114
+ "name": "get_disease_description_by_efoId",
1115
+ "arguments": {
1116
+ "efoId": "Orphanet_217563"
1117
+ }
1118
+ }
1119
+ }
1120
+ ],
1121
  "label": [
1122
  "OpenTarget",
1123
  "Disease",
 
1127
  "type": "OpenTarget"
1128
  },
1129
  {
1130
+ "name": "get_disease_therapeutic_areas_by_efoId",
1131
  "description": "Retrieve the therapeutic areas associated with a specific disease efoId.",
1132
  "parameter": {
1133
  "type": "object",
 
1140
  }
1141
  },
1142
  "query_schema": "\n query diseaseTherapeuticAreas($efoId: String!) {\n disease(efoId: $efoId) {\n id\n name\n therapeuticAreas {\n id\n name\n }\n }\n }\n ",
1143
+ "examples": [
1144
+ {
1145
+ "question": "What therapeutic areas are linked to the disease with the efoId 'MONDO_0016474'?",
1146
+ "query": {
1147
+ "name": "get_disease_therapeutic_areas_by_efoId",
1148
+ "arguments": {
1149
+ "efoId": "MONDO_0016474"
1150
+ }
1151
+ }
1152
+ },
1153
+ {
1154
+ "question": "Can you provide the therapeutic areas associated with the disease identified by efoId 'Orphanet_2579'?",
1155
+ "query": {
1156
+ "name": "get_disease_therapeutic_areas_by_efoId",
1157
+ "arguments": {
1158
+ "efoId": "Orphanet_2579"
1159
+ }
1160
+ }
1161
+ },
1162
+ {
1163
+ "question": "Please list the therapeutic areas for the disease with the efoId 'MONDO_0000873'.",
1164
+ "query": {
1165
+ "name": "get_disease_therapeutic_areas_by_efoId",
1166
+ "arguments": {
1167
+ "efoId": "MONDO_0000873"
1168
+ }
1169
+ }
1170
+ }
1171
+ ],
1172
  "label": [
1173
  "OpenTarget",
1174
  "Disease",
 
1178
  "type": "OpenTarget"
1179
  },
1180
  {
1181
+ "name": "get_drug_adverse_events_by_chemblId",
1182
  "description": "Retrieve significant adverse events reported for a specific drug chemblId.",
1183
  "parameter": {
1184
  "type": "object",
 
1207
  }
1208
  }
1209
  },
1210
+ "query_schema": "\n query drugAdverseEvents($chemblId: String!, $page: Pagination!) {\n drug(chemblId: $chemblId) {\n id\n name\n adverseEvents(page: $page) {\n count\n criticalValue\n rows {\n name\n meddraCode\n count\n logLR\n }\n }\n }\n }\n ",
1211
  "label": [
1212
  "Drug",
1213
  "AdverseEvents",
 
1221
  "type": "OpenTarget"
1222
  },
1223
  {
1224
+ "name": "get_known_drugs_by_drug_chemblId",
1225
  "description": "Get a list of known drugs and associated information using the specified chemblId.",
1226
  "parameter": {
1227
  "type": "object",
 
1243
  "type": "OpenTarget"
1244
  },
1245
  {
1246
+ "name": "get_parent_child_molecules_by_drug_chembl_ID",
1247
  "description": "Get parent and child molecules of specified drug chemblId.",
1248
  "parameter": {
1249
  "type": "object",
 
1265
  "type": "OpenTarget"
1266
  },
1267
  {
1268
+ "name": "get_approved_indications_by_drug_chemblId",
1269
  "description": "Retrieve detailed information about multiple drugs using a list of ChEMBL IDs.",
1270
  "parameter": {
1271
  "type": "object",
 
1287
  "type": "OpenTarget"
1288
  },
1289
  {
1290
+ "name": "get_drug_description_by_chemblId",
1291
  "description": "Get drug name, year of first approval, type, cross references, and max clinical trial phase based on specified chemblId.",
1292
  "parameter": {
1293
  "type": "object",
 
1309
  "type": "OpenTarget"
1310
  },
1311
  {
1312
+ "name": "get_drug_synonyms_by_chemblId",
1313
  "description": "Retrieve the synonyms associated with a specific drug chemblId.",
1314
  "parameter": {
1315
  "type": "object",
 
1322
  }
1323
  },
1324
  "query_schema": "\n query drugSynonyms($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n synonyms\n }\n }\n ",
1325
+ "examples": [
1326
+ {
1327
+ "question": "Can you provide the synonyms for the drug with ChEMBL ID 'CHEMBL2021430'?",
1328
+ "query": {
1329
+ "name": "drug_synget_drug_synonyms_by_chemblIdonyms",
1330
+ "arguments": {
1331
+ "chemblId": "CHEMBL2021430"
1332
+ }
1333
+ }
1334
+ },
1335
+ {
1336
+ "question": "What are the synonyms associated with the drug identified by ChEMBL ID 'CHEMBL295698'?",
1337
+ "query": {
1338
+ "name": "get_drug_synonyms_by_chemblId",
1339
+ "arguments": {
1340
+ "chemblId": "CHEMBL295698"
1341
+ }
1342
+ }
1343
+ },
1344
+ {
1345
+ "question": "Please list the synonyms for the drug that has the ChEMBL ID 'CHEMBL1084617'.",
1346
+ "query": {
1347
+ "name": "get_drug_synonyms_by_chemblId",
1348
+ "arguments": {
1349
+ "chemblId": "CHEMBL1084617"
1350
+ }
1351
+ }
1352
+ }
1353
+ ],
1354
  "label": [
1355
  "OpenTarget",
1356
  "Drug Information",
 
1360
  "type": "OpenTarget"
1361
  },
1362
  {
1363
+ "name": "get_drug_trade_names_by_chemblId",
1364
  "description": "Retrieve the trade names associated with a specific drug chemblId.",
1365
  "parameter": {
1366
  "type": "object",
 
1373
  }
1374
  },
1375
  "query_schema": "\n query drugTradeNames($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n tradeNames\n }\n }\n ",
1376
+ "examples": [
1377
+ {
1378
+ "question": "What are the trade names for the drug with ChEMBL ID 'CHEMBL25'?",
1379
+ "query": {
1380
+ "name": "get_drug_trade_names_by_chemblId",
1381
+ "arguments": {
1382
+ "chemblId": "CHEMBL25"
1383
+ }
1384
+ }
1385
+ },
1386
+ {
1387
+ "question": "Can you provide the trade names associated with the drug identified by ChEMBL ID 'CHEMBL1201613'?",
1388
+ "query": {
1389
+ "name": "get_drug_trade_names_by_chemblId",
1390
+ "arguments": {
1391
+ "chemblId": "CHEMBL1201613"
1392
+ }
1393
+ }
1394
+ },
1395
+ {
1396
+ "question": "Please list the trade names for the drug that has the ChEMBL ID 'CHEMBL3182621'.",
1397
+ "query": {
1398
+ "name": "get_drug_trade_names_by_chemblId",
1399
+ "arguments": {
1400
+ "chemblId": "CHEMBL3182621"
1401
+ }
1402
+ }
1403
+ }
1404
+ ],
1405
  "label": [
1406
  "Drug",
1407
  "OpenTarget",
 
1411
  "type": "OpenTarget"
1412
  },
1413
  {
1414
+ "name": "get_drug_approval_status_by_chemblId",
1415
  "description": "Retrieve the approval status of a specific drug chemblId.",
1416
  "parameter": {
1417
  "type": "object",
 
1424
  }
1425
  },
1426
  "query_schema": "\n query drugApprovalStatus($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n isApproved\n }\n }\n ",
1427
+ "examples": [
1428
+ {
1429
+ "question": "What is the approval status of the drug with ChEMBL ID 'CHEMBL2103799'?",
1430
+ "query": {
1431
+ "name": "get_drug_approval_status_by_chemblId",
1432
+ "arguments": {
1433
+ "chemblId": "CHEMBL2103799"
1434
+ }
1435
+ }
1436
+ },
1437
+ {
1438
+ "question": "Can you tell me if the drug identified by ChEMBL ID 'CHEMBL1684' is approved?",
1439
+ "query": {
1440
+ "name": "get_drug_approval_status_by_chemblId",
1441
+ "arguments": {
1442
+ "chemblId": "CHEMBL1684"
1443
+ }
1444
+ }
1445
+ },
1446
+ {
1447
+ "question": "Please provide the approval status for the drug with ChEMBL ID 'CHEMBL1086997'.",
1448
+ "query": {
1449
+ "name": "get_drug_approval_status_by_chemblId",
1450
+ "arguments": {
1451
+ "chemblId": "CHEMBL1086997"
1452
+ }
1453
+ }
1454
+ }
1455
+ ],
1456
  "label": [
1457
  "Drug",
1458
  "Drug Information",
 
1462
  "type": "OpenTarget"
1463
  },
1464
  {
1465
+ "name": "get_chemical_probes_by_target_ensemblID",
1466
  "description": "Retrieve chemical probes associated with a specific target using its ensemblID.",
1467
  "parameter": {
1468
  "type": "object",
 
1475
  }
1476
  },
1477
  "query_schema": "\n query getTargetChemicalProbes($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n chemicalProbes {\n id\n control\n drugId\n mechanismOfAction\n isHighQuality\n origin\n probeMinerScore\n probesDrugsScore\n scoreInCells\n scoreInOrganisms\n targetFromSourceId\n urls {\n niceName\n url\n }\n }\n }\n }\n ",
1478
+ "examples": [
1479
+ {
1480
+ "question": "Can you retrieve the chemical probes for the target with Ensembl ID 'ENSG00000163515'?",
1481
+ "query": {
1482
+ "name": "get_chemical_probes_by_target_ensemblID",
1483
+ "arguments": {
1484
+ "ensemblId": "ENSG00000163515"
1485
+ }
1486
+ }
1487
+ },
1488
+ {
1489
+ "question": "What chemical probes are associated with the target identified by Ensembl ID 'ENSG00000157916'?",
1490
+ "query": {
1491
+ "name": "get_chemical_probes_by_target_ensemblID",
1492
+ "arguments": {
1493
+ "ensemblId": "ENSG00000157916"
1494
+ }
1495
+ }
1496
+ },
1497
+ {
1498
+ "question": "Please list the chemical probes linked to the target with Ensembl ID 'ENSG00000253563'.",
1499
+ "query": {
1500
+ "name": "get_chemical_probes_by_target_ensemblID",
1501
+ "arguments": {
1502
+ "ensemblId": "ENSG00000253563"
1503
+ }
1504
+ }
1505
+ }
1506
+ ],
1507
  "label": [
1508
  "OpenTarget",
1509
  "Drug Information",
 
1513
  "type": "OpenTarget"
1514
  },
1515
  {
1516
+ "name": "drug_pharmacogenomics_data",
1517
  "description": "Retrieve pharmacogenomics data for a specific drug, including evidence levels and genotype annotations.",
1518
  "label": [
1519
  "Drug",
 
1551
  }
1552
  }
1553
  },
1554
+ "query_schema": "\n query drugPharmacogenomicsData($chemblId: String!, $page: Pagination!) {\n drug(chemblId: $chemblId) {\n id\n name\n pharmacogenomics(page: $page) {\n datasourceId\n datatypeId\n genotype\n evidenceLevel\n genotypeAnnotationText\n genotypeId\n haplotypeFromSourceId\n haplotypeId\n literature\n pgxCategory\n phenotypeFromSourceId\n phenotypeText\n studyId\n targetFromSourceId\n variantFunctionalConsequenceId\n variantRsId\n isDirectTarget\n variantFunctionalConsequence {\n id\n label\n }\n drugs {\n drugId\n drug {\n name\n }\n }\n target {\n id\n approvedSymbol\n }\n }\n }\n }\n ",
1555
+ "examples": [
1556
+ {
1557
+ "question": "Can you provide the pharmacogenomics data for the drug with ChEMBL ID 'CHEMBL23261'?",
1558
+ "query": {
1559
+ "name": "drug_pharmacogenomics_data",
1560
+ "arguments": {
1561
+ "chemblId": "CHEMBL23261",
1562
+ "page": {
1563
+ "index": 1,
1564
+ "size": 10
1565
+ }
1566
+ }
1567
+ }
1568
+ },
1569
+ {
1570
+ "question": "What are the genotype annotations and evidence levels for the drug identified by ChEMBL ID 'CHEMBL1497'?",
1571
+ "query": {
1572
+ "name": "drug_pharmacogenomics_data",
1573
+ "arguments": {
1574
+ "chemblId": "CHEMBL1497",
1575
+ "page": {
1576
+ "index": 2,
1577
+ "size": 5
1578
+ }
1579
+ }
1580
+ }
1581
+ },
1582
+ {
1583
+ "question": "Retrieve the pharmacogenomics data for the drug with ChEMBL ID 'CHEMBL4455124', including evidence levels.",
1584
+ "query": {
1585
+ "name": "drug_pharmacogenomics_data",
1586
+ "arguments": {
1587
+ "chemblId": "CHEMBL4455124",
1588
+ "page": {
1589
+ "index": 3,
1590
+ "size": 15
1591
+ }
1592
+ }
1593
+ }
1594
+ }
1595
+ ],
1596
  "type": "OpenTarget"
1597
  },
1598
  {
1599
+ "name": "get_associated_drugs_by_target_ensemblID",
1600
+ "description": "Get known drugs associated with a specific target ensemblID, including clinical trial phase and mechanism of action of the drugs.",
1601
  "parameter": {
1602
  "type": "object",
1603
  "properties": {
 
1619
  }
1620
  },
1621
  "query_schema": "\n query targetKnownDrugs($ensemblId: String!, $size: Int!, $cursor: String) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n knownDrugs(size: $size, cursor: $cursor) {\n count\n rows {\n drug {\n id\n name\n tradeNames\n maximumClinicalTrialPhase\n isApproved\n hasBeenWithdrawn\n }\n phase\n status\n mechanismOfAction\n disease {\n id\n name\n }\n }\n }\n }\n }\n ",
1622
+ "examples": [
1623
+ {
1624
+ "question": "Can you retrieve known drugs associated with the target having Ensembl ID 'ENSG00000141736' and fetch 10 entries?",
1625
+ "query": {
1626
+ "name": "get_associated_drugs_by_target_ensemblID",
1627
+ "arguments": {
1628
+ "ensemblId": "ENSG00000141736",
1629
+ "size": 10
1630
+ }
1631
+ }
1632
+ },
1633
+ {
1634
+ "question": "What are the known drugs for the target with Ensembl ID 'ENSG00000184182', and can you provide 5 entries?",
1635
+ "query": {
1636
+ "name": "get_associated_drugs_by_target_ensemblID",
1637
+ "arguments": {
1638
+ "ensemblId": "ENSG00000184182",
1639
+ "size": 5
1640
+ }
1641
+ }
1642
+ },
1643
+ {
1644
+ "question": "Please list the known drugs associated with the target identified by Ensembl ID 'ENSG00000104884', and fetch 15 entries. Use the cursor 'abc123' for pagination.",
1645
+ "query": {
1646
+ "name": "get_associated_drugs_by_target_ensemblID",
1647
+ "arguments": {
1648
+ "ensemblId": "ENSG00000104884",
1649
+ "size": 15,
1650
+ "cursor": "abc123"
1651
+ }
1652
+ }
1653
+ }
1654
+ ],
1655
  "label": [
1656
  "Target",
1657
  "Drug",
 
1663
  "type": "OpenTarget"
1664
  },
1665
  {
1666
+ "name": "get_associated_diseases_by_drug_chemblId",
1667
  "description": "Retrieve the list of diseases associated with a specific drug chemblId based on clinical trial data or post-marketed drugs.",
1668
  "parameter": {
1669
  "type": "object",
 
1676
  }
1677
  },
1678
  "query_schema": "\n query fetchLinkedDiseasesForDrug($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n linkedDiseases {\n count\n rows {\n id\n name\n description\n }\n }\n }\n }\n ",
1679
+ "examples": [
1680
+ {
1681
+ "question": "Can you retrieve the list of diseases linked to the drug with ChEMBL ID 'CHEMBL3137349'?",
1682
+ "query": {
1683
+ "name": "get_associated_diseases_by_drug_chemblId",
1684
+ "arguments": {
1685
+ "chemblId": "CHEMBL3137349"
1686
+ }
1687
+ }
1688
+ },
1689
+ {
1690
+ "question": "What diseases are associated with the drug identified by ChEMBL ID 'CHEMBL1389'?",
1691
+ "query": {
1692
+ "name": "get_associated_diseases_by_drug_chemblId",
1693
+ "arguments": {
1694
+ "chemblId": "CHEMBL1389"
1695
+ }
1696
+ }
1697
+ },
1698
+ {
1699
+ "question": "Please provide the diseases linked to the drug that has the ChEMBL ID 'CHEMBL2109266'.",
1700
+ "query": {
1701
+ "name": "get_associated_diseases_by_drug_chemblId",
1702
+ "arguments": {
1703
+ "chemblId": "CHEMBL2109266"
1704
+ }
1705
+ }
1706
+ }
1707
+ ],
1708
  "label": [
1709
  "Drug",
1710
  "Disease",
 
1715
  "type": "OpenTarget"
1716
  },
1717
  {
1718
+ "name": "get_associated_targets_by_drug_chemblId",
1719
  "description": "Retrieve the list of targets linked to a specific drug chemblId based on its mechanism of action.",
1720
  "parameter": {
1721
  "type": "object",
 
1728
  }
1729
  },
1730
  "query_schema": "\n query fetchLinkedTargetsForDrug($chemblId: String!) {\n drug(chemblId: $chemblId) {\n id\n name\n linkedTargets {\n count\n rows {\n id\n approvedSymbol\n approvedName\n }\n }\n }\n }\n ",
1731
+ "examples": [
1732
+ {
1733
+ "question": "Can you retrieve the list of targets linked to the drug with ChEMBL ID 'CHEMBL459008'?",
1734
+ "query": {
1735
+ "name": "get_associated_targets_by_drug_chemblId",
1736
+ "arguments": {
1737
+ "chemblId": "CHEMBL459008"
1738
+ }
1739
+ }
1740
+ },
1741
+ {
1742
+ "question": "What are the targets associated with the drug identified by ChEMBL ID 'CHEMBL1800955'?",
1743
+ "query": {
1744
+ "name": "get_associated_targets_by_drug_chemblId",
1745
+ "arguments": {
1746
+ "chemblId": "CHEMBL1800955"
1747
+ }
1748
+ }
1749
+ },
1750
+ {
1751
+ "question": "Please provide the list of targets for the drug with ChEMBL ID 'CHEMBL32'.",
1752
+ "query": {
1753
+ "name": "get_associated_targets_by_drug_chemblId",
1754
+ "arguments": {
1755
+ "chemblId": "CHEMBL32"
1756
+ }
1757
+ }
1758
+ }
1759
+ ],
1760
  "label": [
1761
  "Drug",
1762
  "Target",
 
1767
  "type": "OpenTarget"
1768
  },
1769
  {
1770
+ "name": "multi_entity_search_by_query_string",
1771
  "description": "Perform a multi-entity search based on a query string, filtering by entity names and pagination settings.",
1772
  "parameter": {
1773
  "type": "object",
 
1805
  }
1806
  },
1807
  "query_schema": "\n query multiEntitySearch($queryString: String!, $entityNames: [String!], $page: Pagination) {\n search(queryString: $queryString, entityNames: $entityNames, page: $page) {\n total\n hits {\n id\n entity\n description\n name\n score\n }\n }\n }\n ",
1808
+ "examples": [
1809
+ {
1810
+ "question": "Can you search for information on the drug 'Aspirin' and the disease 'Hypertension'?",
1811
+ "query": {
1812
+ "name": "multi_entity_search_by_query_string",
1813
+ "arguments": {
1814
+ "queryString": "Aspirin Hypertension",
1815
+ "entityNames": [
1816
+ "drug",
1817
+ "disease"
1818
+ ],
1819
+ "page": {
1820
+ "index": 1,
1821
+ "size": 10
1822
+ }
1823
+ }
1824
+ }
1825
+ },
1826
+ {
1827
+ "question": "Please find details about the target 'BRCA1' with pagination settings of index 2 and size 5.",
1828
+ "query": {
1829
+ "name": "multi_entity_search_by_query_string",
1830
+ "arguments": {
1831
+ "queryString": "BRCA1",
1832
+ "entityNames": [
1833
+ "target"
1834
+ ],
1835
+ "page": {
1836
+ "index": 2,
1837
+ "size": 5
1838
+ }
1839
+ }
1840
+ }
1841
+ },
1842
+ {
1843
+ "question": "What information is available for the disease 'Diabetes'?",
1844
+ "query": {
1845
+ "name": "multi_entity_search_by_query_string",
1846
+ "arguments": {
1847
+ "queryString": "Diabetes",
1848
+ "entityNames": [
1849
+ "disease"
1850
+ ]
1851
+ }
1852
+ }
1853
+ }
1854
+ ],
1855
  "label": [
1856
  "Search and Mapping Functions",
1857
  "MultiEntitySearch",
 
1862
  "type": "OpenTarget"
1863
  },
1864
  {
1865
+ "name": "get_gene_ontology_terms_by_goID",
1866
  "description": "Retrieve Gene Ontology terms based on a list of GO IDs.",
1867
  "parameter": {
1868
  "type": "object",
 
1878
  }
1879
  },
1880
  "query_schema": "\n query fetchGeneOntologyTerms($goIds: [String!]!) {\n geneOntologyTerms(goIds: $goIds) {\n id\n name\n }\n }\n ",
1881
+ "examples": [
1882
+ {
1883
+ "question": "Can you retrieve the Gene Ontology terms for the GO IDs 'GO:0008150' and 'GO:0003674'?",
1884
+ "query": {
1885
+ "name": "fetch_gene_ontology_terms",
1886
+ "arguments": {
1887
+ "goIds": [
1888
+ "GO:0008150",
1889
+ "GO:0003674"
1890
+ ]
1891
+ }
1892
+ }
1893
+ },
1894
+ {
1895
+ "question": "What are the Gene Ontology terms associated with the GO IDs 'GO:0005575', 'GO:0003674', and 'GO:0008150'?",
1896
+ "query": {
1897
+ "name": "fetch_gene_ontology_terms",
1898
+ "arguments": {
1899
+ "goIds": [
1900
+ "GO:0005575",
1901
+ "GO:0003674",
1902
+ "GO:0008150"
1903
+ ]
1904
+ }
1905
+ }
1906
+ },
1907
+ {
1908
+ "question": "Please provide the Gene Ontology terms for the following GO IDs: 'GO:0008150', 'GO:0003674', 'GO:0005575', and 'GO:0003677'.",
1909
+ "query": {
1910
+ "name": "fetch_gene_ontology_terms",
1911
+ "arguments": {
1912
+ "goIds": [
1913
+ "GO:0008150",
1914
+ "GO:0003674",
1915
+ "GO:0005575",
1916
+ "GO:0003677"
1917
+ ]
1918
+ }
1919
+ }
1920
+ }
1921
+ ],
1922
  "label": [
1923
  "GeneOntology",
1924
  "Data Retrieval and Aggregation",
 
1928
  "type": "OpenTarget"
1929
  },
1930
  {
1931
+ "name": "get_target_constraint_info_by_ensemblID",
1932
  "description": "Retrieve genetic constraint information for a specific target ensemblID, including expected and observed values, and scores.",
1933
  "parameter": {
1934
  "type": "object",
 
1941
  }
1942
  },
1943
  "query_schema": "\n query targetConstraintInfo($ensemblId: String!) {\n target(ensemblId: $ensemblId) {\n id\n approvedSymbol\n geneticConstraint {\n constraintType\n exp\n obs\n oe\n oeLower\n oeUpper\n score\n upperBin\n upperBin6\n upperRank\n }\n }\n }\n ",
1944
+ "examples": [
1945
+ {
1946
+ "question": "Can you provide the genetic constraint information for the target with Ensembl ID 'ENSG00000135476'?",
1947
+ "query": {
1948
+ "name": "target_constraint_info",
1949
+ "arguments": {
1950
+ "ensemblId": "ENSG00000135476"
1951
+ }
1952
+ }
1953
+ },
1954
+ {
1955
+ "question": "What are the expected and observed values, and scores for the target identified by Ensembl ID 'ENSG00000290763'?",
1956
+ "query": {
1957
+ "name": "target_constraint_info",
1958
+ "arguments": {
1959
+ "ensemblId": "ENSG00000290763"
1960
+ }
1961
+ }
1962
+ },
1963
+ {
1964
+ "question": "Please retrieve the genetic constraint details for the target with Ensembl ID 'ENSG00000109906'.",
1965
+ "query": {
1966
+ "name": "target_constraint_info",
1967
+ "arguments": {
1968
+ "ensemblId": "ENSG00000109906"
1969
+ }
1970
+ }
1971
+ }
1972
+ ],
1973
  "label": [
1974
  "Target",
1975
  "Constraint",
 
1980
  "type": "OpenTarget"
1981
  },
1982
  {
1983
+ "name": "get_publications_by_disease_efoId",
1984
  "description": "Retrieve publications related to a disease efoId, including PubMed IDs and publication dates.",
1985
  "parameter": {
1986
  "type": "object",
 
2021
  }
2022
  },
2023
  "query_schema": "\n query entityPublications($entityId: String!, $additionalIds: [String!], $startYear: Int, $startMonth: Int, $endYear: Int, $endMonth: Int) {\n disease(efoId: $entityId) {\n id\n name\n literatureOcurrences(additionalIds: $additionalIds, startYear: $startYear, startMonth: $startMonth, endYear: $endYear, endMonth: $endMonth) {\n count\n filteredCount\n earliestPubYear\n rows {\n pmid\n pmcid\n publicationDate\n sentences {\n section\n matches {\n mappedId\n matchedLabel\n sectionStart\n sectionEnd\n startInSentence\n endInSentence\n matchedType\n }\n }\n }\n }\n }\n }\n ",
2024
+ "examples": [
2025
+ {
2026
+ "question": "Can you retrieve publications related to the entity with ID 'EFO_0000400'?",
2027
+ "query": {
2028
+ "name": "get_publications_by_disease_efoId",
2029
+ "arguments": {
2030
+ "entityId": "EFO_0000400"
2031
+ }
2032
+ }
2033
+ }
2034
+ ],
2035
  "label": [
2036
  "Publications",
2037
  "Data Retrieval and Aggregation",
 
2041
  "type": "OpenTarget"
2042
  },
2043
  {
2044
+ "name": "get_publications_by_target_ensemblID",
2045
  "description": "Retrieve publications related to a target ensemblID, including PubMed IDs and publication dates.",
2046
  "parameter": {
2047
  "type": "object",
 
2091
  "type": "OpenTarget"
2092
  },
2093
  {
2094
+ "name": "get_publications_by_drug_chemblId",
2095
  "description": "Retrieve publications related to a drug chemblId, including PubMed IDs and publication dates.",
2096
  "parameter": {
2097
  "type": "object",
 
2141
  "type": "OpenTarget"
2142
  },
2143
  {
2144
+ "name": "get_target_id_description_by_name",
2145
  "description": "Get the ensemblId and description based on the target name.",
2146
  "parameter": {
2147
  "type": "object",
 
2162
  "GraphQL"
2163
  ],
2164
  "type": "OpenTarget"
2165
+ }
2166
  ]
requirements.txt DELETED
@@ -1,22 +0,0 @@
1
- # requirements.txt
2
-
3
- # Core Gradio UI (locks to 5.x series)
4
- gradio>=5.0,<6.0
5
-
6
- # Popup modal component (ensure correct name and version)
7
- gradio-modal>=0.0.4
8
-
9
- #Display PDFs
10
- gradio_pdf
11
-
12
- # HF Hub client (latest stable)
13
- huggingface-hub>=0.30.2,<0.31
14
-
15
- # Google Sheets API client
16
- gspread
17
-
18
- # Google API Authentication (older library, used by import)
19
- oauth2client
20
-
21
- # Data Manipulation
22
- pandas
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
specialties.json CHANGED
@@ -22,10 +22,10 @@
22
  "Occupational and Environmental Medicine",
23
  "Ophthalmology",
24
  "Orthopaedic Surgery",
25
- "Otolaryngology - Head and Neck Surgery",
26
- "Pathology - Anatomic",
27
- "Pathology - Anatomic/Pathology - Clinical",
28
- "Pathology - Clinical",
29
  "Pediatrics",
30
  "Physical Medicine and Rehabilitation",
31
  "Plastic Surgery",
@@ -34,6 +34,5 @@
34
  "Radiation Oncology",
35
  "Thoracic and Cardiac Surgery",
36
  "Urology",
37
- "Vascular Surgery",
38
- "None"
39
  ]
 
22
  "Occupational and Environmental Medicine",
23
  "Ophthalmology",
24
  "Orthopaedic Surgery",
25
+ "Otolaryngology – Head and Neck Surgery",
26
+ "Pathology – Anatomic",
27
+ "Pathology – Anatomic/Pathology - Clinical",
28
+ "Pathology – Clinical",
29
  "Pediatrics",
30
  "Physical Medicine and Rehabilitation",
31
  "Plastic Surgery",
 
34
  "Radiation Oncology",
35
  "Thoracic and Cardiac Surgery",
36
  "Urology",
37
+ "Vascular Surgery"
 
38
  ]
static/.DS_Store CHANGED
Binary files a/static/.DS_Store and b/static/.DS_Store differ
 
anatomyofAgentResponse.pptx β†’ static/videos/q1.mov RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:860a54406dc4d332816d6ce27233fe7a9984a95f2032bd507cf9a0fb93f17119
3
- size 1762199
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be15d1434a160fc61b3356e5e8726df4fb03d29803ef61e403e1707d4c073073
3
+ size 12706109
anatomyofAgentResponse.jpg β†’ static/videos/q2.mov RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:46d35f4caddb77d871b09ce05ba1597da670fbed42e057160c9cf081e2053be6
3
- size 1037703
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db687353d3c93ebaeec106f076d6a0f0cfdbd8ce27c903fc2b2444319451de25
3
+ size 9454145
static/videos/q3.mov ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:112cf7ccb9ab3daa6445d08aefcca5eb3119c7a3fea8e90b5d201dd4cd6560f5
3
+ size 14471995
subspecialties.json CHANGED
@@ -38,7 +38,7 @@
38
  "Infectious Disease",
39
  "Internal Medicine-Critical Care Medicine",
40
  "Interventional Cardiology",
41
- "Maternal-Fetal Medicine",
42
  "Medical Biochemical Genetics",
43
  "Medical Oncology",
44
  "Medical Toxicology",
@@ -55,11 +55,11 @@
55
  "Nuclear Radiology",
56
  "Orthopaedic Sports Medicine",
57
  "Pain Medicine",
58
- "Pathology - Chemical",
59
- "Pathology - Forensic",
60
- "Pathology - Medical Microbiology",
61
- "Pathology - Molecular Genetic",
62
- "Pathology - Pediatric",
63
  "Pediatric Anesthesiology",
64
  "Pediatric Cardiology",
65
  "Pediatric Critical Care Medicine",
@@ -90,6 +90,5 @@
90
  "Transplant Hepatology",
91
  "Undersea and Hyperbaric Medicine",
92
  "Urogynecology and Reconstructive Pelvic Surgery",
93
- "Vascular Neurology",
94
- "None"
95
  ]
 
38
  "Infectious Disease",
39
  "Internal Medicine-Critical Care Medicine",
40
  "Interventional Cardiology",
41
+ "Maternal–Fetal Medicine",
42
  "Medical Biochemical Genetics",
43
  "Medical Oncology",
44
  "Medical Toxicology",
 
55
  "Nuclear Radiology",
56
  "Orthopaedic Sports Medicine",
57
  "Pain Medicine",
58
+ "Pathology – Chemical",
59
+ "Pathology – Forensic",
60
+ "Pathology – Medical Microbiology",
61
+ "Pathology – Molecular Genetic",
62
+ "Pathology – Pediatric",
63
  "Pediatric Anesthesiology",
64
  "Pediatric Cardiology",
65
  "Pediatric Critical Care Medicine",
 
90
  "Transplant Hepatology",
91
  "Undersea and Hyperbaric Medicine",
92
  "Urogynecology and Reconstructive Pelvic Surgery",
93
+ "Vascular Neurology"
 
94
  ]
tool_lists/chembl_tools.json DELETED
@@ -1,16 +0,0 @@
1
- [
2
- {
3
- "type": "ChEMBLTool",
4
- "name": "ChEMBL_search_similar_molecules",
5
- "description": "Search for molecules similar to a given SMILES, chembl_id, or compound or drug name, using the ChEMBL Web Services.",
6
- "parameter": {
7
- "type": "object",
8
- "properties": {
9
- "query": { "type": "string", "description": "SMILES string, chembl_id, or compound or drug name." },
10
- "similarity_threshold": { "type": "integer", "description": "Similarity threshold (0–100).", "default": 80 },
11
- "max_results": { "type": "integer", "description": "Maximum number of results to return.", "default": 20 }
12
- },
13
- "required": ["query"]
14
- }
15
- }
16
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tool_lists/efo_tools.json DELETED
@@ -1,17 +0,0 @@
1
- [
2
- {
3
- "type": "EFOTool",
4
- "name": "OSL_get_efo_id_by_disease_name",
5
- "description": "Tool to lookup Experimental Factor Ontology (EFO) IDs for diseases via the EMBL-EBI OLS API.",
6
- "parameter": {
7
- "type": "object",
8
- "properties": {
9
- "disease": {
10
- "type": "string",
11
- "description": "Search query for diseases. Provide the disease name to lookup the corresponding EFO ID."
12
- }
13
- },
14
- "required": ["disease"]
15
- }
16
- }
17
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tool_lists/europe_pmc_tools.json DELETED
@@ -1,22 +0,0 @@
1
- [
2
- {
3
- "type": "EuropePMCTool",
4
- "name": "EuropePMC_search_articles",
5
- "description": "Search for articles on Europe PMC including abstracts. The tool queries the Europe PMC web service using provided keywords and returns articles with details such as title, abstract, journal, publication year, and a URL to the full article.",
6
- "parameter": {
7
- "type": "object",
8
- "properties": {
9
- "query": {
10
- "type": "string",
11
- "description": "Search query for Europe PMC. Use keywords separated by spaces to refine your search."
12
- },
13
- "limit": {
14
- "type": "integer",
15
- "description": "Number of articles to return. This sets the maximum number of articles retrieved from Europe PMC.",
16
- "default": 5
17
- }
18
- },
19
- "required": ["query"]
20
- }
21
- }
22
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tool_lists/fda_drug_adverse_event_tools.json DELETED
@@ -1,491 +0,0 @@
1
- [
2
- {
3
- "type": "FDADrugAdverseEventTool",
4
- "name": "FAERS_count_reactions_by_drug_event",
5
- "description": "Count the number of adverse reactions reported for a given drug, filtered by patient details, event seriousness, and reaction outcomes. Data source: FDA Adverse Event Reporting System (FAERS).",
6
- "parameter": {
7
- "type": "object",
8
- "properties": {
9
- "medicinalproduct": { "type": "string", "description": "Drug name." },
10
- "patient.patientsex": { "type": "string", "enum": ["Male", "Female"], "description": "Patient sex, leave it blank if you don't want to apply a filter." },
11
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate", "Infant", "Child", "Adolescent", "Adult", "Elderly"], "description": "Patient age group." },
12
- "occurcountry": { "type": "string", "pattern": "^[A-Z]{2}$", "description": "Country where event occurred." },
13
- "serious": { "type": "string", "enum": ["Yes","No"], "description": "Whether the event was serious." },
14
- "seriousnessdeath": { "type": "string", "enum": ["Yes", "No"], "description": "Was death reported?" }
15
- },
16
- "required": ["medicinalproduct"]
17
- },
18
- "fields": {
19
- "search_fields": {
20
- "medicinalproduct": ["patient.drug.medicinalproduct"],
21
- "patient.patientsex": ["patient.patientsex"],
22
- "patient.patientagegroup": ["patient.patientagegroup"],
23
- "occurcountry": ["occurcountry"],
24
- "serious": ["serious"],
25
- "seriousnessdeath": ["seriousnessdeath"]
26
- },
27
- "return_fields": ["patient.reaction.reactionmeddrapt.exact"]
28
- }
29
- },
30
- {
31
- "type": "FDADrugAdverseEventTool",
32
- "name": "FAERS_count_drugs_by_drug_event",
33
- "description": "Count the number of different drugs involved in FDA adverse event reports, filtered by patient details, country, and seriousness. Data source: FDA Adverse Event Reporting System (FAERS).",
34
- "parameter": {
35
- "type": "object",
36
- "properties": {
37
- "patient.patientsex": { "type": "string", "enum": ["Male", "Female"], "description": "Patient sex, leave it blank if you don't want to apply a filter." },
38
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate", "Infant", "Child", "Adolescent", "Adult", "Elderly"], "description": "Patient age group." },
39
- "occurcountry": { "type": "string", "pattern": "^[A-Z]{2}$", "description": "Country where event occurred." },
40
- "serious": { "type": "string", "enum": ["Yes","No"], "description": "Whether the event was serious." }
41
- },
42
- "required": []
43
- },
44
- "fields": {
45
- "search_fields": {
46
- "patient.patientsex": ["patient.patientsex"],
47
- "patient.patientagegroup": ["patient.patientagegroup"],
48
- "occurcountry": ["occurcountry"],
49
- "serious": ["serious"]
50
- },
51
- "return_fields": ["patient.drug.medicinalproduct.exact"]
52
- }
53
- },
54
- {
55
- "type": "FDADrugAdverseEventTool",
56
- "name": "FAERS_count_country_by_drug_event",
57
- "description": "Count the number of adverse event reports per country of occurrence, filtered by drug, patient demographics, and seriousness. Data source: FDA Adverse Event Reporting System (FAERS).",
58
- "parameter": {
59
- "type": "object",
60
- "properties": {
61
- "medicinalproduct": { "type": "string", "description": "Drug name." },
62
- "patient.patientsex": { "type": "string", "enum": ["Male", "Female"], "description": "Patient sex, leave it blank if you don't want to apply a filter." },
63
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate", "Infant", "Child", "Adolescent", "Adult", "Elderly"], "description": "Patient age group." },
64
- "serious": { "type": "string", "enum": ["Yes","No"], "description": "Whether the event was serious." }
65
- },
66
- "required": []
67
- },
68
- "fields": {
69
- "search_fields": {
70
- "medicinalproduct": ["patient.drug.medicinalproduct"],
71
- "patient.patientsex": ["patient.patientsex"],
72
- "patient.patientagegroup": ["patient.patientagegroup"],
73
- "serious": ["serious"]
74
- },
75
- "return_fields": ["occurcountry.exact"]
76
- }
77
- },
78
- {
79
- "type": "FDADrugAdverseEventTool",
80
- "name": "FAERS_count_reportercountry_by_drug_event",
81
- "description": "Count the number of FDA adverse event reports grouped by the country of the primary reporter. Data source: FDA Adverse Event Reporting System (FAERS).",
82
- "parameter": {
83
- "type": "object",
84
- "properties": {
85
- "medicinalproduct": { "type": "string", "description": "Drug name." },
86
- "patient.patientsex": { "type": "string", "enum": ["Male", "Female"], "description": "Patient sex, leave it blank if you don't want to apply a filter." },
87
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate", "Infant", "Child", "Adolescent", "Adult", "Elderly"], "description": "Patient age group." },
88
- "serious": { "type": "string", "enum": ["Yes","No"], "description": "Whether the event was serious." }
89
- },
90
- "required": []
91
- },
92
- "fields": {
93
- "search_fields": {
94
- "medicinalproduct": ["patient.drug.medicinalproduct"],
95
- "patient.patientsex": ["patient.patientsex"],
96
- "patient.patientagegroup": ["patient.patientagegroup"],
97
- "serious": ["serious"]
98
- },
99
- "return_fields": ["primarysource.reportercountry.exact"]
100
- }
101
- },
102
- {
103
- "type": "FDADrugAdverseEventTool",
104
- "name": "FAERS_count_seriousness_by_drug_event",
105
- "description": "Count the number of adverse event reports classified as serious or non-serious, filtered by drug and patient demographics. In results, term Serious means: 'The adverse event resulted in death, a life threatening condition, hospitalization, disability, congenital anomaly, or other serious condition', term Non-serious means 'The adverse event did not result in any of the above' Data source: FDA Adverse Event Reporting System (FAERS).",
106
- "parameter": {
107
- "type": "object",
108
- "properties": {
109
- "medicinalproduct": { "type": "string", "description": "Drug name." },
110
- "patient.patientsex": { "type": "string", "enum": ["Male", "Female"], "description": "Patient sex, leave it blank if you don't want to apply a filter." },
111
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate", "Infant", "Child", "Adolescent", "Adult", "Elderly"], "description": "Patient age group." },
112
- "occurcountry": { "type": "string", "pattern": "^[A-Z]{2}$", "description": "Country where event occurred." }
113
- },
114
- "required": []
115
- },
116
- "fields": {
117
- "search_fields": {
118
- "medicinalproduct": ["patient.drug.medicinalproduct"],
119
- "patient.patientsex": ["patient.patientsex"],
120
- "patient.patientagegroup": ["patient.patientagegroup"],
121
- "occurcountry": ["occurcountry"]
122
- },
123
- "return_fields": ["serious"],
124
- "return_fields_mapping": {
125
- "serious": {
126
- "1": "Serious",
127
- "2": "Non-serious"
128
- }
129
- }
130
- }
131
- },
132
- {
133
- "type": "FDADrugAdverseEventTool",
134
- "name": "FAERS_count_outcomes_by_drug_event",
135
- "description": "Count the outcome of adverse reactions (recovered, recovering, fatal, unresolved) filtered by drug, seriousness, and demographics. Data source: FDA Adverse Event Reporting System (FAERS).",
136
- "parameter": {
137
- "type": "object",
138
- "properties": {
139
- "medicinalproduct": { "type": "string", "description": "Drug name." },
140
- "patient.patientsex": { "type": "string", "enum": [ "Male", "Female"] },
141
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate", "Infant", "Child", "Adolescent", "Adult", "Elderly"] },
142
- "occurcountry": { "type": "string", "pattern": "^[A-Z]{2}$" }
143
- },
144
- "required": ["medicinalproduct"]
145
- },
146
- "fields": {
147
- "search_fields": {
148
- "medicinalproduct": ["patient.drug.medicinalproduct"],
149
- "patient.patientsex": ["patient.patientsex"],
150
- "patient.patientagegroup": ["patient.patientagegroup"],
151
- "occurcountry": ["occurcountry"]
152
- },
153
- "return_fields": ["patient.reaction.reactionoutcome"],
154
- "return_fields_mapping": {
155
- "patient.reaction.reactionoutcome": {
156
- "1": "Recovered/resolved",
157
- "2": "Recovering/resolving",
158
- "3": "Not recovered/not resolved",
159
- "4": "Recovered/resolved with sequelae (consequent health issues)",
160
- "5": "Fatal",
161
- "6": "Unknown"
162
- }
163
- }
164
- }
165
- },
166
- {
167
- "type": "FDADrugAdverseEventTool",
168
- "name": "FAERS_count_drug_routes_by_event",
169
- "description": "Count the most common routes of administration for drugs involved in adverse event reports. Data source: FDA Adverse Event Reporting System (FAERS).",
170
- "parameter": {
171
- "type": "object",
172
- "properties": {
173
- "medicinalproduct": { "type": "string", "description": "Drug name." },
174
- "serious": { "type": "string", "enum": ["Yes","No"], "description": "Seriousness of event." }
175
- },
176
- "required": ["medicinalproduct"]
177
- },
178
- "fields": {
179
- "search_fields": {
180
- "medicinalproduct": ["patient.drug.medicinalproduct"],
181
- "serious": ["serious"]
182
- },
183
- "return_fields": ["patient.drug.drugadministrationroute.exact"],
184
- "return_fields_mapping": {
185
- "patient.drug.drugadministrationroute.exact": {
186
- "001": "Auricular (otic)",
187
- "002": "Buccal",
188
- "003": "Cutaneous",
189
- "004": "Dental",
190
- "005": "Endocervical",
191
- "006": "Endosinusial",
192
- "007": "Endotracheal",
193
- "008": "Epidural",
194
- "009": "Extra-amniotic",
195
- "010": "Hemodialysis",
196
- "011": "Intra corpus cavernosum",
197
- "012": "Intra-amniotic",
198
- "013": "Intra-arterial",
199
- "014": "Intra-articular",
200
- "015": "Intra-uterine",
201
- "016": "Intracardiac",
202
- "017": "Intracavernous",
203
- "018": "Intracerebral",
204
- "019": "Intracervical",
205
- "020": "Intracisternal",
206
- "021": "Intracorneal",
207
- "022": "Intracoronary",
208
- "023": "Intradermal",
209
- "024": "Intradiscal (intraspinal)",
210
- "025": "Intrahepatic",
211
- "026": "Intralesional",
212
- "027": "Intralymphatic",
213
- "028": "Intramedullar (bone marrow)",
214
- "029": "Intrameningeal",
215
- "030": "Intramuscular",
216
- "031": "Intraocular",
217
- "032": "Intrapericardial",
218
- "033": "Intraperitoneal",
219
- "034": "Intrapleural",
220
- "035": "Intrasynovial",
221
- "036": "Intratumor",
222
- "037": "Intrathecal",
223
- "038": "Intrathoracic",
224
- "039": "Intratracheal",
225
- "040": "Intravenous bolus",
226
- "041": "Intravenous drip",
227
- "042": "Intravenous (not otherwise specified)",
228
- "043": "Intravesical",
229
- "044": "Iontophoresis",
230
- "045": "Nasal",
231
- "046": "Occlusive dressing technique",
232
- "047": "Ophthalmic",
233
- "048": "Oral",
234
- "049": "Oropharingeal",
235
- "050": "Other",
236
- "051": "Parenteral",
237
- "052": "Periarticular",
238
- "053": "Perineural",
239
- "054": "Rectal",
240
- "055": "Respiratory (inhalation)",
241
- "056": "Retrobulbar",
242
- "057": "Sunconjunctival",
243
- "058": "Subcutaneous",
244
- "059": "Subdermal",
245
- "060": "Sublingual",
246
- "061": "Topical",
247
- "062": "Transdermal",
248
- "063": "Transmammary",
249
- "064": "Transplacental",
250
- "065": "Unknown",
251
- "066": "Urethral",
252
- "067": "Vaginal"
253
- }
254
- }
255
- }
256
- },
257
- {
258
- "type": "FDADrugAdverseEventTool",
259
- "name": "FAERS_count_patient_age_distribution",
260
- "description": "Analyze the age distribution of patients experiencing adverse events for a specific drug. The age groups are: Neonate (0-28 days), Infant (29 days - 23 months), Child (2-11 years), Adolescent (12-17 years), Adult (18-64 years), Elderly (65+ years). Data source: FDA Adverse Event Reporting System (FAERS).",
261
- "parameter": {
262
- "type": "object",
263
- "properties": {
264
- "medicinalproduct": { "type": "string", "description": "Drug name." }
265
- },
266
- "required": ["medicinalproduct"]
267
- },
268
- "fields": {
269
- "search_fields": {
270
- "medicinalproduct": ["patient.drug.medicinalproduct"]
271
- },
272
- "return_fields": ["patient.patientagegroup"],
273
- "return_fields_mapping": {
274
- "patient.patientagegroup": {
275
- "1": "Neonate",
276
- "2": "Infant",
277
- "3": "Child",
278
- "4": "Adolescent",
279
- "5": "Adult",
280
- "6": "Elderly"
281
- }
282
- }
283
- }
284
- },
285
- {
286
- "type": "FDADrugAdverseEventTool",
287
- "name": "FAERS_count_death_related_by_drug",
288
- "description": "Count adverse events associated with patient death for a given drug. Data source: FDA Adverse Event Reporting System (FAERS).",
289
- "parameter": {
290
- "type": "object",
291
- "properties": {
292
- "medicinalproduct": { "type": "string", "description": "Drug name." }
293
- },
294
- "required": ["medicinalproduct"]
295
- },
296
- "fields": {
297
- "search_fields": {
298
- "medicinalproduct": ["patient.drug.medicinalproduct"],
299
- "seriousnessdeath": ["seriousnessdeath"]
300
- },
301
- "return_fields": ["seriousnessdeath"],
302
- "return_fields_mapping": {
303
- "seriousnessdeath": {
304
- "1": "death",
305
- "2": "alive"
306
- }
307
- }
308
- }
309
- },
310
- {
311
- "type": "FDACountAdditiveReactionsTool",
312
- "name": "FAERS_count_additive_adverse_reactions",
313
- "description": "Additive multi-drug data: Aggregate adverse reaction counts across specified medicinal products, stratified by demographics, seriousness, and outcomes. Data source: FDA Adverse Event Reporting System (FAERS).",
314
- "parameter": {
315
- "type": "object",
316
- "properties": {
317
- "medicinalproducts": { "type": "array", "items": { "type": "string" }, "description": "Array of medicinal product names." },
318
- "patient.patientsex": { "type": "string", "enum": ["Male","Female"], "description": "Filter by patient sex." },
319
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate","Infant","Child","Adolescent","Adult","Elderly"], "description": "Filter by patient age group." },
320
- "occurcountry": { "type": "string", "pattern": "^[A-Z]{2}$", "description": "Filter by ISO2 country code of occurrence." },
321
- "serious": { "type": "string", "enum": ["Yes","No"], "description": "Filter by seriousness classification." },
322
- "seriousnessdeath": { "type": "string", "enum": ["Yes","No"], "description": "Filter for fatal outcomes." }
323
- },
324
- "required": ["medicinalproducts"]
325
- },
326
- "fields": {
327
- "search_fields": {
328
- "medicinalproducts": ["patient.drug.medicinalproduct"],
329
- "patient.patientsex": ["patient.patientsex"],
330
- "patient.patientagegroup": ["patient.patientagegroup"],
331
- "occurcountry": ["occurcountry"],
332
- "serious": ["serious"],
333
- "seriousnessdeath": ["seriousnessdeath"]
334
- },
335
- "return_fields": ["patient.reaction.reactionmeddrapt.exact"]
336
- }
337
- },
338
- {
339
- "type": "FDACountAdditiveReactionsTool",
340
- "name": "FAERS_count_additive_event_reports_by_country",
341
- "description": "Additive multi-drug data: Aggregate report counts by country of occurrence across specified medicinal products. Data source: FDA Adverse Event Reporting System (FAERS).",
342
- "parameter": {
343
- "type": "object",
344
- "properties": {
345
- "medicinalproducts": { "type": "array", "items": { "type": "string" }, "description": "Array of medicinal product names." },
346
- "patient.patientsex": { "type": "string", "enum": ["Male","Female"], "description": "Filter by sex." },
347
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate","Infant","Child","Adolescent","Adult","Elderly"], "description": "Filter by age group." },
348
- "serious": { "type": "string", "enum": ["Yes","No"], "description": "Filter by seriousness." }
349
- },
350
- "required": ["medicinalproducts"]
351
- },
352
- "fields": {
353
- "search_fields": {
354
- "medicinalproducts": ["patient.drug.medicinalproduct"],
355
- "patient.patientsex": ["patient.patientsex"],
356
- "patient.patientagegroup": ["patient.patientagegroup"],
357
- "serious": ["serious"]
358
- },
359
- "return_fields": ["occurcountry.exact"]
360
- }
361
- },
362
- {
363
- "type": "FDACountAdditiveReactionsTool",
364
- "name": "FAERS_count_additive_reports_by_reporter_country",
365
- "description": "Additive multi-drug data: Aggregate adverse event reports by primary reporter country across medicinal products. Data source: FDA Adverse Event Reporting System (FAERS).",
366
- "parameter": {
367
- "type": "object",
368
- "properties": {
369
- "medicinalproducts": { "type": "array", "items": { "type": "string" }, "description": "Array of medicinal product names." },
370
- "patient.patientsex": { "type": "string", "enum": ["Male","Female"], "description": "Filter by sex." },
371
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate","Infant","Child","Adolescent","Adult","Elderly"], "description": "Filter by age group." },
372
- "serious": { "type": "string", "enum": ["Yes","No"], "description": "Filter by seriousness." }
373
- },
374
- "required": ["medicinalproducts"]
375
- },
376
- "fields": {
377
- "search_fields": {
378
- "medicinalproducts": ["patient.drug.medicinalproduct"],
379
- "patient.patientsex": ["patient.patientsex"],
380
- "patient.patientagegroup": ["patient.patientagegroup"],
381
- "serious": ["serious"]
382
- },
383
- "return_fields": ["primarysource.reportercountry.exact"]
384
- }
385
- },
386
- {
387
- "type": "FDACountAdditiveReactionsTool",
388
- "name": "FAERS_count_additive_seriousness_classification",
389
- "description": "Additive multi-drug data: Quantify serious vs non-serious classifications across medicinal products, annotated per regulatory definitions. Data source: FDA Adverse Event Reporting System (FAERS).",
390
- "parameter": {
391
- "type": "object",
392
- "properties": {
393
- "medicinalproducts": { "type": "array", "items": { "type": "string" }, "description": "Array of medicinal product names." },
394
- "patient.patientsex": { "type": "string", "enum": ["Male","Female"], "description": "Filter by sex." },
395
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate","Infant","Child","Adolescent","Adult","Elderly"], "description": "Filter by age group." },
396
- "occurcountry": { "type": "string", "pattern": "^[A-Z]{2}$", "description": "ISO2 country code filter." }
397
- },
398
- "required": ["medicinalproducts"]
399
- },
400
- "fields": {
401
- "search_fields": {
402
- "medicinalproducts": ["patient.drug.medicinalproduct"],
403
- "patient.patientsex": ["patient.patientsex"],
404
- "patient.patientagegroup": ["patient.patientagegroup"],
405
- "occurcountry": ["occurcountry"]
406
- },
407
- "return_fields": ["serious"],
408
- "return_fields_mapping": { "serious": { "1": "Serious", "2": "Non-serious" } }
409
- }
410
- },
411
- {
412
- "type": "FDACountAdditiveReactionsTool",
413
- "name": "FAERS_count_additive_reaction_outcomes",
414
- "description": "Additive multi-drug data: Determine reaction outcome counts (e.g., recovered, resolving, fatal) across medicinal products using standardized outcome mappings. Data source: FDA Adverse Event Reporting System (FAERS).",
415
- "parameter": {
416
- "type": "object",
417
- "properties": {
418
- "medicinalproducts": { "type": "array", "items": { "type": "string" }, "description": "Array of medicinal product names." },
419
- "patient.patientsex": { "type": "string", "enum": ["Male","Female"] },
420
- "patient.patientagegroup": { "type": "string", "enum": ["Neonate","Infant","Child","Adolescent","Adult","Elderly"] },
421
- "occurcountry": { "type": "string", "pattern": "^[A-Z]{2}$" }
422
- },
423
- "required": ["medicinalproducts"]
424
- },
425
- "fields": {
426
- "search_fields": {
427
- "medicinalproducts": ["patient.drug.medicinalproduct"],
428
- "patient.patientsex": ["patient.patientsex"],
429
- "patient.patientagegroup": ["patient.patientagegroup"],
430
- "occurcountry": ["occurcountry"]
431
- },
432
- "return_fields": ["patient.reaction.reactionoutcome"],
433
- "return_fields_mapping": {
434
- "patient.reaction.reactionoutcome": {
435
- "1": "Recovered/resolved",
436
- "2": "Recovering/resolving",
437
- "3": "Not recovered/not resolved",
438
- "4": "Recovered/resolved with sequelae",
439
- "5": "Fatal",
440
- "6": "Unknown"
441
- }
442
- }
443
- }
444
- },
445
- {
446
- "type": "FDACountAdditiveReactionsTool",
447
- "name": "FAERS_count_additive_administration_routes",
448
- "description": "Additive multi-drug data: Enumerate and count administration routes for adverse events across specified medicinal products, using standardized route codes. Data source: FDA Adverse Event Reporting System (FAERS).",
449
- "parameter": {
450
- "type": "object",
451
- "properties": {
452
- "medicinalproducts": { "type": "array", "items": { "type": "string" }, "description": "Array of medicinal product names." },
453
- "serious": { "type": "string", "enum": ["Yes","No"], "description": "Filter by seriousness." }
454
- },
455
- "required": ["medicinalproducts"]
456
- },
457
- "fields": {
458
- "search_fields": {
459
- "medicinalproducts": ["patient.drug.medicinalproduct"],
460
- "serious": ["serious"]
461
- },
462
- "return_fields": ["patient.drug.drugadministrationroute.exact"],
463
- "return_fields_mapping": {
464
- "patient.drug.drugadministrationroute.exact": {
465
- "001": "Auricular (otic)", "002": "Buccal", "003": "Cutaneous", "004": "Dental",
466
- "005": "Endocervical", "006": "Endosinusial", "007": "Endotracheal", "008": "Epidural",
467
- "009": "Extra-amniotic", "010": "Hemodialysis", "011": "Intra corpus cavernosum",
468
- "012": "Intra-amniotic", "013": "Intra-arterial", "014": "Intra-articular",
469
- "015": "Intra-uterine", "016": "Intracardiac", "017": "Intracavernous",
470
- "018": "Intracerebral", "019": "Intracervical", "020": "Intracisternal",
471
- "021": "Intracorneal", "022": "Intracoronary", "023": "Intradermal",
472
- "024": "Intradiscal (intraspinal)", "025": "Intrahepatic", "026": "Intralesional",
473
- "027": "Intralymphatic", "028": "Intramedullar (bone marrow)", "029": "Intrameningeal",
474
- "030": "Intramuscular", "031": "Intraocular", "032": "Intrapericardial",
475
- "033": "Intraperitoneal", "034": "Intrapleural", "035": "Intrasynovial",
476
- "036": "Intratumor", "037": "Intrathecal", "038": "Intrathoracic",
477
- "039": "Intratracheal", "040": "Intravenous bolus", "041": "Intravenous drip",
478
- "042": "Intravenous (not otherwise specified)", "043": "Intravesical",
479
- "044": "Iontophoresis", "045": "Nasal", "046": "Occlusive dressing technique",
480
- "047": "Ophthalmic", "048": "Oral", "049": "Oropharingeal", "050": "Other",
481
- "051": "Parenteral", "052": "Periarticular", "053": "Perineural",
482
- "054": "Rectal", "055": "Respiratory (inhalation)", "056": "Retrobulbar",
483
- "057": "Sunconjunctival", "058": "Subcutaneous", "059": "Subdermal",
484
- "060": "Sublingual", "061": "Topical", "062": "Transdermal",
485
- "063": "Transmammary", "064": "Transplacental", "065": "Unknown",
486
- "066": "Urethral", "067": "Vaginal"
487
- }
488
- }
489
- }
490
- }
491
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tool_lists/fda_drug_labeling_tools.json DELETED
The diff for this file is too large to render. See raw diff
 
tool_lists/pubtator_tools.json DELETED
@@ -1,68 +0,0 @@
1
- [
2
- {
3
- "type": "PubTatorTool",
4
- "name": "PubTator3_EntityAutocomplete",
5
- "description": "Provides suggestions for the best‐matching standardized PubTator IDs for a partial biomedical term (gene, disease, chemical, or variant). Use this tool first to convert free‐text names into the stable @IDs required by the other PubTator APIs.",
6
- "endpoint_path": "/entity/autocomplete/",
7
- "method": "GET",
8
- "param_map": {
9
- "text": "query",
10
- "entity_type": "concept",
11
- "max_results": "limit"
12
- },
13
- "parameter": {
14
- "type": "object",
15
- "properties": {
16
- "text": {
17
- "type": "string",
18
- "description": "A few characters or the full name of the biomedical concept you are trying to look up (e.g. β€œBRAF V6”)."
19
- },
20
- "entity_type": {
21
- "type": "string",
22
- "description": "Optional filter to restrict suggestions to a single category such as GENE, DISEASE, CHEMICAL, or VARIANT."
23
- },
24
- "max_results": {
25
- "type": "integer",
26
- "description": "Maximum number of suggestions to return (1 - 50, default = 10)."
27
- }
28
- },
29
- "required": ["text"]
30
- },
31
- "fields": {
32
- "tool_subtype": "PubTatorEntity"
33
- }
34
- },
35
- {
36
- "type": "PubTatorTool",
37
- "name": "PubTator3_LiteratureSearch",
38
- "description": "Find PubMed articles that match a keyword, a PubTator entity ID (e.g. β€œ@GENE_BRAF”), or an entity-to-entity relation expression (e.g. β€œrelations:treat|@CHEMICAL_Doxorubicin|@DISEASE_Neoplasms”).",
39
- "endpoint_path": "/search/",
40
- "method": "GET",
41
- "param_map": {
42
- "query": "text",
43
- "page": "page",
44
- "page_size": "page_size"
45
- },
46
- "parameter": {
47
- "type": "object",
48
- "properties": {
49
- "query": {
50
- "type": "string",
51
- "description": "What you want to search for. This can be plain keywords, a single PubTator ID, or the special relation syntax shown above."
52
- },
53
- "page": {
54
- "type": "integer",
55
- "description": "Zero-based results page (optional; default = 0)."
56
- },
57
- "page_size": {
58
- "type": "integer",
59
- "description": "How many PMIDs to return per page (optional; default = 20, maximum = 200)."
60
- }
61
- },
62
- "required": ["query"]
63
- },
64
- "fields": {
65
- "tool_subtype": "PubTatorSearch"
66
- }
67
- }
68
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tool_lists/semantic_scholar_tools.json DELETED
@@ -1,26 +0,0 @@
1
- [
2
- {
3
- "type": "SemanticScholarTool",
4
- "name": "SemanticScholar_search_papers",
5
- "description": "Search for papers on Semantic Scholar including abstracts. This tool queries the Semantic Scholar API using natural language keywords and returns papers with details such as title, abstract, publication year, journal (venue), and URL.",
6
- "parameter": {
7
- "type": "object",
8
- "properties": {
9
- "query": {
10
- "type": "string",
11
- "description": "Search query for Semantic Scholar. Use keywords separated by spaces to refine the search."
12
- },
13
- "limit": {
14
- "type": "integer",
15
- "description": "Maximum number of papers to return from Semantic Scholar.",
16
- "default": 5
17
- },
18
- "api_key": {
19
- "type": "string",
20
- "description": "Optional API key for Semantic Scholar to obtain a higher quota."
21
- }
22
- },
23
- "required": ["query"]
24
- }
25
- }
26
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tool_lists/special_tools.json DELETED
@@ -1,48 +0,0 @@
1
- [
2
- {
3
- "name": "Finish",
4
- "description": "Indicate the end of multi-step reasoning.",
5
- "parameter": {
6
- "type": "object",
7
- "properties": null
8
- }
9
- },
10
- {
11
- "name": "Tool_RAG",
12
- "description": "Retrieve related tools from the toolbox based on the provided description",
13
- "parameter": {
14
- "type": "object",
15
- "properties": {
16
- "description": {
17
- "type": "string",
18
- "description": "The description of the tool capability required.",
19
- "required": true
20
- },
21
- "limit": {
22
- "type": "integer",
23
- "description": "The number of tools to retrieve",
24
- "required": true
25
- }
26
- }
27
- },
28
- "required": [
29
- "description",
30
- "limit"
31
- ]
32
- },
33
- {
34
- "name": "CallAgent",
35
- "description": "Give a solution plan to the agent and let it solve the problem. Solution plan should reflect a distinct method, approach, or viewpoint to solve the given question. Call these function multiple times, and each solution plan should start with different aspects of the question, for example, genes, phenotypes, diseases, or drugs, etc. The CallAgent will achieve the task based on the plan, so only give the plan instead of unverified information.",
36
- "parameter": {
37
- "type": "object",
38
- "properties":
39
- {
40
- "solution": {
41
- "type": "string",
42
- "description": "A feasible and concise solution plan that address the question.",
43
- "required": true
44
- }
45
- }
46
- }
47
- }
48
- ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
utils.py CHANGED
@@ -141,7 +141,6 @@ def append_to_sheet(user_data=None, custom_row_dict=None, custom_sheet_name=None
141
  """
142
  Append a new row to a Google Sheet. If 'custom_row' is provided, append that row.
143
  Otherwise, append a default row constructed from the provided user_data.
144
- Ensures that each value is aligned with the correct column header.
145
  """
146
  if custom_sheet_name is None:
147
  custom_sheet_name = GSHEET_NAME
@@ -150,7 +149,6 @@ def append_to_sheet(user_data=None, custom_row_dict=None, custom_sheet_name=None
150
  # Try to open the spreadsheet by name
151
  spreadsheet = client.open(custom_sheet_name)
152
  is_new = False
153
- print("Spreadsheet opened successfully:", custom_sheet_name)
154
  except SpreadsheetNotFound:
155
  # If it doesn't exist, create it
156
  spreadsheet = client.create(custom_sheet_name)
@@ -158,31 +156,21 @@ def append_to_sheet(user_data=None, custom_row_dict=None, custom_sheet_name=None
158
  spreadsheet.share('shanghuagao@gmail.com', perm_type='user', role='writer')
159
  spreadsheet.share('rzhu@college.harvard.edu', perm_type='user', role='writer')
160
  is_new = True
161
- print("Spreadsheet created successfully:", custom_sheet_name)
162
  print("Spreadsheet ID:", spreadsheet.id)
163
  # Access the first worksheet
164
  sheet = spreadsheet.sheet1
165
 
166
- # Check if the sheet has any rows yet
167
- existing_values = sheet.get_all_values()
168
- is_empty = (existing_values == [[]]) #indicates empty spreadsheet that was cleared in the past
169
-
170
- # --- Always ensure header row is present and get headers ---
171
- if (is_new or is_empty) and add_header_when_create_sheet:
172
  # headers come from the keys of our row dict
173
  if custom_row_dict is not None:
174
  headers = list(custom_row_dict.keys())
175
  else:
176
  headers = list(user_data.keys())
177
  sheet.append_row(headers)
178
- else:
179
- # Read headers from the first row of the sheet
180
- headers = sheet.row_values(1) if sheet.row_count > 0 else []
181
-
182
- # --- Build row aligned to headers ---
183
  if custom_row_dict is not None:
184
- # Ensure all values are aligned to headers, fill missing with ""
185
- custom_row = [custom_row_dict.get(header, "") for header in headers]
186
  else:
187
  # Construct the default row with a timestamp and user_data fields
188
  custom_row = [str(datetime.datetime.now()), user_data["question"], user_data["final_answer"], user_data["trace"]]
@@ -219,7 +207,7 @@ def format_chat(response, tool_database_labels):
219
  title = f"πŸ› οΈ {name}"
220
  for db_label, tool_list in tool_database_labels.items():
221
  if name in tool_list:
222
- title = f"πŸ› οΈ {name}\n(**Info** {db_label} [Click to view])"
223
  database_label = " (" + db_label + ")"
224
  break
225
 
@@ -237,11 +225,9 @@ def format_chat(response, tool_database_labels):
237
  chat_history.append(
238
  gr.ChatMessage(
239
  role="assistant",
240
- content=f"Tool Response{database_label}:\n{pretty}",
241
  metadata={
242
- "title": title,
243
- "log": json.dumps(args),
244
- "status": 'done'
245
  }
246
  )
247
  )
@@ -249,28 +235,5 @@ def format_chat(response, tool_database_labels):
249
  # Clear after rendering
250
  last_tool_calls = []
251
 
252
- # if chat_history:
253
- # last_msg = chat_history[-1]
254
- # if isinstance(last_msg.content, str) and "[FinalAnswer]" in last_msg.content:
255
- # # Find the first assistant message
256
- # for msg in chat_history:
257
- # if msg.role == "assistant" and isinstance(msg.content, str):
258
- # msg.content = "**Reasoning:**\n" + msg.content
259
- # break
260
- if chat_history:
261
- last_msg = chat_history[-1]
262
- if isinstance(last_msg.content, str) and "[FinalAnswer]" in last_msg.content:
263
- last_msg.content = last_msg.content.replace("[FinalAnswer]", "\n**Answer:**\n")
264
-
265
-
266
- final_answer_messages = [gr.ChatMessage(role="assistant", content=chat_history[-1].content.split("\n**Answer:**\n")[-1].strip())]
267
- assistant_count = sum(1 for msg in chat_history if msg.role == "assistant")
268
- if assistant_count == 1:
269
- # If only one assistant message, show "No reasoning conducted."
270
- reasoning_messages = [gr.ChatMessage(role="assistant", content="No reasoning was conducted.")]
271
- else:
272
- # Include ALL messages in reasoning_messages, including the last one
273
- reasoning_messages = chat_history.copy()
274
-
275
 
276
- return final_answer_messages, reasoning_messages, chat_history
 
141
  """
142
  Append a new row to a Google Sheet. If 'custom_row' is provided, append that row.
143
  Otherwise, append a default row constructed from the provided user_data.
 
144
  """
145
  if custom_sheet_name is None:
146
  custom_sheet_name = GSHEET_NAME
 
149
  # Try to open the spreadsheet by name
150
  spreadsheet = client.open(custom_sheet_name)
151
  is_new = False
 
152
  except SpreadsheetNotFound:
153
  # If it doesn't exist, create it
154
  spreadsheet = client.create(custom_sheet_name)
 
156
  spreadsheet.share('shanghuagao@gmail.com', perm_type='user', role='writer')
157
  spreadsheet.share('rzhu@college.harvard.edu', perm_type='user', role='writer')
158
  is_new = True
159
+
160
  print("Spreadsheet ID:", spreadsheet.id)
161
  # Access the first worksheet
162
  sheet = spreadsheet.sheet1
163
 
164
+ if is_new and add_header_when_create_sheet:
 
 
 
 
 
165
  # headers come from the keys of our row dict
166
  if custom_row_dict is not None:
167
  headers = list(custom_row_dict.keys())
168
  else:
169
  headers = list(user_data.keys())
170
  sheet.append_row(headers)
171
+
 
 
 
 
172
  if custom_row_dict is not None:
173
+ custom_row = [custom_row_dict.get(header) for header in list(custom_row_dict.keys())]
 
174
  else:
175
  # Construct the default row with a timestamp and user_data fields
176
  custom_row = [str(datetime.datetime.now()), user_data["question"], user_data["final_answer"], user_data["trace"]]
 
207
  title = f"πŸ› οΈ {name}"
208
  for db_label, tool_list in tool_database_labels.items():
209
  if name in tool_list:
210
+ title = f"πŸ› οΈ {name} (**retrieves** {db_label})"
211
  database_label = " (" + db_label + ")"
212
  break
213
 
 
225
  chat_history.append(
226
  gr.ChatMessage(
227
  role="assistant",
228
+ content=f"Input: {json.dumps(args)}\n\nResponse{database_label}:\n{pretty}",
229
  metadata={
230
+ "title": title
 
 
231
  }
232
  )
233
  )
 
235
  # Clear after rendering
236
  last_tool_calls = []
237
 
238
+ return chat_history
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
239