ApiLogicServer 14.5.17__py3-none-any.whl → 15.0.9__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.
- api_logic_server_cli/add_cust/add_cust.py +8 -2
- api_logic_server_cli/api_logic_server.py +3 -2
- api_logic_server_cli/api_logic_server_info.yaml +3 -3
- api_logic_server_cli/create_from_model/__pycache__/dbml.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/dbml.py +1 -0
- api_logic_server_cli/genai/genai_svcs.py +5 -2
- api_logic_server_cli/prototypes/base/api/api_discovery/mcp_discovery.py +63 -24
- api_logic_server_cli/prototypes/base/config/logging.yml +5 -0
- api_logic_server_cli/prototypes/base/config/server_setup.py +73 -0
- api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_discovery_response.json +150 -0
- api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_request.prompt +46 -0
- api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_tool_context_response.json +34 -0
- api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_tool_context_response_get.json +18 -0
- api_logic_server_cli/prototypes/base/integration/mcp/mcp_client_executor.py +129 -275
- api_logic_server_cli/prototypes/basic_demo/customizations/logic/logic_discovery/email_request.py +2 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/logic/logic_discovery/mcp_client_executor_request.py +15 -288
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/admin/admin.yaml +3 -3
- api_logic_server_cli/prototypes/basic_demo/customizations/ui/admin/home.js +48 -0
- api_logic_server_cli/prototypes/manager/{REAMDE.md → README.md} +30 -2
- api_logic_server_cli/prototypes/manager/system/genai/mcp_learning/mcp.prompt +12 -0
- {apilogicserver-14.5.17.dist-info → apilogicserver-15.0.9.dist-info}/METADATA +3 -3
- {apilogicserver-14.5.17.dist-info → apilogicserver-15.0.9.dist-info}/RECORD +27 -34
- api_logic_server_cli/prototypes/base/integration/mcp/README_mcp.md +0 -15
- api_logic_server_cli/prototypes/base/integration/mcp/test_notes.txt +0 -37
- api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/mcp_discovery.py +0 -96
- api_logic_server_cli/prototypes/basic_demo/customizations/config/server_setup.py +0 -388
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/.DS_Store +0 -0
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/README_mcp.md +0 -15
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/Zmcp_client_executor.py +0 -294
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_schema.txt +0 -47
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_server_discovery.json +0 -9
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_tool_context.json +0 -25
- api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/test_notes.txt +0 -37
- api_logic_server_cli/prototypes/manager/READMEz.md +0 -667
- /api_logic_server_cli/prototypes/base/integration/mcp/{mcp_schema.txt → examples/mcp_schema.txt} +0 -0
- {apilogicserver-14.5.17.dist-info → apilogicserver-15.0.9.dist-info}/WHEEL +0 -0
- {apilogicserver-14.5.17.dist-info → apilogicserver-15.0.9.dist-info}/entry_points.txt +0 -0
- {apilogicserver-14.5.17.dist-info → apilogicserver-15.0.9.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-14.5.17.dist-info → apilogicserver-15.0.9.dist-info}/top_level.txt +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
api_logic_server_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
api_logic_server_cli/api_logic_server.py,sha256=
|
|
3
|
-
api_logic_server_cli/api_logic_server_info.yaml,sha256=
|
|
2
|
+
api_logic_server_cli/api_logic_server.py,sha256=sPlwuJ-5alty2QKGWQzrQI-5TanLowp6LlzaCOf3mTs,96233
|
|
3
|
+
api_logic_server_cli/api_logic_server_info.yaml,sha256=7dgxLMqOLurpP0UFLsdB_Xm7EfOjSwmcjr8DJYc3osU,128
|
|
4
4
|
api_logic_server_cli/cli.py,sha256=AT1cWszOygHWIbpxDoXFhaTeSai3Tf5SbGoXvN4h510,83134
|
|
5
5
|
api_logic_server_cli/cli_args_base.py,sha256=lr27KkOB7_WpZwTs7LgiK8LKDIHMKQkoZCTnE99BFxw,3280
|
|
6
6
|
api_logic_server_cli/cli_args_project.py,sha256=I5no_fGRV_ZsK3SuttVDAaQYI4Q5zCjx6LojGkM024w,4645
|
|
7
7
|
api_logic_server_cli/extended_builder.py,sha256=EhtXGAt_RrDR2tCtgvc2U82we7fr-F6pP-e6HS6dQWQ,13867
|
|
8
8
|
api_logic_server_cli/logging.yml,sha256=isWhKviFwJwYgjIUejfhUxcMli2zEbZeQbEvVhNk_4Y,1812
|
|
9
9
|
api_logic_server_cli/manager.py,sha256=pLBJkGYhSFBifW97D162WWqA1UDoIwEXH7A6nBK4j1Y,11048
|
|
10
|
-
api_logic_server_cli/add_cust/add_cust.py,sha256=
|
|
10
|
+
api_logic_server_cli/add_cust/add_cust.py,sha256=ZRmCr62ljocGuiMgplFhpLMFfLJrqsGo7KX0-zKZx-U,14046
|
|
11
11
|
api_logic_server_cli/create_from_model/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
|
|
12
12
|
api_logic_server_cli/create_from_model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
13
|
api_logic_server_cli/create_from_model/api_expose_api_models_creator.py,sha256=V-u3Hm404doztw66YuD2A043RCFmtw5QF5tMioC_1b0,7900
|
|
14
14
|
api_logic_server_cli/create_from_model/api_logic_server_utils.py,sha256=G5ifhuR8OIujUHoklZ-XZyowCpUGKJrkLuyB9sSEf34,26728
|
|
15
15
|
api_logic_server_cli/create_from_model/create_db_from_model.py,sha256=2H7slGnk39XOSnvL7vxrg6Ewx4bxeBJBgLo8fcXHTB4,4382
|
|
16
|
-
api_logic_server_cli/create_from_model/dbml.py,sha256=
|
|
16
|
+
api_logic_server_cli/create_from_model/dbml.py,sha256=UKBIXUDGgm0yk0GefBB6Nu3FDwHf_daYV6qfPM0716U,11557
|
|
17
17
|
api_logic_server_cli/create_from_model/meta_model.py,sha256=ERf7tSgnSJSeRMVyggkdg-lvORQZSbfK0KMpL63qSEY,5837
|
|
18
18
|
api_logic_server_cli/create_from_model/model_creation_services.py,sha256=B86ljgUR98H_dCaxqiw-flrbvc05-XXtkC5It2BSezs,41479
|
|
19
19
|
api_logic_server_cli/create_from_model/ont_build.py,sha256=5BcmM0xW-0vjr9J_u1o0_3joLfKhcLeDWP31dcy5dzI,67028
|
|
@@ -24,7 +24,7 @@ api_logic_server_cli/create_from_model/__pycache__/__init__.cpython-312.pyc,sha2
|
|
|
24
24
|
api_logic_server_cli/create_from_model/__pycache__/api_expose_api_models_creator.cpython-312.pyc,sha256=3wtCiVHOjOgIonZOgnCsF2p01zcXIapx1_Tq2LwzY6Q,6989
|
|
25
25
|
api_logic_server_cli/create_from_model/__pycache__/api_logic_server_utils.cpython-312.pyc,sha256=Qa-lL19TM5dAwMgVmT6ld7iB_Bb7RR0oYpEzlC2UmHM,27403
|
|
26
26
|
api_logic_server_cli/create_from_model/__pycache__/create_db_from_model.cpython-312.pyc,sha256=5eE8pIEa-OoUOk0xn_b78cCc9dSmxjTMn3HGJbxbFY4,4799
|
|
27
|
-
api_logic_server_cli/create_from_model/__pycache__/dbml.cpython-312.pyc,sha256=
|
|
27
|
+
api_logic_server_cli/create_from_model/__pycache__/dbml.cpython-312.pyc,sha256=gJsMCXlkMupUzNYYqecR5sX9prwmZfo3TpzqssSKh3Y,12671
|
|
28
28
|
api_logic_server_cli/create_from_model/__pycache__/meta_model.cpython-312.pyc,sha256=BH5Cflj8YKf0CVkHpIZ_3eBbHXhwIWbwsrzM7DsEikE,7098
|
|
29
29
|
api_logic_server_cli/create_from_model/__pycache__/model_creation_services.cpython-312.pyc,sha256=_pJPTvkJL22Eu1BWM48VfXcyapD366OnXBqHGn-wtO0,36462
|
|
30
30
|
api_logic_server_cli/create_from_model/__pycache__/ont_build.cpython-312.pyc,sha256=Hni6k7GidAkkz-YO2kvmQOMYdCdCWvGWxX3HIPjj1eE,75285
|
|
@@ -478,7 +478,7 @@ api_logic_server_cli/genai/genai.py,sha256=rt4XW_xmo-D5fLD8DQBHMjrU7Teflw43S8lR-
|
|
|
478
478
|
api_logic_server_cli/genai/genai_fatal_excp.py,sha256=1FmDVcXVRqmG0JMVZ7l4KqMOdpff3KGZ2LPAGtw304Q,179
|
|
479
479
|
api_logic_server_cli/genai/genai_graphics.py,sha256=RVLbcHoERS7F2l3WiwKrJkn3VnhQ07A-1ru55IvS4dU,20610
|
|
480
480
|
api_logic_server_cli/genai/genai_logic_builder.py,sha256=u_89UtrALIfcMtW6p0SZ78lCmwRqerA5igyY2hDvjlk,26150
|
|
481
|
-
api_logic_server_cli/genai/genai_svcs.py,sha256=
|
|
481
|
+
api_logic_server_cli/genai/genai_svcs.py,sha256=6qHNj-17S2bkIm8F1nCFGzudLSViTP2WgP_XkAATQf0,48578
|
|
482
482
|
api_logic_server_cli/genai/genai_utils.py,sha256=DTlWTnW5_2pzX4q1VG1tWqoZPVObDHR97SVe0z8Z3rs,17102
|
|
483
483
|
api_logic_server_cli/genai/json2rules.py,sha256=ykoxxgZgqllzt8Ud06S-R_3QtumxXfmF5ksYC0Hh2Sk,2645
|
|
484
484
|
api_logic_server_cli/model_migrator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -536,7 +536,7 @@ api_logic_server_cli/prototypes/base/api/expose_api_models.py,sha256=XhmZe_8Hnup
|
|
|
536
536
|
api_logic_server_cli/prototypes/base/api/json_encoder.py,sha256=3EFDSi9jdaS4jSOs5EwyltWwTy-8QEoBN2afYknpCdQ,521
|
|
537
537
|
api_logic_server_cli/prototypes/base/api/readme_customize_api.md,sha256=AEeBybDsXSDr2IlqGZCo17ZModZnrflAOCx2a6gP_rE,4165
|
|
538
538
|
api_logic_server_cli/prototypes/base/api/api_discovery/auto_discovery.py,sha256=y6uQ_i9t8qqmjsM69rZzzp2q3OaAbSrwlfeRIrR_sRY,1099
|
|
539
|
-
api_logic_server_cli/prototypes/base/api/api_discovery/mcp_discovery.py,sha256=
|
|
539
|
+
api_logic_server_cli/prototypes/base/api/api_discovery/mcp_discovery.py,sha256=4hXYBCg_3XP2mJ_UJFnxyI7agN_TCUEuOSmf_w29vDw,4088
|
|
540
540
|
api_logic_server_cli/prototypes/base/api/api_discovery/new_service.py,sha256=xe2AAFvpQwjrwwGAXs4pdZ8dWtcqAJ5KKYL_QKyqvGg,638
|
|
541
541
|
api_logic_server_cli/prototypes/base/api/api_discovery/newer_service.py,sha256=p1ah8Pj2kjuTIlktYrtvdiuzGUEaPy7qLa7Cvu0GgbA,659
|
|
542
542
|
api_logic_server_cli/prototypes/base/api/api_discovery/ontimize_api.py,sha256=_gNyxbx6ExbrCy3uzz8JzBBDZRxPyHoyRH7vJRqV1NM,20340
|
|
@@ -553,9 +553,9 @@ api_logic_server_cli/prototypes/base/config/activate_logicbank.py,sha256=IuDe3uW
|
|
|
553
553
|
api_logic_server_cli/prototypes/base/config/config.py,sha256=SMkt_SmMFfQ1g9a9wG0bZNM7yUsRANxFCz2EFWs-WeY,30879
|
|
554
554
|
api_logic_server_cli/prototypes/base/config/default.env,sha256=-rjXJrjR4vjMr9YCVYVchaJw7qMBlbvQ3KfR_wri_XM,412
|
|
555
555
|
api_logic_server_cli/prototypes/base/config/logging-reduced.yml,sha256=N-BDIk0t5uAmw3Of_d_ueK4jx7pxNwlYbkiDd1wjRDs,2179
|
|
556
|
-
api_logic_server_cli/prototypes/base/config/logging.yml,sha256=
|
|
556
|
+
api_logic_server_cli/prototypes/base/config/logging.yml,sha256=Rj7lwLAQ1fiP5al5KZxL8f5CXuICpGJDuJiLJbqcQTE,2426
|
|
557
557
|
api_logic_server_cli/prototypes/base/config/mypy.ini,sha256=2jL3ZtXg9SmJZu6zVQS_hmvO8wyVF1a1JWcVZplXLEk,568
|
|
558
|
-
api_logic_server_cli/prototypes/base/config/server_setup.py,sha256=
|
|
558
|
+
api_logic_server_cli/prototypes/base/config/server_setup.py,sha256=tku0B4O4du554_aVFBXpCgAaEDMaOEVO7cn0spwHpJc,18340
|
|
559
559
|
api_logic_server_cli/prototypes/base/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
560
560
|
api_logic_server_cli/prototypes/base/database/alembic.ini,sha256=N-xPrNv1gfMB8ylxm8pprtQxjwlv_9vTUSYGXnaWMnA,3027
|
|
561
561
|
api_logic_server_cli/prototypes/base/database/authentication_db.sqlite,sha256=hA71uBnrh2PVQw9YLc-YbsXjpxr2VyvfE-OhF_ssE6w,45056
|
|
@@ -630,11 +630,13 @@ api_logic_server_cli/prototypes/base/integration/kafka/kafka_consumer.py,sha256=
|
|
|
630
630
|
api_logic_server_cli/prototypes/base/integration/kafka/kafka_producer.py,sha256=g0nMAVfz1Y0iKJbbXfvRpdf-QUmyB4uUGZ6lyaVoXag,4470
|
|
631
631
|
api_logic_server_cli/prototypes/base/integration/kafka/kafka_readme.md,sha256=MlwykHWM2w41KzWh4vPuTnIodR8f-BQzrWpV4P1hrsI,161
|
|
632
632
|
api_logic_server_cli/prototypes/base/integration/mcp/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
|
|
633
|
-
api_logic_server_cli/prototypes/base/integration/mcp/
|
|
634
|
-
api_logic_server_cli/prototypes/base/integration/mcp/mcp_client_executor.py,sha256=Y0kQy4oMuBhCfhZxlfm5qPVXVObjOULatpJ2lIc9qJQ,12926
|
|
635
|
-
api_logic_server_cli/prototypes/base/integration/mcp/mcp_schema.txt,sha256=qmov7e0NdYiQTCxNJU2xzxf9HnYeXFej-c8GSB-y6MM,1143
|
|
633
|
+
api_logic_server_cli/prototypes/base/integration/mcp/mcp_client_executor.py,sha256=w3H6rVgveFg_ZgQNYSb-h1BcLnLF2W45owmWKOMovXg,6559
|
|
636
634
|
api_logic_server_cli/prototypes/base/integration/mcp/mcp_server_discovery.json,sha256=TUyInb67AWoGw7XFE9iDZxmM8UEID-ahQmdmzpF9AmQ,188
|
|
637
|
-
api_logic_server_cli/prototypes/base/integration/mcp/
|
|
635
|
+
api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_discovery_response.json,sha256=f1RP5kuTU8rkqxWsZoATBF8xdaVEgPTaB4MRoExIF-Q,3763
|
|
636
|
+
api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_request.prompt,sha256=vmt_fvwOK-C2fnI1LLUMe5WbLk6qxv2RdVJkBUTo9zM,2601
|
|
637
|
+
api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_schema.txt,sha256=qmov7e0NdYiQTCxNJU2xzxf9HnYeXFej-c8GSB-y6MM,1143
|
|
638
|
+
api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_tool_context_response.json,sha256=N1bzqc5JMQ7j12ThVuJ-6D8w9ZSmo5c3P0eThd-Q2Mo,1012
|
|
639
|
+
api_logic_server_cli/prototypes/base/integration/mcp/examples/mcp_tool_context_response_get.json,sha256=SDh8CkbL_fRGS7dDwcTofMlPziIu8Ycdests-jAeG6w,419
|
|
638
640
|
api_logic_server_cli/prototypes/base/integration/n8n/N8N_WebHook_from_ApiLogicServer.json,sha256=s9JuoF9gLiuNZAD0dTVdnwQpORQHe0TseyPNVDe048w,10606
|
|
639
641
|
api_logic_server_cli/prototypes/base/integration/n8n/n8n_producer.py,sha256=LuMec7HNwjaCsyMQSTTRpx9tW6l3OiV1StWrnahJBPA,7314
|
|
640
642
|
api_logic_server_cli/prototypes/base/integration/n8n/n8n_readme.md,sha256=8RisYrm8ORUbtu-Duis19DJTBMGW32LymWYZN9A0pF0,3130
|
|
@@ -699,27 +701,19 @@ api_logic_server_cli/prototypes/base/venv_setup/venv.ps1,sha256=_-LfKkLw5HOkZsF5
|
|
|
699
701
|
api_logic_server_cli/prototypes/base/venv_setup/venv.sh,sha256=aWX9fa8fe6aO9ifBIZEgGY5UGh4I0arOoCwBzDsxgU8,893
|
|
700
702
|
api_logic_server_cli/prototypes/basic_demo/README.md,sha256=QHVOtJq7A_9RtTwrrecbbYbdBf3buxkhBgPpX342wAA,18685
|
|
701
703
|
api_logic_server_cli/prototypes/basic_demo/customizations/api/.DS_Store,sha256=6F7pphfwiMhILhl_J6yVhDZFYXmar5V92iLCzSkfnyA,6148
|
|
702
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/mcp_discovery.py,sha256=YBgu5EOzrNhhdIPLUN4mplAy5WCy_KodK7LCMZlz6xk,3748
|
|
703
704
|
api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/openapi.py,sha256=kLQ7Fn1J7tzuNJHBXF2AiwtzvQ-0JxJ6z-MfFryAtLk,3887
|
|
704
705
|
api_logic_server_cli/prototypes/basic_demo/customizations/config/default.env,sha256=-rjXJrjR4vjMr9YCVYVchaJw7qMBlbvQ3KfR_wri_XM,412
|
|
705
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/config/server_setup.py,sha256=bV48ou0jSEm2o5yhTVgms1w7rqU9Ccf_2yfZip3ivJk,15441
|
|
706
706
|
api_logic_server_cli/prototypes/basic_demo/customizations/database/db.sqlite,sha256=wfrMPS1h9bq5hT0u901p2FjlGIFZsKZkTy77tzrkzsM,28672
|
|
707
707
|
api_logic_server_cli/prototypes/basic_demo/customizations/database/models.py,sha256=sg-ihsH386778vf2DtW0edzf8oCqDVp1NCqhyWXAbLw,4895
|
|
708
708
|
api_logic_server_cli/prototypes/basic_demo/customizations/database/system/SAFRSBaseX.py,sha256=VeiUgXr9pkgvxchCf89lhRKNBlfj4_FYwAweu3NWj-M,5394
|
|
709
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/.DS_Store,sha256=1lFlJ5EFymdzGAUAaI30vcaaLHt3F1LwpG7xILf9jsM,6148
|
|
710
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/README_mcp.md,sha256=ZXLgtvqQCcGouxFE_7pu6OA3Qu1Qm3Jh-gcQxuFKb_w,1216
|
|
711
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/Zmcp_client_executor.py,sha256=wLjr6RDFpweCMCItno5OGUgNaMDYkYIBtwc7sUqNAG4,12945
|
|
712
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_schema.txt,sha256=qmov7e0NdYiQTCxNJU2xzxf9HnYeXFej-c8GSB-y6MM,1143
|
|
713
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_server_discovery.json,sha256=TUyInb67AWoGw7XFE9iDZxmM8UEID-ahQmdmzpF9AmQ,188
|
|
714
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/mcp_tool_context.json,sha256=UB25uyOO5Jnx5k5Sxe7c8MQxc6V0R1FsA4HhpHoKgw4,846
|
|
715
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/integration/mcp/test_notes.txt,sha256=71Qqw7FRVGtEoHCxlGRPpaizvBh1L-X-MTOwkZ6CY3A,11126
|
|
716
709
|
api_logic_server_cli/prototypes/basic_demo/customizations/logic/cocktail-napkin.jpg,sha256=5rNSy6wvcWSHPJQZqkf2DHs19QLWiyqMBNwxGqjstZU,133075
|
|
717
710
|
api_logic_server_cli/prototypes/basic_demo/customizations/logic/declare_logic.py,sha256=Yk-X017gZM1egx4MXSx_FGURj4KDqJfpq1NWVFrwfEY,4612
|
|
718
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/logic/logic_discovery/email_request.py,sha256=
|
|
719
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/logic/logic_discovery/mcp_client_executor_request.py,sha256=
|
|
711
|
+
api_logic_server_cli/prototypes/basic_demo/customizations/logic/logic_discovery/email_request.py,sha256=3UnBUBpHSThHHRLLJuV-sgRAs6sS-UCzsTjBzf0onns,1851
|
|
712
|
+
api_logic_server_cli/prototypes/basic_demo/customizations/logic/logic_discovery/mcp_client_executor_request.py,sha256=TkruzfnJ53HclWcPTx69du-XsRRAk6O67RsQkCJgUu4,2062
|
|
720
713
|
api_logic_server_cli/prototypes/basic_demo/customizations/logic/logic_discovery/simple_constraints.py,sha256=4HRLOXuLJP1eOosONeEtpA9DehxiZME0-FBKuG1RaI0,760
|
|
721
714
|
api_logic_server_cli/prototypes/basic_demo/customizations/security/declare_security.py,sha256=gbdH29cPY656lgROPm_w20Q-g6AhlIMES3wiIrqBTdk,2439
|
|
722
|
-
api_logic_server_cli/prototypes/basic_demo/customizations/ui/admin/admin.yaml,sha256=
|
|
715
|
+
api_logic_server_cli/prototypes/basic_demo/customizations/ui/admin/admin.yaml,sha256=PynSqW6qUh5JcRJKkgX-aSv8GjmCXxBflBTzRVTa0R0,3503
|
|
716
|
+
api_logic_server_cli/prototypes/basic_demo/customizations/ui/admin/home.js,sha256=0YSOlZAyhYOm7eKSVRMspzEc_P7PO-lRaUurYGCqQ10,3371
|
|
723
717
|
api_logic_server_cli/prototypes/basic_demo/iteration/api/api_discovery/order_b2b.py,sha256=hg9Bsz0_t-RjO9rFcW-YH3y26kq4IY5dd9FfVoYxB4w,3176
|
|
724
718
|
api_logic_server_cli/prototypes/basic_demo/iteration/database/db.sqlite,sha256=QsU34YuKT_YjPF-v6vDtcNJWV6AV2mspqAqW1VoMH5M,28672
|
|
725
719
|
api_logic_server_cli/prototypes/basic_demo/iteration/docs/er_diagram.png,sha256=-3aSv9ay7XeFqGU-cygRz5T5eYhY627BYmA6GXdUYH0,161072
|
|
@@ -762,8 +756,7 @@ api_logic_server_cli/prototypes/genai_demo/logic/readme_declare_logic.md,sha256=
|
|
|
762
756
|
api_logic_server_cli/prototypes/genai_demo/security/declare_security.py,sha256=L3AL1bgdqIWQxdkJZcFVDOQ0XRpmeLAKqwlAYChFWKo,2108
|
|
763
757
|
api_logic_server_cli/prototypes/genai_demo/ui/admin/admin.yaml,sha256=vMpr6to6g-h9gSuhxfpTeDMw5_R_eUKbV7qXzMEvIyk,3446
|
|
764
758
|
api_logic_server_cli/prototypes/manager/.gitignore,sha256=xfAjNQHokbo6GuN1ghx-eml8tQIzwUczLC_YVzElndI,195
|
|
765
|
-
api_logic_server_cli/prototypes/manager/
|
|
766
|
-
api_logic_server_cli/prototypes/manager/REAMDE.md,sha256=mxcXCV8lx7LcqJO6zL7IveRjDJRrR4VJjoXNW_BGA60,36074
|
|
759
|
+
api_logic_server_cli/prototypes/manager/README.md,sha256=Kx8b1c0tKUbUSmCXtg418Kjc0dHxXavX-xY2zAwB7vM,37543
|
|
767
760
|
api_logic_server_cli/prototypes/manager/run_sample.sh,sha256=eRA-p_Snr7Pwk14wUw5mja2usEcjAKisHVhHMeSaQ68,781
|
|
768
761
|
api_logic_server_cli/prototypes/manager/run_web_genai.sh,sha256=sgjB3vKhkao93Ny3VN0AQ-wonvdBcBIT3rTbyNTMoG8,136
|
|
769
762
|
api_logic_server_cli/prototypes/manager/settings.txt,sha256=_jjL30jomIMxG21edDfrXYRT9Zfgr_0EdUWvcEUOnFQ,368
|
|
@@ -5652,7 +5645,7 @@ api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/html_tem
|
|
|
5652
5645
|
api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/index.html,sha256=rTl5u1AtZRIBSxK4aANBRaJK3GZOML6eiVp6Tf_2LkI,567
|
|
5653
5646
|
api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/sales_by_region.jinja,sha256=k93hwOF2KslZEWw31wIobVPdbigsjNUkRWsjec2DdbM,1848
|
|
5654
5647
|
api_logic_server_cli/prototypes/manager/system/genai/learning_requests/logic_bank_api.prompt,sha256=1rBJy-rUHPx9YepSZH9niQocGbxtpbGyX2QmDxVsFd0,14489
|
|
5655
|
-
api_logic_server_cli/prototypes/manager/system/genai/mcp_learning/mcp.prompt,sha256=
|
|
5648
|
+
api_logic_server_cli/prototypes/manager/system/genai/mcp_learning/mcp.prompt,sha256=XWE8K5KcWLgsHa1tdyFv-klbWk7wnzI_TcUZ67jMB84,1291
|
|
5656
5649
|
api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/fixup.prompt,sha256=ZdVl-0J9oi8dS_3pDTrwdtvMSpDymbArTIlSEwcjCrM,305
|
|
5657
5650
|
api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/graphics.prompt,sha256=FisvgcF8h2bdOL9iYQHOCT5NmW9RipnHzI6mzin3g8o,1265
|
|
5658
5651
|
api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/graphics_request.prompt,sha256=T8lILtS_BtOjkalJPpiziVqlHVVc2PV6nz6qikNO808,175
|
|
@@ -6096,9 +6089,9 @@ api_logic_server_cli/tools/mini_skel/database/system/SAFRSBaseX.py,sha256=p8C7AF
|
|
|
6096
6089
|
api_logic_server_cli/tools/mini_skel/database/system/TestDataBase.py,sha256=U02SYqThsbY5g3DX7XGaiMxjZBuOpzvtPS6RfI1WQFg,371
|
|
6097
6090
|
api_logic_server_cli/tools/mini_skel/logic/declare_logic.py,sha256=fTrlHyqMeZsw_TyEXFa1VlYBL7fzjZab5ONSXO7aApo,175
|
|
6098
6091
|
api_logic_server_cli/tools/mini_skel/logic/load_verify_rules.py,sha256=Rr5bySJpYCZmNPF2h-phcPJ53nAOPcT_ohZpCD93-a0,7530
|
|
6099
|
-
apilogicserver-
|
|
6100
|
-
apilogicserver-
|
|
6101
|
-
apilogicserver-
|
|
6102
|
-
apilogicserver-
|
|
6103
|
-
apilogicserver-
|
|
6104
|
-
apilogicserver-
|
|
6092
|
+
apilogicserver-15.0.9.dist-info/licenses/LICENSE,sha256=67BS7VC-Z8GpaR3wijngQJkHWV04qJrwQArVgn9ldoI,1485
|
|
6093
|
+
apilogicserver-15.0.9.dist-info/METADATA,sha256=sDuEWjnABJFeKoHsc_hdv0S_uef_IzdmtONeUzy27mc,6548
|
|
6094
|
+
apilogicserver-15.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6095
|
+
apilogicserver-15.0.9.dist-info/entry_points.txt,sha256=KiLloZJ3c_RW-nIDqBtoE0WEsQTnZ3dELwHLWi23LMA,103
|
|
6096
|
+
apilogicserver-15.0.9.dist-info/top_level.txt,sha256=-r0AT_GEApleihg-jIh0OMvzzc0BO1RuhhOpE91H5qI,21
|
|
6097
|
+
apilogicserver-15.0.9.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
Model Context Protocol is a way for:
|
|
2
|
-
|
|
3
|
-
1. **Bus User ad hoc flows** using existing published mcp services (vs. hard-coding in IT as an endpoint; flows can be cached for repeated use)
|
|
4
|
-
|
|
5
|
-
* ***Natural Language access*** to corporate databases for improved user interfaces
|
|
6
|
-
|
|
7
|
-
* LLMs ***choreograph*** multiple MCP calls (to 1 or more MCP servers) in a chain of calls - an agentic workflow. MCPs support shared contexts and goals, enabling the LLM to use the result from 1 call to determine whether the goals has been reached, or which service is appropriate to call next
|
|
8
|
-
|
|
9
|
-
3. Chat agents to ***discover*** and ***call*** external servers, be they databases, APIs, file systems, etc. MCPs support shared contexts and goals, enabling the LLM
|
|
10
|
-
|
|
11
|
-
* ***Corporate database participation*** in such flows, by making key functions available as MCP calls.
|
|
12
|
-
|
|
13
|
-
This example is [explained here](https://apilogicserver.github.io/Docs/Integration-MCP/).
|
|
14
|
-
|
|
15
|
-
> Note: this sample uses multi-term filters. These are usually OR'd together, but this example requires AND. This is provided by `database/system/SAFRSBaseX.py` (see `return query.filter(operator.and_(*expressions)`) in `_s_filter()`), activated in `config/server_setup.py`.
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
LLM request - new...?
|
|
2
|
-
|
|
3
|
-
[
|
|
4
|
-
{
|
|
5
|
-
"role": "system",
|
|
6
|
-
"content": "You are an API planner that converts natural language queries into MCP Tool Context blocks using JSON:API. Return only the tool context as JSON."
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"role": "user",
|
|
10
|
-
"content": "Schema:\n{\"base_url\": \"http://localhost:5656/api\", \"description\": \"API Logic Project: basic_demo\", \"email_services\": \"iff email is requested, Send email by issing a POST request to the Email endpoint, setting the subject, message and customer_id in the body.\", \"expected_response\": \"Respond with a JSON object with schema_version and a resource array including: tool_type, base_url, path, method, query_params array or body, headers.\", \"query_params\": \"- JSON:API custom filtering using a filter array (e.g., filter=[{\\\"name\\\":\\\"date_shipped\\\",\\\"op\\\":\\\"gt\\\",\\\"val\\\":\\\"2023-07-14\\\"}])\", \"resources\": [{\"fields\": [\"id\", \"name\", \"balance\", \"credit_limit\"], \"filterable\": [\"id\", \"name\", \"balance\", \"credit_limit\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Customer\", \"path\": \"/Customer\"}, {\"fields\": [\"id\", \"order_id\", \"product_id\", \"quantity\", \"amount\", \"unit_price\"], \"filterable\": [\"id\", \"order_id\", \"product_id\", \"quantity\", \"amount\", \"unit_price\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Item\", \"path\": \"/Item\"}, {\"fields\": [\"id\", \"notes\", \"customer_id\", \"date_shipped\", \"amount_total\"], \"filterable\": [\"id\", \"notes\", \"customer_id\", \"date_shipped\", \"amount_total\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Order\", \"path\": \"/Order\"}, {\"fields\": [\"id\", \"name\", \"unit_price\"], \"filterable\": [\"id\", \"name\", \"unit_price\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Product\", \"path\": \"/Product\"}, {\"fields\": [\"id\", \"request\", \"request_prompt\", \"completion\"], \"filterable\": [\"id\", \"request\", \"request_prompt\", \"completion\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Mcp\", \"path\": \"/Mcp\"}], \"schema_version\": \"1.0\", \"tool_type\": \"json-api\"}\n\nNatural language query: 'List the unshipped orders created before 2023-07-14, and send a discount email (subject: 'Discount Offer') to the customer for each one.'"
|
|
11
|
-
}
|
|
12
|
-
]
|
|
13
|
-
|
|
14
|
-
LLM request - old
|
|
15
|
-
[
|
|
16
|
-
{
|
|
17
|
-
"role": "system",
|
|
18
|
-
"content": "You are an API planner that converts natural language queries into MCP Tool Context blocks using JSON:API. Return only the tool context as JSON."
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"role": "user",
|
|
22
|
-
"content": "Schema:\n{\"base_url\": \"http://localhost:5656/api\", \"description\": \"API Logic Project: basic_demo\", \"email_services\": \"iff email is requested, Send email by issing a POST request to the Email endpoint, setting the subject, message and customer_id in the body.\", \"expected_response\": \"Respond with a JSON object with schema_version and a resource array including: tool_type, base_url, path, method, query_params array or body, headers.\", \"query_params\": \"- JSON:API custom filtering using a filter array (e.g., filter=[{\\\"name\\\":\\\"date_shipped\\\",\\\"op\\\":\\\"gt\\\",\\\"val\\\":\\\"2023-07-14\\\"}])\", \"resources\": [{\"fields\": [\"id\", \"name\", \"balance\", \"credit_limit\"], \"filterable\": [\"id\", \"name\", \"balance\", \"credit_limit\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Customer\", \"path\": \"/Customer\"}, {\"fields\": [\"id\", \"order_id\", \"product_id\", \"quantity\", \"amount\", \"unit_price\"], \"filterable\": [\"id\", \"order_id\", \"product_id\", \"quantity\", \"amount\", \"unit_price\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Item\", \"path\": \"/Item\"}, {\"fields\": [\"id\", \"notes\", \"customer_id\", \"date_shipped\", \"amount_total\"], \"filterable\": [\"id\", \"notes\", \"customer_id\", \"date_shipped\", \"amount_total\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Order\", \"path\": \"/Order\"}, {\"fields\": [\"id\", \"name\", \"unit_price\"], \"filterable\": [\"id\", \"name\", \"unit_price\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Product\", \"path\": \"/Product\"}, {\"fields\": [\"id\", \"request\", \"request_prompt\", \"completion\"], \"filterable\": [\"id\", \"request\", \"request_prompt\", \"completion\"], \"methods\": [\"GET\", \"PATCH\", \"POST\", \"DELETE\"], \"name\": \"Mcp\", \"path\": \"/Mcp\"}], \"schema_version\": \"1.0\", \"tool_type\": \"json-api\"}\n\nNatural language query: 'List the unshipped orders created before 2023-07-14, and send a discount email (subject: 'Discount Offer') to the customer for each one.'"
|
|
23
|
-
}
|
|
24
|
-
]
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
messages - new
|
|
28
|
-
[{'role': 'system', 'content': 'You are an API planner that converts natural language queries into MCP Tool Context b...API. Return only the tool context as JSON.'}, {'role': 'user', 'content': 'Schema:\n{"base_url": "http://localhost:5656/api", "description": "API Logic Project: ...) to the customer for each one.'"}]
|
|
29
|
-
|
|
30
|
-
messages- old
|
|
31
|
-
[{'role': 'system', 'content': 'You are an API planner that converts natural language queries into MCP Tool Context blocks using JSON:API. Return only the tool context as JSON.'}, {'role': 'user', 'content': 'Schema:\n{"base_url": "http://localhost:5656/api", "description": "API Logic Project: basic_demo", "email_services": "iff email is requested, Send email by issing a POST request to the Email endpoint, setting the subject, message and customer_id in the body.", "expected_response": "Respond with a JSON object with schema_version and a resource array including: tool_type, base_url, path, method, query_params array or body, headers.", "query_params": "- JSON:API custom filtering using a filter array (e.g., filter=[{\\"name\\":\\"date_shipped\\",\\"op\\":\\"gt\\",\\"val\\":\\"2023-07-14\\"}])", "resources": [{"fields": ["id", "name", "balance", "credit_limit"], "filterable": ["id", "name", "balance", "credit_limit"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Customer", "path": "/Customer"}, {"fields": ["id", "order_id", "product_id", "quantity", "amount", "unit_price"], "filterable": ["id", "order_id", "product_id", "quantity", "amount", "unit_price"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Item", "path": "/Item"}, {"fields": ["id", "notes", "customer_id", "date_shipped", "amount_total"], "filterable": ["id", "notes", "customer_id", "date_shipped", "amount_total"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Order", "path": "/Order"}, {"fields": ["id", "name", "unit_price"], "filterable": ["id", "name", "unit_price"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Product", "path": "/Product"}, {"fields": ["id", "request", "request_prompt", "completion"], "filterable": ["id", "request", "request_prompt", "completion"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Mcp", "path": "/Mcp"}], "schema_version": "1.0", "tool_type": "json-api"}\n\nNatural language query: \'List the unshipped orders created before 2023-07-14, and send a discount email (subject: \'Discount Offer\') to the customer for each one.\''}]
|
|
32
|
-
|
|
33
|
-
old content
|
|
34
|
-
'Schema:\n{"base_url": "http://localhost:5656/api", "description": "API Logic Project: basic_demo", "email_services": "iff email is requested, Send email by issing a POST request to the Email endpoint, setting the subject, message and customer_id in the body.", "expected_response": "Respond with a JSON object with schema_version and a resource array including: tool_type, base_url, path, method, query_params array or body, headers.", "query_params": "- JSON:API custom filtering using a filter array (e.g., filter=[{\\"name\\":\\"date_shipped\\",\\"op\\":\\"gt\\",\\"val\\":\\"2023-07-14\\"}])", "resources": [{"fields": ["id", "name", "balance", "credit_limit"], "filterable": ["id", "name", "balance", "credit_limit"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Customer", "path": "/Customer"}, {"fields": ["id", "order_id", "product_id", "quantity", "amount", "unit_price"], "filterable": ["id", "order_id", "product_id", "quantity", "amount", "unit_price"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Item", "path": "/Item"}, {"fields": ["id", "notes", "customer_id", "date_shipped", "amount_total"], "filterable": ["id", "notes", "customer_id", "date_shipped", "amount_total"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Order", "path": "/Order"}, {"fields": ["id", "name", "unit_price"], "filterable": ["id", "name", "unit_price"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Product", "path": "/Product"}, {"fields": ["id", "request", "request_prompt", "completion"], "filterable": ["id", "request", "request_prompt", "completion"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Mcp", "path": "/Mcp"}], "schema_version": "1.0", "tool_type": "json-api"}\n\nNatural language query: \'List the unshipped orders created before 2023-07-14, and send a discount email (subject: \'Discount Offer\') to the customer for each one.\''
|
|
35
|
-
|
|
36
|
-
where new content looks correct:
|
|
37
|
-
'Schema:\n{"base_url": "http://localhost:5656/api", "description": "API Logic Project: basic_demo", "email_services": "iff email is requested, Send email by issing a POST request to the Email endpoint, setting the subject, message and customer_id in the body.", "expected_response": "Respond with a JSON object with schema_version and a resource array including: tool_type, base_url, path, method, query_params array or body, headers.", "query_params": "- JSON:API custom filtering using a filter array (e.g., filter=[{\\"name\\":\\"date_shipped\\",\\"op\\":\\"gt\\",\\"val\\":\\"2023-07-14\\"}])", "resources": [{"fields": ["id", "name", "balance", "credit_limit"], "filterable": ["id", "name", "balance", "credit_limit"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Customer", "path": "/Customer"}, {"fields": ["id", "order_id", "product_id", "quantity", "amount", "unit_price"], "filterable": ["id", "order_id", "product_id", "quantity", "amount", "unit_price"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Item", "path": "/Item"}, {"fields": ["id", "notes", "customer_id", "date_shipped", "amount_total"], "filterable": ["id", "notes", "customer_id", "date_shipped", "amount_total"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Order", "path": "/Order"}, {"fields": ["id", "name", "unit_price"], "filterable": ["id", "name", "unit_price"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Product", "path": "/Product"}, {"fields": ["id", "request", "request_prompt", "completion"], "filterable": ["id", "request", "request_prompt", "completion"], "methods": ["GET", "PATCH", "POST", "DELETE"], "name": "Mcp", "path": "/Mcp"}], "schema_version": "1.0", "tool_type": "json-api"}\n\nNatural language query: \'List the unshipped orders created before 2023-07-14, and send a discount email (subject: \'Discount Offer\') to the customer for each one.\''
|
api_logic_server_cli/prototypes/basic_demo/customizations/api/api_discovery/mcp_discovery.py
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
from flask import request, jsonify
|
|
2
|
-
from flask import Flask, redirect, send_from_directory, send_file
|
|
3
|
-
import logging
|
|
4
|
-
import os
|
|
5
|
-
import json
|
|
6
|
-
import io
|
|
7
|
-
|
|
8
|
-
import requests
|
|
9
|
-
from config.config import Args # circular import error if at top
|
|
10
|
-
|
|
11
|
-
app_logger = logging.getLogger("api_logic_server_app")
|
|
12
|
-
|
|
13
|
-
def add_service(app, api, project_dir, swagger_host: str, PORT: str, method_decorators = []):
|
|
14
|
-
pass
|
|
15
|
-
|
|
16
|
-
def get_server_url():
|
|
17
|
-
""" return the server URL for the OpenAPI spec """
|
|
18
|
-
result = f'http://{Args.instance.swagger_host}:{Args.instance.swagger_port}'
|
|
19
|
-
# get env variable API_LOGIC_SERVER_TUNNEL (or None)
|
|
20
|
-
if tunnel_url := os.getenv("API_LOGIC_SERVER_TUNNEL", None):
|
|
21
|
-
app_logger.info(f".. tunnel URL: {tunnel_url}")
|
|
22
|
-
result = tunnel_url
|
|
23
|
-
return result # + '/api'
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@app.before_request
|
|
27
|
-
def before_any_request():
|
|
28
|
-
# print(f"[DEBUG] Incoming request: {request.method} {request.url}")
|
|
29
|
-
if activate_openapi_logging := True:
|
|
30
|
-
if request.content_type == 'application/json' and request.method in ['POST', 'PUT', 'PATCH']:
|
|
31
|
-
# openapi: Incoming request: PATCH http://localhost:5656/api/Customer/1/ {'data': {'attributes': {'credit_limit': 5555}, 'type': 'Customer', 'id': '1'}}
|
|
32
|
-
# openapi: Incoming request: PATCH http://6f6f-2601-644-4900-d6f0-ecc9-6df3-8863-c5b2.ngrok-free.app/api/Customer/1 {'credit_limit': 5555}
|
|
33
|
-
|
|
34
|
-
app_logger.info(f"openapi: Incoming request: {request.method} {request.url} {str(request.json)}")
|
|
35
|
-
else:
|
|
36
|
-
app_logger.info(f"openapi: Incoming request: {request.method} {request.url}")
|
|
37
|
-
# app_logger.info(f"openapi: Incoming request headers: {request.headers}")
|
|
38
|
-
|
|
39
|
-
chatgpt_request_json = {
|
|
40
|
-
"credit_limit": 25000,
|
|
41
|
-
}
|
|
42
|
-
standard_request_json = {
|
|
43
|
-
"data": {
|
|
44
|
-
"type": "Customer",
|
|
45
|
-
"id": "ALFKI",
|
|
46
|
-
"attributes": {
|
|
47
|
-
"name": "Alice",
|
|
48
|
-
"credit_limit": 25000,
|
|
49
|
-
"balance": 12345
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
swagger_request_json = {
|
|
54
|
-
'data': {
|
|
55
|
-
'attributes': {
|
|
56
|
-
'credit_limit': 5555
|
|
57
|
-
},
|
|
58
|
-
'type': 'Customer',
|
|
59
|
-
'id': '1'
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
pass
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
@app.route('/.well-known/mcp.json', methods=['GET'])
|
|
66
|
-
def mcp_discovery(path=None):
|
|
67
|
-
''' called by mcp_client_executor for discovery, eg:
|
|
68
|
-
```
|
|
69
|
-
{
|
|
70
|
-
"tool_type": "json-api",
|
|
71
|
-
"schema_version": "1.0",
|
|
72
|
-
"base_url": "https://crm.company.com",
|
|
73
|
-
"resources": [
|
|
74
|
-
{
|
|
75
|
-
"name": "Customer",
|
|
76
|
-
"path": "/Customer",
|
|
77
|
-
"methods": ["GET", "PATCH"],
|
|
78
|
-
"fields": ["id", "name", "balance", "credit_limit"],
|
|
79
|
-
"filterable": ["name", "credit_limit"],
|
|
80
|
-
"example": "List customers with credit over 5000"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
```
|
|
85
|
-
test: curl -X GET "http://localhost:5656/.well-known/mcp.json"
|
|
86
|
-
'''
|
|
87
|
-
# return docs/mcp_schema.json
|
|
88
|
-
schema_path = os.path.join(project_dir, "docs/mcp_learning/mcp_schema.json")
|
|
89
|
-
try:
|
|
90
|
-
with open(schema_path, "r") as schema_file:
|
|
91
|
-
schema = json.load(schema_file)
|
|
92
|
-
return jsonify(schema), 200
|
|
93
|
-
except Exception as e:
|
|
94
|
-
app_logger.error(f"Error loading MCP schema: {e}")
|
|
95
|
-
return jsonify({"error": "MCP schema not found"}), 404
|
|
96
|
-
pass
|