tooluniverse 0.1.4__py3-none-any.whl → 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tooluniverse might be problematic. Click here for more details.
- tooluniverse/data/fda_drug_labeling_tools.json +543 -167
- tooluniverse/data/opentarget_tools.json +81 -57
- tooluniverse/generate_mcp_tools.py +113 -0
- tooluniverse/mcp_server.py +3340 -0
- {tooluniverse-0.1.4.dist-info → tooluniverse-0.2.0.dist-info}/METADATA +21 -23
- {tooluniverse-0.1.4.dist-info → tooluniverse-0.2.0.dist-info}/RECORD +10 -7
- {tooluniverse-0.1.4.dist-info → tooluniverse-0.2.0.dist-info}/WHEEL +1 -1
- tooluniverse-0.2.0.dist-info/entry_points.txt +4 -0
- {tooluniverse-0.1.4.dist-info → tooluniverse-0.2.0.dist-info}/licenses/LICENSE +0 -0
- {tooluniverse-0.1.4.dist-info → tooluniverse-0.2.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"name": "
|
|
3
|
+
"name": "OpenTargets_get_associated_targets_by_disease_efoId",
|
|
4
4
|
"description": "Find targets associated with a specific disease or phenotype based on efoId.",
|
|
5
5
|
"label": [
|
|
6
6
|
"Disease",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"type": "OpenTarget"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
"name": "
|
|
27
|
+
"name": "OpenTargets_get_diseases_phenotypes_by_target_ensembl",
|
|
28
28
|
"description": "Find diseases or phenotypes associated with a specific target using ensemblId.",
|
|
29
29
|
"label": [
|
|
30
30
|
"Target",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"type": "OpenTarget"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
"name": "
|
|
51
|
+
"name": "OpenTargets_target_disease_evidence",
|
|
52
52
|
"description": "Explore evidence that supports a specific target-disease association. Input is disease efoId and target ensemblID.",
|
|
53
53
|
"label": [
|
|
54
54
|
"Target",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"type": "OpenTarget"
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
|
-
"name": "
|
|
80
|
+
"name": "OpenTargets_get_drug_warnings_by_chemblId",
|
|
81
81
|
"description": "Retrieve warnings for a specific drug using ChEMBL ID.",
|
|
82
82
|
"parameter": {
|
|
83
83
|
"type": "object",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"type": "OpenTarget"
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
|
-
"name": "
|
|
107
|
+
"name": "OpenTargets_get_drug_mechanisms_of_action_by_chemblId",
|
|
108
108
|
"description": "Retrieve the mechanisms of action associated with a specific drug using chemblId.",
|
|
109
109
|
"parameter": {
|
|
110
110
|
"type": "object",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"type": "OpenTarget"
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
|
-
"name": "
|
|
132
|
+
"name": "OpenTargets_get_associated_drugs_by_disease_efoId",
|
|
133
133
|
"description": "Retrieve known drugs associated with a specific disease by disease efoId.",
|
|
134
134
|
"parameter": {
|
|
135
135
|
"type": "object",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"type": "OpenTarget"
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
|
-
"name": "
|
|
160
|
+
"name": "OpenTargets_get_similar_entities_by_disease_efoId",
|
|
161
161
|
"description": "Retrieve similar entities for a given disease efoId using a model trained with PubMed.",
|
|
162
162
|
"parameter": {
|
|
163
163
|
"type": "object",
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
"type": "OpenTarget"
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
|
-
"name": "
|
|
194
|
+
"name": "OpenTargets_get_similar_entities_by_drug_chemblId",
|
|
195
195
|
"description": "Retrieve similar entities for a given drug chemblId using a model trained with PubMed.",
|
|
196
196
|
"parameter": {
|
|
197
197
|
"type": "object",
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
"type": "OpenTarget"
|
|
226
226
|
},
|
|
227
227
|
{
|
|
228
|
-
"name": "
|
|
228
|
+
"name": "OpenTargets_get_similar_entities_by_target_ensemblID",
|
|
229
229
|
"description": "Retrieve similar entities for a given target ensemblID using a model trained with PubMed.",
|
|
230
230
|
"parameter": {
|
|
231
231
|
"type": "object",
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"type": "OpenTarget"
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
|
-
"name": "
|
|
262
|
+
"name": "OpenTargets_get_associated_phenotypes_by_disease_efoId",
|
|
263
263
|
"description": "Find HPO phenotypes asosciated with the specified disease efoId.",
|
|
264
264
|
"parameter": {
|
|
265
265
|
"type": "object",
|
|
@@ -283,7 +283,7 @@
|
|
|
283
283
|
"type": "OpenTarget"
|
|
284
284
|
},
|
|
285
285
|
{
|
|
286
|
-
"name": "
|
|
286
|
+
"name": "OpenTargets_get_drug_withdrawn_blackbox_status_by_chemblId",
|
|
287
287
|
"description": "Find withdrawn and black-box warning statuses for a specific drug by chemblId.",
|
|
288
288
|
"parameter": {
|
|
289
289
|
"type": "object",
|
|
@@ -309,7 +309,7 @@
|
|
|
309
309
|
"type": "OpenTarget"
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
|
-
"name": "
|
|
312
|
+
"name": "OpenTargets_search_category_counts_by_query_string",
|
|
313
313
|
"description": "Get the count of entries in each entity category (disease, target, drug) based on a query string.",
|
|
314
314
|
"parameter": {
|
|
315
315
|
"type": "object",
|
|
@@ -334,7 +334,7 @@
|
|
|
334
334
|
"type": "OpenTarget"
|
|
335
335
|
},
|
|
336
336
|
{
|
|
337
|
-
"name": "
|
|
337
|
+
"name": "OpenTargets_get_disease_id_description_by_name",
|
|
338
338
|
"description": "Retrieve the efoId and additional details of a disease based on its name.",
|
|
339
339
|
"parameter": {
|
|
340
340
|
"type": "object",
|
|
@@ -359,8 +359,8 @@
|
|
|
359
359
|
"type": "OpenTarget"
|
|
360
360
|
},
|
|
361
361
|
{
|
|
362
|
-
"name": "
|
|
363
|
-
"description": "Fetch the drug chemblId and description based on the drug name.",
|
|
362
|
+
"name": "OpenTargets_get_drug_id_description_by_name",
|
|
363
|
+
"description": "Fetch the drug chemblId and description based on the drug generic name.",
|
|
364
364
|
"parameter": {
|
|
365
365
|
"type": "object",
|
|
366
366
|
"properties": {
|
|
@@ -383,7 +383,31 @@
|
|
|
383
383
|
"type": "OpentargetToolDrugNameMatch"
|
|
384
384
|
},
|
|
385
385
|
{
|
|
386
|
-
"name": "
|
|
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",
|
|
387
411
|
"description": "Fetch indications (treatable phenotypes/diseases) for a given drug chemblId.",
|
|
388
412
|
"parameter": {
|
|
389
413
|
"type": "object",
|
|
@@ -407,7 +431,7 @@
|
|
|
407
431
|
"type": "OpenTarget"
|
|
408
432
|
},
|
|
409
433
|
{
|
|
410
|
-
"name": "
|
|
434
|
+
"name": "OpenTargets_get_target_gene_ontology_by_ensemblID",
|
|
411
435
|
"description": "Retrieve Gene Ontology annotations for a specific target by Ensembl ID.",
|
|
412
436
|
"parameter": {
|
|
413
437
|
"type": "object",
|
|
@@ -429,7 +453,7 @@
|
|
|
429
453
|
"type": "OpenTarget"
|
|
430
454
|
},
|
|
431
455
|
{
|
|
432
|
-
"name": "
|
|
456
|
+
"name": "OpenTargets_get_target_homologues_by_ensemblID",
|
|
433
457
|
"description": "Fetch homologues for a specific target by Ensembl ID.",
|
|
434
458
|
"parameter": {
|
|
435
459
|
"type": "object",
|
|
@@ -451,7 +475,7 @@
|
|
|
451
475
|
"type": "OpenTarget"
|
|
452
476
|
},
|
|
453
477
|
{
|
|
454
|
-
"name": "
|
|
478
|
+
"name": "OpenTargets_get_target_safety_profile_by_ensemblID",
|
|
455
479
|
"description": "Retrieve known target safety liabilities for a specific target Ensembl ID.",
|
|
456
480
|
"parameter": {
|
|
457
481
|
"type": "object",
|
|
@@ -475,7 +499,7 @@
|
|
|
475
499
|
"type": "OpenTarget"
|
|
476
500
|
},
|
|
477
501
|
{
|
|
478
|
-
"name": "
|
|
502
|
+
"name": "OpenTargets_get_biological_mouse_models_by_ensemblID",
|
|
479
503
|
"description": "Retrieve biological mouse models, including allelic compositions and genetic backgrounds, for a specific target.",
|
|
480
504
|
"parameter": {
|
|
481
505
|
"type": "object",
|
|
@@ -497,7 +521,7 @@
|
|
|
497
521
|
"type": "OpenTarget"
|
|
498
522
|
},
|
|
499
523
|
{
|
|
500
|
-
"name": "
|
|
524
|
+
"name": "OpenTargets_get_target_genomic_location_by_ensemblID",
|
|
501
525
|
"description": "Retrieve genomic location data for a specific target, including chromosome, start, end, and strand.",
|
|
502
526
|
"parameter": {
|
|
503
527
|
"type": "object",
|
|
@@ -519,7 +543,7 @@
|
|
|
519
543
|
"type": "OpenTarget"
|
|
520
544
|
},
|
|
521
545
|
{
|
|
522
|
-
"name": "
|
|
546
|
+
"name": "OpenTargets_get_target_subcellular_locations_by_ensemblID",
|
|
523
547
|
"description": "Retrieve information about subcellular locations for a specific target ensemblID.",
|
|
524
548
|
"parameter": {
|
|
525
549
|
"type": "object",
|
|
@@ -541,7 +565,7 @@
|
|
|
541
565
|
"type": "OpenTarget"
|
|
542
566
|
},
|
|
543
567
|
{
|
|
544
|
-
"name": "
|
|
568
|
+
"name": "OpenTargets_get_target_synonyms_by_ensemblID",
|
|
545
569
|
"description": "Retrieve synonyms for specified target, including alternative names and symbols, using given ensemblID.",
|
|
546
570
|
"parameter": {
|
|
547
571
|
"type": "object",
|
|
@@ -563,7 +587,7 @@
|
|
|
563
587
|
"type": "OpenTarget"
|
|
564
588
|
},
|
|
565
589
|
{
|
|
566
|
-
"name": "
|
|
590
|
+
"name": "OpenTargets_get_target_tractability_by_ensemblID",
|
|
567
591
|
"description": "Retrieve tractability assessments, including modality and values, for a specific target ensembl ID.",
|
|
568
592
|
"parameter": {
|
|
569
593
|
"type": "object",
|
|
@@ -586,7 +610,7 @@
|
|
|
586
610
|
"type": "OpenTarget"
|
|
587
611
|
},
|
|
588
612
|
{
|
|
589
|
-
"name": "
|
|
613
|
+
"name": "OpenTargets_get_target_classes_by_ensemblID",
|
|
590
614
|
"description": "Retrieve the target classes associated with a specific target ensemblID.",
|
|
591
615
|
"parameter": {
|
|
592
616
|
"type": "object",
|
|
@@ -608,7 +632,7 @@
|
|
|
608
632
|
"type": "OpenTarget"
|
|
609
633
|
},
|
|
610
634
|
{
|
|
611
|
-
"name": "
|
|
635
|
+
"name": "OpenTargets_get_target_enabling_packages_by_ensemblID",
|
|
612
636
|
"description": "Retrieve the Target Enabling Packages (TEP) associated with a specific target ensemblID.",
|
|
613
637
|
"parameter": {
|
|
614
638
|
"type": "object",
|
|
@@ -630,7 +654,7 @@
|
|
|
630
654
|
"type": "OpenTarget"
|
|
631
655
|
},
|
|
632
656
|
{
|
|
633
|
-
"name": "
|
|
657
|
+
"name": "OpenTargets_get_target_interactions_by_ensemblID",
|
|
634
658
|
"description": "Retrieve interaction data for a specific target ensemblID, including interaction partners and evidence.",
|
|
635
659
|
"label": [
|
|
636
660
|
"Target",
|
|
@@ -667,11 +691,11 @@
|
|
|
667
691
|
}
|
|
668
692
|
}
|
|
669
693
|
},
|
|
670
|
-
"query_schema": "\n query targetInteractions($ensemblId: String!, $page: Pagination
|
|
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 ",
|
|
671
695
|
"type": "OpenTarget"
|
|
672
696
|
},
|
|
673
697
|
{
|
|
674
|
-
"name": "
|
|
698
|
+
"name": "OpenTargets_get_disease_ancestors_parents_by_efoId",
|
|
675
699
|
"description": "Retrieve the disease ancestors and parents in the ontology using the disease EFO ID.",
|
|
676
700
|
"parameter": {
|
|
677
701
|
"type": "object",
|
|
@@ -693,7 +717,7 @@
|
|
|
693
717
|
"type": "OpenTarget"
|
|
694
718
|
},
|
|
695
719
|
{
|
|
696
|
-
"name": "
|
|
720
|
+
"name": "OpenTargets_get_disease_descendants_children_by_efoId",
|
|
697
721
|
"description": "Retrieve the disease descendants and children in the ontology using the disease EFO ID.",
|
|
698
722
|
"parameter": {
|
|
699
723
|
"type": "object",
|
|
@@ -715,7 +739,7 @@
|
|
|
715
739
|
"type": "OpenTarget"
|
|
716
740
|
},
|
|
717
741
|
{
|
|
718
|
-
"name": "
|
|
742
|
+
"name": "OpenTargets_get_disease_locations_by_efoId",
|
|
719
743
|
"description": "Retrieve the disease's direct location and indirect location disease terms and IDs using the disease EFO ID.",
|
|
720
744
|
"parameter": {
|
|
721
745
|
"type": "object",
|
|
@@ -737,7 +761,7 @@
|
|
|
737
761
|
"type": "OpenTarget"
|
|
738
762
|
},
|
|
739
763
|
{
|
|
740
|
-
"name": "
|
|
764
|
+
"name": "OpenTargets_get_disease_synonyms_by_efoId",
|
|
741
765
|
"description": "Retrieve disease synonyms by its EFO ID.",
|
|
742
766
|
"parameter": {
|
|
743
767
|
"type": "object",
|
|
@@ -759,7 +783,7 @@
|
|
|
759
783
|
"type": "OpenTarget"
|
|
760
784
|
},
|
|
761
785
|
{
|
|
762
|
-
"name": "
|
|
786
|
+
"name": "OpenTargets_get_disease_description_by_efoId",
|
|
763
787
|
"description": "Retrieve disease description, name, database cros references, obsolete terms, and whether it's a therapeutic area, all using the specified efoId.",
|
|
764
788
|
"parameter": {
|
|
765
789
|
"type": "object",
|
|
@@ -781,7 +805,7 @@
|
|
|
781
805
|
"type": "OpenTarget"
|
|
782
806
|
},
|
|
783
807
|
{
|
|
784
|
-
"name": "
|
|
808
|
+
"name": "OpenTargets_get_disease_therapeutic_areas_by_efoId",
|
|
785
809
|
"description": "Retrieve the therapeutic areas associated with a specific disease efoId.",
|
|
786
810
|
"parameter": {
|
|
787
811
|
"type": "object",
|
|
@@ -803,7 +827,7 @@
|
|
|
803
827
|
"type": "OpenTarget"
|
|
804
828
|
},
|
|
805
829
|
{
|
|
806
|
-
"name": "
|
|
830
|
+
"name": "OpenTargets_get_drug_adverse_events_by_chemblId",
|
|
807
831
|
"description": "Retrieve significant adverse events reported for a specific drug chemblId.",
|
|
808
832
|
"parameter": {
|
|
809
833
|
"type": "object",
|
|
@@ -832,7 +856,7 @@
|
|
|
832
856
|
}
|
|
833
857
|
}
|
|
834
858
|
},
|
|
835
|
-
"query_schema": "\n query drugAdverseEvents($chemblId: String!, $page: Pagination
|
|
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 ",
|
|
836
860
|
"label": [
|
|
837
861
|
"Drug",
|
|
838
862
|
"AdverseEvents",
|
|
@@ -846,7 +870,7 @@
|
|
|
846
870
|
"type": "OpenTarget"
|
|
847
871
|
},
|
|
848
872
|
{
|
|
849
|
-
"name": "
|
|
873
|
+
"name": "OpenTargets_get_known_drugs_by_drug_chemblId",
|
|
850
874
|
"description": "Get a list of known drugs and associated information using the specified chemblId.",
|
|
851
875
|
"parameter": {
|
|
852
876
|
"type": "object",
|
|
@@ -868,7 +892,7 @@
|
|
|
868
892
|
"type": "OpenTarget"
|
|
869
893
|
},
|
|
870
894
|
{
|
|
871
|
-
"name": "
|
|
895
|
+
"name": "OpenTargets_get_parent_child_molecules_by_drug_chembl_ID",
|
|
872
896
|
"description": "Get parent and child molecules of specified drug chemblId.",
|
|
873
897
|
"parameter": {
|
|
874
898
|
"type": "object",
|
|
@@ -890,7 +914,7 @@
|
|
|
890
914
|
"type": "OpenTarget"
|
|
891
915
|
},
|
|
892
916
|
{
|
|
893
|
-
"name": "
|
|
917
|
+
"name": "OpenTargets_get_approved_indications_by_drug_chemblId",
|
|
894
918
|
"description": "Retrieve detailed information about multiple drugs using a list of ChEMBL IDs.",
|
|
895
919
|
"parameter": {
|
|
896
920
|
"type": "object",
|
|
@@ -912,7 +936,7 @@
|
|
|
912
936
|
"type": "OpenTarget"
|
|
913
937
|
},
|
|
914
938
|
{
|
|
915
|
-
"name": "
|
|
939
|
+
"name": "OpenTargets_get_drug_description_by_chemblId",
|
|
916
940
|
"description": "Get drug name, year of first approval, type, cross references, and max clinical trial phase based on specified chemblId.",
|
|
917
941
|
"parameter": {
|
|
918
942
|
"type": "object",
|
|
@@ -934,7 +958,7 @@
|
|
|
934
958
|
"type": "OpenTarget"
|
|
935
959
|
},
|
|
936
960
|
{
|
|
937
|
-
"name": "
|
|
961
|
+
"name": "OpenTargets_get_drug_synonyms_by_chemblId",
|
|
938
962
|
"description": "Retrieve the synonyms associated with a specific drug chemblId.",
|
|
939
963
|
"parameter": {
|
|
940
964
|
"type": "object",
|
|
@@ -956,7 +980,7 @@
|
|
|
956
980
|
"type": "OpenTarget"
|
|
957
981
|
},
|
|
958
982
|
{
|
|
959
|
-
"name": "
|
|
983
|
+
"name": "OpenTargets_get_drug_trade_names_by_chemblId",
|
|
960
984
|
"description": "Retrieve the trade names associated with a specific drug chemblId.",
|
|
961
985
|
"parameter": {
|
|
962
986
|
"type": "object",
|
|
@@ -978,7 +1002,7 @@
|
|
|
978
1002
|
"type": "OpenTarget"
|
|
979
1003
|
},
|
|
980
1004
|
{
|
|
981
|
-
"name": "
|
|
1005
|
+
"name": "OpenTargets_get_drug_approval_status_by_chemblId",
|
|
982
1006
|
"description": "Retrieve the approval status of a specific drug chemblId.",
|
|
983
1007
|
"parameter": {
|
|
984
1008
|
"type": "object",
|
|
@@ -1000,7 +1024,7 @@
|
|
|
1000
1024
|
"type": "OpenTarget"
|
|
1001
1025
|
},
|
|
1002
1026
|
{
|
|
1003
|
-
"name": "
|
|
1027
|
+
"name": "OpenTargets_get_chemical_probes_by_target_ensemblID",
|
|
1004
1028
|
"description": "Retrieve chemical probes associated with a specific target using its ensemblID.",
|
|
1005
1029
|
"parameter": {
|
|
1006
1030
|
"type": "object",
|
|
@@ -1022,7 +1046,7 @@
|
|
|
1022
1046
|
"type": "OpenTarget"
|
|
1023
1047
|
},
|
|
1024
1048
|
{
|
|
1025
|
-
"name": "
|
|
1049
|
+
"name": "OpenTargets_drug_pharmacogenomics_data",
|
|
1026
1050
|
"description": "Retrieve pharmacogenomics data for a specific drug, including evidence levels and genotype annotations.",
|
|
1027
1051
|
"label": [
|
|
1028
1052
|
"Drug",
|
|
@@ -1060,12 +1084,12 @@
|
|
|
1060
1084
|
}
|
|
1061
1085
|
}
|
|
1062
1086
|
},
|
|
1063
|
-
"query_schema": "\n query drugPharmacogenomicsData($chemblId: String!, $page: Pagination
|
|
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 ",
|
|
1064
1088
|
"type": "OpenTarget"
|
|
1065
1089
|
},
|
|
1066
1090
|
{
|
|
1067
|
-
"name": "
|
|
1068
|
-
"description": "Get known drugs associated with a specific target ensemblID, including clinical trial phase and mechanism of action of the drugs.",
|
|
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.",
|
|
1069
1093
|
"parameter": {
|
|
1070
1094
|
"type": "object",
|
|
1071
1095
|
"properties": {
|
|
@@ -1098,7 +1122,7 @@
|
|
|
1098
1122
|
"type": "OpenTarget"
|
|
1099
1123
|
},
|
|
1100
1124
|
{
|
|
1101
|
-
"name": "
|
|
1125
|
+
"name": "OpenTargets_get_associated_diseases_by_drug_chemblId",
|
|
1102
1126
|
"description": "Retrieve the list of diseases associated with a specific drug chemblId based on clinical trial data or post-marketed drugs.",
|
|
1103
1127
|
"parameter": {
|
|
1104
1128
|
"type": "object",
|
|
@@ -1121,7 +1145,7 @@
|
|
|
1121
1145
|
"type": "OpenTarget"
|
|
1122
1146
|
},
|
|
1123
1147
|
{
|
|
1124
|
-
"name": "
|
|
1148
|
+
"name": "OpenTargets_get_associated_targets_by_drug_chemblId",
|
|
1125
1149
|
"description": "Retrieve the list of targets linked to a specific drug chemblId based on its mechanism of action.",
|
|
1126
1150
|
"parameter": {
|
|
1127
1151
|
"type": "object",
|
|
@@ -1144,7 +1168,7 @@
|
|
|
1144
1168
|
"type": "OpenTarget"
|
|
1145
1169
|
},
|
|
1146
1170
|
{
|
|
1147
|
-
"name": "
|
|
1171
|
+
"name": "OpenTargets_multi_entity_search_by_query_string",
|
|
1148
1172
|
"description": "Perform a multi-entity search based on a query string, filtering by entity names and pagination settings.",
|
|
1149
1173
|
"parameter": {
|
|
1150
1174
|
"type": "object",
|
|
@@ -1192,7 +1216,7 @@
|
|
|
1192
1216
|
"type": "OpenTarget"
|
|
1193
1217
|
},
|
|
1194
1218
|
{
|
|
1195
|
-
"name": "
|
|
1219
|
+
"name": "OpenTargets_get_gene_ontology_terms_by_goID",
|
|
1196
1220
|
"description": "Retrieve Gene Ontology terms based on a list of GO IDs.",
|
|
1197
1221
|
"parameter": {
|
|
1198
1222
|
"type": "object",
|
|
@@ -1217,7 +1241,7 @@
|
|
|
1217
1241
|
"type": "OpenTarget"
|
|
1218
1242
|
},
|
|
1219
1243
|
{
|
|
1220
|
-
"name": "
|
|
1244
|
+
"name": "OpenTargets_get_target_constraint_info_by_ensemblID",
|
|
1221
1245
|
"description": "Retrieve genetic constraint information for a specific target ensemblID, including expected and observed values, and scores.",
|
|
1222
1246
|
"parameter": {
|
|
1223
1247
|
"type": "object",
|
|
@@ -1240,7 +1264,7 @@
|
|
|
1240
1264
|
"type": "OpenTarget"
|
|
1241
1265
|
},
|
|
1242
1266
|
{
|
|
1243
|
-
"name": "
|
|
1267
|
+
"name": "OpenTargets_get_publications_by_disease_efoId",
|
|
1244
1268
|
"description": "Retrieve publications related to a disease efoId, including PubMed IDs and publication dates.",
|
|
1245
1269
|
"parameter": {
|
|
1246
1270
|
"type": "object",
|
|
@@ -1290,7 +1314,7 @@
|
|
|
1290
1314
|
"type": "OpenTarget"
|
|
1291
1315
|
},
|
|
1292
1316
|
{
|
|
1293
|
-
"name": "
|
|
1317
|
+
"name": "OpenTargets_get_publications_by_target_ensemblID",
|
|
1294
1318
|
"description": "Retrieve publications related to a target ensemblID, including PubMed IDs and publication dates.",
|
|
1295
1319
|
"parameter": {
|
|
1296
1320
|
"type": "object",
|
|
@@ -1340,7 +1364,7 @@
|
|
|
1340
1364
|
"type": "OpenTarget"
|
|
1341
1365
|
},
|
|
1342
1366
|
{
|
|
1343
|
-
"name": "
|
|
1367
|
+
"name": "OpenTargets_get_publications_by_drug_chemblId",
|
|
1344
1368
|
"description": "Retrieve publications related to a drug chemblId, including PubMed IDs and publication dates.",
|
|
1345
1369
|
"parameter": {
|
|
1346
1370
|
"type": "object",
|
|
@@ -1390,7 +1414,7 @@
|
|
|
1390
1414
|
"type": "OpenTarget"
|
|
1391
1415
|
},
|
|
1392
1416
|
{
|
|
1393
|
-
"name": "
|
|
1417
|
+
"name": "OpenTargets_get_target_id_description_by_name",
|
|
1394
1418
|
"description": "Get the ensemblId and description based on the target name.",
|
|
1395
1419
|
"parameter": {
|
|
1396
1420
|
"type": "object",
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import json
|
|
3
|
+
from typing import List
|
|
4
|
+
from tooluniverse.execute_function import ToolUniverse
|
|
5
|
+
|
|
6
|
+
DATA_DIR = os.path.join(os.path.dirname(__file__), "data")
|
|
7
|
+
|
|
8
|
+
OUTPUT_FILE = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "mcp_wrappers_generated.txt"))
|
|
9
|
+
|
|
10
|
+
# Type map from JSON schema to Python types
|
|
11
|
+
TYPE_MAP = {
|
|
12
|
+
"string": "str",
|
|
13
|
+
"integer": "int",
|
|
14
|
+
"number": "float",
|
|
15
|
+
"boolean": "bool",
|
|
16
|
+
"array": "List[str]",
|
|
17
|
+
"object": "dict"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
def load_tools(file_path):
|
|
21
|
+
with open(file_path, "r") as f:
|
|
22
|
+
try:
|
|
23
|
+
return json.load(f)
|
|
24
|
+
except json.JSONDecodeError:
|
|
25
|
+
print(f" Could not parse JSON: {file_path}")
|
|
26
|
+
return []
|
|
27
|
+
|
|
28
|
+
def extract_arguments(properties):
|
|
29
|
+
args = []
|
|
30
|
+
for name, spec in properties.items():
|
|
31
|
+
arg_type = spec.get("type", "string")
|
|
32
|
+
py_type = TYPE_MAP.get(arg_type, "str")
|
|
33
|
+
args.append((name, py_type))
|
|
34
|
+
return args
|
|
35
|
+
|
|
36
|
+
def generate_function_code(name, args):
|
|
37
|
+
if not args:
|
|
38
|
+
return f"""
|
|
39
|
+
@mcp.tool()
|
|
40
|
+
def {name}() -> dict:
|
|
41
|
+
return engine.run_one_function({{
|
|
42
|
+
"name": "{name}",
|
|
43
|
+
"arguments": {{ }}
|
|
44
|
+
}})
|
|
45
|
+
"""
|
|
46
|
+
arg_defs = ",\n ".join([f"{k}: {v}" for k, v in args])
|
|
47
|
+
arg_dict = ",\n ".join([f'"{k}": {k}' for k, _ in args])
|
|
48
|
+
|
|
49
|
+
return f"""
|
|
50
|
+
@mcp.tool()
|
|
51
|
+
def {name}(
|
|
52
|
+
{arg_defs}
|
|
53
|
+
) -> dict:
|
|
54
|
+
return engine.run_one_function({{
|
|
55
|
+
"name": "{name}",
|
|
56
|
+
"arguments": {{
|
|
57
|
+
{arg_dict}
|
|
58
|
+
}}
|
|
59
|
+
}})
|
|
60
|
+
"""
|
|
61
|
+
|
|
62
|
+
def main():
|
|
63
|
+
all_functions = []
|
|
64
|
+
print(" Reading from:", DATA_DIR)
|
|
65
|
+
print(" Files found:", os.listdir(DATA_DIR))
|
|
66
|
+
|
|
67
|
+
for filename in os.listdir(DATA_DIR):
|
|
68
|
+
if not filename.endswith(".json"):
|
|
69
|
+
continue
|
|
70
|
+
filepath = os.path.join(DATA_DIR, filename)
|
|
71
|
+
print(f" Parsing {filename}")
|
|
72
|
+
|
|
73
|
+
tools = load_tools(filepath)
|
|
74
|
+
count = 0
|
|
75
|
+
|
|
76
|
+
for tool in tools:
|
|
77
|
+
name = tool.get("name")
|
|
78
|
+
parameter = tool.get("parameter", {})
|
|
79
|
+
props = parameter.get("properties") or {}
|
|
80
|
+
args = extract_arguments(props)
|
|
81
|
+
|
|
82
|
+
if name:
|
|
83
|
+
all_functions.append(generate_function_code(name, args))
|
|
84
|
+
count += 1
|
|
85
|
+
|
|
86
|
+
print(f" Tools found in {filename}: {count}")
|
|
87
|
+
|
|
88
|
+
with open(OUTPUT_FILE, "w") as f:
|
|
89
|
+
f.write(
|
|
90
|
+
"# Auto-generated MCP wrappers\n"
|
|
91
|
+
"from fastmcp import FastMCP\n"
|
|
92
|
+
"from typing import List\n"
|
|
93
|
+
"from tooluniverse.execute_function import ToolUniverse\n\n"
|
|
94
|
+
"mcp = FastMCP('ToolUniverse MCP', stateless_http=True)\n"
|
|
95
|
+
"engine = ToolUniverse()\n"
|
|
96
|
+
"engine.load_tools()\n"
|
|
97
|
+
)
|
|
98
|
+
f.write("\n".join(all_functions))
|
|
99
|
+
f.write(
|
|
100
|
+
"\n\ndef run_server():\n"
|
|
101
|
+
" mcp.run(transport='streamable-http', host='127.0.0.1', port=8000)\n\n"
|
|
102
|
+
"def run_claude_desktop():\n"
|
|
103
|
+
" print(\"Starting ToolUniverse MCP server...\")\n"
|
|
104
|
+
" mcp.run(transport='stdio')\n"
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
print(f" Generated {len(all_functions)} MCP wrappers in {OUTPUT_FILE}")
|
|
108
|
+
|
|
109
|
+
def run_generate():
|
|
110
|
+
main()
|
|
111
|
+
|
|
112
|
+
if __name__ == "__main__":
|
|
113
|
+
run_generate()
|