phenoml 0.0.6__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.
- phenoml/__init__.py +30 -0
- phenoml/agent/__init__.py +56 -0
- phenoml/agent/client.py +939 -0
- phenoml/agent/errors/__init__.py +11 -0
- phenoml/agent/errors/bad_request_error.py +10 -0
- phenoml/agent/errors/forbidden_error.py +10 -0
- phenoml/agent/errors/internal_server_error.py +10 -0
- phenoml/agent/errors/not_found_error.py +10 -0
- phenoml/agent/errors/unauthorized_error.py +10 -0
- phenoml/agent/prompts/__init__.py +7 -0
- phenoml/agent/prompts/client.py +707 -0
- phenoml/agent/prompts/raw_client.py +1345 -0
- phenoml/agent/prompts/types/__init__.py +8 -0
- phenoml/agent/prompts/types/prompts_delete_response.py +20 -0
- phenoml/agent/prompts/types/prompts_list_response.py +22 -0
- phenoml/agent/raw_client.py +1668 -0
- phenoml/agent/types/__init__.py +43 -0
- phenoml/agent/types/agent_chat_response.py +33 -0
- phenoml/agent/types/agent_create_request.py +53 -0
- phenoml/agent/types/agent_create_request_provider.py +5 -0
- phenoml/agent/types/agent_delete_response.py +20 -0
- phenoml/agent/types/agent_get_chat_messages_request_order.py +5 -0
- phenoml/agent/types/agent_get_chat_messages_response.py +22 -0
- phenoml/agent/types/agent_list_response.py +22 -0
- phenoml/agent/types/agent_prompts_response.py +22 -0
- phenoml/agent/types/agent_response.py +22 -0
- phenoml/agent/types/agent_template.py +58 -0
- phenoml/agent/types/agent_template_provider.py +5 -0
- phenoml/agent/types/chat_message_template.py +72 -0
- phenoml/agent/types/chat_session_template.py +67 -0
- phenoml/agent/types/json_patch.py +7 -0
- phenoml/agent/types/json_patch_operation.py +40 -0
- phenoml/agent/types/json_patch_operation_op.py +5 -0
- phenoml/agent/types/prompt_template.py +52 -0
- phenoml/agent/types/success_response.py +20 -0
- phenoml/authtoken/__init__.py +17 -0
- phenoml/authtoken/auth/__init__.py +7 -0
- phenoml/authtoken/auth/client.py +129 -0
- phenoml/authtoken/auth/raw_client.py +173 -0
- phenoml/authtoken/auth/types/__init__.py +7 -0
- phenoml/authtoken/auth/types/auth_generate_token_response.py +22 -0
- phenoml/authtoken/client.py +39 -0
- phenoml/authtoken/errors/__init__.py +8 -0
- phenoml/authtoken/errors/bad_request_error.py +10 -0
- phenoml/authtoken/errors/unauthorized_error.py +10 -0
- phenoml/authtoken/raw_client.py +13 -0
- phenoml/authtoken/types/__init__.py +8 -0
- phenoml/authtoken/types/bad_request_error_body.py +21 -0
- phenoml/authtoken/types/unauthorized_error_body.py +21 -0
- phenoml/client.py +177 -0
- phenoml/cohort/__init__.py +8 -0
- phenoml/cohort/client.py +113 -0
- phenoml/cohort/errors/__init__.py +9 -0
- phenoml/cohort/errors/bad_request_error.py +10 -0
- phenoml/cohort/errors/internal_server_error.py +10 -0
- phenoml/cohort/errors/unauthorized_error.py +10 -0
- phenoml/cohort/raw_client.py +185 -0
- phenoml/cohort/types/__init__.py +8 -0
- phenoml/cohort/types/cohort_response.py +33 -0
- phenoml/cohort/types/search_concept.py +37 -0
- phenoml/construe/__init__.py +45 -0
- phenoml/construe/client.py +399 -0
- phenoml/construe/errors/__init__.py +11 -0
- phenoml/construe/errors/bad_request_error.py +10 -0
- phenoml/construe/errors/conflict_error.py +10 -0
- phenoml/construe/errors/failed_dependency_error.py +10 -0
- phenoml/construe/errors/internal_server_error.py +10 -0
- phenoml/construe/errors/unauthorized_error.py +10 -0
- phenoml/construe/raw_client.py +706 -0
- phenoml/construe/types/__init__.py +41 -0
- phenoml/construe/types/bad_request_error_body.py +27 -0
- phenoml/construe/types/construe_cohort_request_config.py +37 -0
- phenoml/construe/types/construe_cohort_response.py +33 -0
- phenoml/construe/types/construe_cohort_response_queries_item.py +49 -0
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item.py +31 -0
- phenoml/construe/types/construe_cohort_response_queries_item_code_extract_results_item_codes_item.py +32 -0
- phenoml/construe/types/construe_upload_code_system_response.py +19 -0
- phenoml/construe/types/extract_codes_result.py +22 -0
- phenoml/construe/types/extract_request_config.py +23 -0
- phenoml/construe/types/extract_request_config_chunking_method.py +5 -0
- phenoml/construe/types/extract_request_system.py +37 -0
- phenoml/construe/types/extracted_code_result.py +41 -0
- phenoml/construe/types/internal_server_error_body.py +27 -0
- phenoml/construe/types/unauthorized_error_body.py +27 -0
- phenoml/construe/types/upload_request_format.py +5 -0
- phenoml/core/__init__.py +52 -0
- phenoml/core/api_error.py +23 -0
- phenoml/core/client_wrapper.py +87 -0
- phenoml/core/datetime_utils.py +28 -0
- phenoml/core/file.py +67 -0
- phenoml/core/force_multipart.py +16 -0
- phenoml/core/http_client.py +543 -0
- phenoml/core/http_response.py +55 -0
- phenoml/core/jsonable_encoder.py +100 -0
- phenoml/core/pydantic_utilities.py +255 -0
- phenoml/core/query_encoder.py +58 -0
- phenoml/core/remove_none_from_dict.py +11 -0
- phenoml/core/request_options.py +35 -0
- phenoml/core/serialization.py +276 -0
- phenoml/environment.py +7 -0
- phenoml/fhir/__init__.py +36 -0
- phenoml/fhir/client.py +970 -0
- phenoml/fhir/errors/__init__.py +10 -0
- phenoml/fhir/errors/bad_request_error.py +10 -0
- phenoml/fhir/errors/internal_server_error.py +10 -0
- phenoml/fhir/errors/not_found_error.py +10 -0
- phenoml/fhir/errors/unauthorized_error.py +10 -0
- phenoml/fhir/raw_client.py +1385 -0
- phenoml/fhir/types/__init__.py +29 -0
- phenoml/fhir/types/error_response.py +36 -0
- phenoml/fhir/types/fhir_bundle.py +43 -0
- phenoml/fhir/types/fhir_bundle_entry_item.py +34 -0
- phenoml/fhir/types/fhir_bundle_entry_item_request.py +25 -0
- phenoml/fhir/types/fhir_bundle_entry_item_request_method.py +5 -0
- phenoml/fhir/types/fhir_bundle_entry_item_response.py +24 -0
- phenoml/fhir/types/fhir_patch_request_body_item.py +40 -0
- phenoml/fhir/types/fhir_patch_request_body_item_op.py +7 -0
- phenoml/fhir/types/fhir_resource.py +40 -0
- phenoml/fhir/types/fhir_resource_meta.py +28 -0
- phenoml/fhir/types/fhir_search_response.py +8 -0
- phenoml/fhir_provider/__init__.py +43 -0
- phenoml/fhir_provider/client.py +731 -0
- phenoml/fhir_provider/errors/__init__.py +11 -0
- phenoml/fhir_provider/errors/bad_request_error.py +10 -0
- phenoml/fhir_provider/errors/forbidden_error.py +10 -0
- phenoml/fhir_provider/errors/internal_server_error.py +10 -0
- phenoml/fhir_provider/errors/not_found_error.py +10 -0
- phenoml/fhir_provider/errors/unauthorized_error.py +10 -0
- phenoml/fhir_provider/raw_client.py +1445 -0
- phenoml/fhir_provider/types/__init__.py +35 -0
- phenoml/fhir_provider/types/auth_method.py +7 -0
- phenoml/fhir_provider/types/fhir_provider_auth_config.py +53 -0
- phenoml/fhir_provider/types/fhir_provider_delete_response.py +20 -0
- phenoml/fhir_provider/types/fhir_provider_list_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_remove_auth_config_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_set_active_auth_config_response.py +22 -0
- phenoml/fhir_provider/types/fhir_provider_template.py +66 -0
- phenoml/fhir_provider/types/fhir_query_response.py +27 -0
- phenoml/fhir_provider/types/fhir_query_response_data.py +5 -0
- phenoml/fhir_provider/types/json_web_key.py +51 -0
- phenoml/fhir_provider/types/provider.py +8 -0
- phenoml/fhir_provider/types/service_account_key.py +35 -0
- phenoml/fhir_provider/types/smart_configuration.py +46 -0
- phenoml/lang2fhir/__init__.py +27 -0
- phenoml/lang2fhir/client.py +430 -0
- phenoml/lang2fhir/errors/__init__.py +11 -0
- phenoml/lang2fhir/errors/bad_request_error.py +10 -0
- phenoml/lang2fhir/errors/failed_dependency_error.py +10 -0
- phenoml/lang2fhir/errors/forbidden_error.py +10 -0
- phenoml/lang2fhir/errors/internal_server_error.py +10 -0
- phenoml/lang2fhir/errors/unauthorized_error.py +10 -0
- phenoml/lang2fhir/raw_client.py +788 -0
- phenoml/lang2fhir/types/__init__.py +19 -0
- phenoml/lang2fhir/types/create_request_resource.py +25 -0
- phenoml/lang2fhir/types/document_request_file_type.py +7 -0
- phenoml/lang2fhir/types/document_request_resource.py +5 -0
- phenoml/lang2fhir/types/fhir_resource.py +5 -0
- phenoml/lang2fhir/types/lang2fhir_upload_profile_response.py +23 -0
- phenoml/lang2fhir/types/search_response.py +33 -0
- phenoml/py.typed +0 -0
- phenoml/tools/__init__.py +37 -0
- phenoml/tools/client.py +359 -0
- phenoml/tools/errors/__init__.py +11 -0
- phenoml/tools/errors/bad_request_error.py +10 -0
- phenoml/tools/errors/failed_dependency_error.py +10 -0
- phenoml/tools/errors/forbidden_error.py +10 -0
- phenoml/tools/errors/internal_server_error.py +10 -0
- phenoml/tools/errors/unauthorized_error.py +10 -0
- phenoml/tools/mcp_server/__init__.py +7 -0
- phenoml/tools/mcp_server/client.py +336 -0
- phenoml/tools/mcp_server/raw_client.py +641 -0
- phenoml/tools/mcp_server/tools/__init__.py +4 -0
- phenoml/tools/mcp_server/tools/client.py +358 -0
- phenoml/tools/mcp_server/tools/raw_client.py +656 -0
- phenoml/tools/raw_client.py +696 -0
- phenoml/tools/types/__init__.py +27 -0
- phenoml/tools/types/cohort_response.py +49 -0
- phenoml/tools/types/lang2fhir_and_create_request_resource.py +25 -0
- phenoml/tools/types/lang2fhir_and_create_response.py +33 -0
- phenoml/tools/types/lang2fhir_and_search_response.py +40 -0
- phenoml/tools/types/mcp_server_response.py +33 -0
- phenoml/tools/types/mcp_server_response_data.py +51 -0
- phenoml/tools/types/mcp_server_tool_call_response.py +37 -0
- phenoml/tools/types/mcp_server_tool_response.py +33 -0
- phenoml/tools/types/mcp_server_tool_response_data.py +61 -0
- phenoml/tools/types/search_concept.py +41 -0
- phenoml/types/__init__.py +21 -0
- phenoml/types/cohort_response.py +5 -0
- phenoml/types/lang2fhir_and_create_response.py +5 -0
- phenoml/types/lang2fhir_and_search_response.py +5 -0
- phenoml/types/mcp_server_response.py +5 -0
- phenoml/types/mcp_server_tool_call_response.py +5 -0
- phenoml/types/mcp_server_tool_response.py +5 -0
- phenoml/types/search_concept.py +5 -0
- phenoml/version.py +3 -0
- phenoml/workflows/__init__.py +66 -0
- phenoml/workflows/client.py +210 -0
- phenoml/workflows/errors/__init__.py +11 -0
- phenoml/workflows/errors/bad_request_error.py +10 -0
- phenoml/workflows/errors/forbidden_error.py +10 -0
- phenoml/workflows/errors/internal_server_error.py +10 -0
- phenoml/workflows/errors/not_found_error.py +10 -0
- phenoml/workflows/errors/unauthorized_error.py +10 -0
- phenoml/workflows/mcp_server/__init__.py +7 -0
- phenoml/workflows/mcp_server/client.py +274 -0
- phenoml/workflows/mcp_server/raw_client.py +226 -0
- phenoml/workflows/mcp_server/tools/__init__.py +4 -0
- phenoml/workflows/mcp_server/tools/client.py +287 -0
- phenoml/workflows/mcp_server/tools/raw_client.py +244 -0
- phenoml/workflows/raw_client.py +169 -0
- phenoml/workflows/types/__init__.py +43 -0
- phenoml/workflows/types/create_workflow_response.py +44 -0
- phenoml/workflows/types/decision_node_definition.py +32 -0
- phenoml/workflows/types/execute_workflow_response.py +30 -0
- phenoml/workflows/types/execute_workflow_response_results.py +22 -0
- phenoml/workflows/types/lang2fhir_create_definition.py +37 -0
- phenoml/workflows/types/lang2fhir_search_definition.py +42 -0
- phenoml/workflows/types/list_workflows_response.py +39 -0
- phenoml/workflows/types/step_operation.py +26 -0
- phenoml/workflows/types/sub_workflow_definition.py +32 -0
- phenoml/workflows/types/workflow_config.py +27 -0
- phenoml/workflows/types/workflow_definition.py +57 -0
- phenoml/workflows/types/workflow_graph.py +23 -0
- phenoml/workflows/types/workflow_response.py +61 -0
- phenoml/workflows/types/workflow_response_graph.py +23 -0
- phenoml/workflows/types/workflow_step.py +55 -0
- phenoml/workflows/types/workflow_step_summary.py +47 -0
- phenoml/workflows/types/workflow_step_summary_type.py +5 -0
- phenoml/workflows/types/workflow_step_type.py +5 -0
- phenoml/workflows/workflows/__init__.py +19 -0
- phenoml/workflows/workflows/client.py +694 -0
- phenoml/workflows/workflows/raw_client.py +1266 -0
- phenoml/workflows/workflows/types/__init__.py +17 -0
- phenoml/workflows/workflows/types/create_workflow_request_fhir_provider_id.py +5 -0
- phenoml/workflows/workflows/types/update_workflow_request_fhir_provider_id.py +5 -0
- phenoml/workflows/workflows/types/workflows_delete_response.py +20 -0
- phenoml/workflows/workflows/types/workflows_get_response.py +26 -0
- phenoml/workflows/workflows/types/workflows_update_response.py +31 -0
- phenoml/wrapper_client.py +123 -0
- phenoml-0.0.6.dist-info/LICENSE +21 -0
- phenoml-0.0.6.dist-info/METADATA +192 -0
- phenoml-0.0.6.dist-info/RECORD +244 -0
- phenoml-0.0.6.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from ...core.request_options import RequestOptions
|
|
7
|
+
from ..types.mcp_server_response import McpServerResponse
|
|
8
|
+
from .raw_client import AsyncRawMcpServerClient, RawMcpServerClient
|
|
9
|
+
from .tools.client import AsyncToolsClient, ToolsClient
|
|
10
|
+
|
|
11
|
+
# this is used as the default value for optional parameters
|
|
12
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class McpServerClient:
|
|
16
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
17
|
+
self._raw_client = RawMcpServerClient(client_wrapper=client_wrapper)
|
|
18
|
+
self.tools = ToolsClient(client_wrapper=client_wrapper)
|
|
19
|
+
|
|
20
|
+
@property
|
|
21
|
+
def with_raw_response(self) -> RawMcpServerClient:
|
|
22
|
+
"""
|
|
23
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
24
|
+
|
|
25
|
+
Returns
|
|
26
|
+
-------
|
|
27
|
+
RawMcpServerClient
|
|
28
|
+
"""
|
|
29
|
+
return self._raw_client
|
|
30
|
+
|
|
31
|
+
def create(
|
|
32
|
+
self, *, name: str, mcp_server_url: str, request_options: typing.Optional[RequestOptions] = None
|
|
33
|
+
) -> McpServerResponse:
|
|
34
|
+
"""
|
|
35
|
+
Creates a new MCP server
|
|
36
|
+
|
|
37
|
+
Parameters
|
|
38
|
+
----------
|
|
39
|
+
name : str
|
|
40
|
+
Name of the MCP server
|
|
41
|
+
|
|
42
|
+
mcp_server_url : str
|
|
43
|
+
URL of the MCP server
|
|
44
|
+
|
|
45
|
+
request_options : typing.Optional[RequestOptions]
|
|
46
|
+
Request-specific configuration.
|
|
47
|
+
|
|
48
|
+
Returns
|
|
49
|
+
-------
|
|
50
|
+
McpServerResponse
|
|
51
|
+
Successfully created MCP server
|
|
52
|
+
|
|
53
|
+
Examples
|
|
54
|
+
--------
|
|
55
|
+
from phenoml import phenoml
|
|
56
|
+
|
|
57
|
+
client = phenoml(
|
|
58
|
+
token="YOUR_TOKEN",
|
|
59
|
+
)
|
|
60
|
+
client.tools.mcp_server.create(
|
|
61
|
+
name="My MCP Server",
|
|
62
|
+
mcp_server_url="https://mcp.example.com",
|
|
63
|
+
)
|
|
64
|
+
"""
|
|
65
|
+
_response = self._raw_client.create(name=name, mcp_server_url=mcp_server_url, request_options=request_options)
|
|
66
|
+
return _response.data
|
|
67
|
+
|
|
68
|
+
def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> McpServerResponse:
|
|
69
|
+
"""
|
|
70
|
+
Lists all MCP servers for a specific user
|
|
71
|
+
|
|
72
|
+
Parameters
|
|
73
|
+
----------
|
|
74
|
+
request_options : typing.Optional[RequestOptions]
|
|
75
|
+
Request-specific configuration.
|
|
76
|
+
|
|
77
|
+
Returns
|
|
78
|
+
-------
|
|
79
|
+
McpServerResponse
|
|
80
|
+
Successfully listed MCP servers
|
|
81
|
+
|
|
82
|
+
Examples
|
|
83
|
+
--------
|
|
84
|
+
from phenoml import phenoml
|
|
85
|
+
|
|
86
|
+
client = phenoml(
|
|
87
|
+
token="YOUR_TOKEN",
|
|
88
|
+
)
|
|
89
|
+
client.tools.mcp_server.list()
|
|
90
|
+
"""
|
|
91
|
+
_response = self._raw_client.list(request_options=request_options)
|
|
92
|
+
return _response.data
|
|
93
|
+
|
|
94
|
+
def get(self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None) -> McpServerResponse:
|
|
95
|
+
"""
|
|
96
|
+
Gets a MCP server by ID
|
|
97
|
+
|
|
98
|
+
Parameters
|
|
99
|
+
----------
|
|
100
|
+
mcp_server_id : str
|
|
101
|
+
ID of the MCP server to retrieve
|
|
102
|
+
|
|
103
|
+
request_options : typing.Optional[RequestOptions]
|
|
104
|
+
Request-specific configuration.
|
|
105
|
+
|
|
106
|
+
Returns
|
|
107
|
+
-------
|
|
108
|
+
McpServerResponse
|
|
109
|
+
Successfully retrieved MCP server
|
|
110
|
+
|
|
111
|
+
Examples
|
|
112
|
+
--------
|
|
113
|
+
from phenoml import phenoml
|
|
114
|
+
|
|
115
|
+
client = phenoml(
|
|
116
|
+
token="YOUR_TOKEN",
|
|
117
|
+
)
|
|
118
|
+
client.tools.mcp_server.get(
|
|
119
|
+
mcp_server_id="mcp_server_id",
|
|
120
|
+
)
|
|
121
|
+
"""
|
|
122
|
+
_response = self._raw_client.get(mcp_server_id, request_options=request_options)
|
|
123
|
+
return _response.data
|
|
124
|
+
|
|
125
|
+
def delete(
|
|
126
|
+
self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
127
|
+
) -> McpServerResponse:
|
|
128
|
+
"""
|
|
129
|
+
Deletes a MCP server by ID
|
|
130
|
+
|
|
131
|
+
Parameters
|
|
132
|
+
----------
|
|
133
|
+
mcp_server_id : str
|
|
134
|
+
ID of the MCP server to delete
|
|
135
|
+
|
|
136
|
+
request_options : typing.Optional[RequestOptions]
|
|
137
|
+
Request-specific configuration.
|
|
138
|
+
|
|
139
|
+
Returns
|
|
140
|
+
-------
|
|
141
|
+
McpServerResponse
|
|
142
|
+
Successfully deleted MCP server
|
|
143
|
+
|
|
144
|
+
Examples
|
|
145
|
+
--------
|
|
146
|
+
from phenoml import phenoml
|
|
147
|
+
|
|
148
|
+
client = phenoml(
|
|
149
|
+
token="YOUR_TOKEN",
|
|
150
|
+
)
|
|
151
|
+
client.tools.mcp_server.delete(
|
|
152
|
+
mcp_server_id="mcp_server_id",
|
|
153
|
+
)
|
|
154
|
+
"""
|
|
155
|
+
_response = self._raw_client.delete(mcp_server_id, request_options=request_options)
|
|
156
|
+
return _response.data
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
class AsyncMcpServerClient:
|
|
160
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
161
|
+
self._raw_client = AsyncRawMcpServerClient(client_wrapper=client_wrapper)
|
|
162
|
+
self.tools = AsyncToolsClient(client_wrapper=client_wrapper)
|
|
163
|
+
|
|
164
|
+
@property
|
|
165
|
+
def with_raw_response(self) -> AsyncRawMcpServerClient:
|
|
166
|
+
"""
|
|
167
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
168
|
+
|
|
169
|
+
Returns
|
|
170
|
+
-------
|
|
171
|
+
AsyncRawMcpServerClient
|
|
172
|
+
"""
|
|
173
|
+
return self._raw_client
|
|
174
|
+
|
|
175
|
+
async def create(
|
|
176
|
+
self, *, name: str, mcp_server_url: str, request_options: typing.Optional[RequestOptions] = None
|
|
177
|
+
) -> McpServerResponse:
|
|
178
|
+
"""
|
|
179
|
+
Creates a new MCP server
|
|
180
|
+
|
|
181
|
+
Parameters
|
|
182
|
+
----------
|
|
183
|
+
name : str
|
|
184
|
+
Name of the MCP server
|
|
185
|
+
|
|
186
|
+
mcp_server_url : str
|
|
187
|
+
URL of the MCP server
|
|
188
|
+
|
|
189
|
+
request_options : typing.Optional[RequestOptions]
|
|
190
|
+
Request-specific configuration.
|
|
191
|
+
|
|
192
|
+
Returns
|
|
193
|
+
-------
|
|
194
|
+
McpServerResponse
|
|
195
|
+
Successfully created MCP server
|
|
196
|
+
|
|
197
|
+
Examples
|
|
198
|
+
--------
|
|
199
|
+
import asyncio
|
|
200
|
+
|
|
201
|
+
from phenoml import Asyncphenoml
|
|
202
|
+
|
|
203
|
+
client = Asyncphenoml(
|
|
204
|
+
token="YOUR_TOKEN",
|
|
205
|
+
)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
async def main() -> None:
|
|
209
|
+
await client.tools.mcp_server.create(
|
|
210
|
+
name="My MCP Server",
|
|
211
|
+
mcp_server_url="https://mcp.example.com",
|
|
212
|
+
)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
asyncio.run(main())
|
|
216
|
+
"""
|
|
217
|
+
_response = await self._raw_client.create(
|
|
218
|
+
name=name, mcp_server_url=mcp_server_url, request_options=request_options
|
|
219
|
+
)
|
|
220
|
+
return _response.data
|
|
221
|
+
|
|
222
|
+
async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> McpServerResponse:
|
|
223
|
+
"""
|
|
224
|
+
Lists all MCP servers for a specific user
|
|
225
|
+
|
|
226
|
+
Parameters
|
|
227
|
+
----------
|
|
228
|
+
request_options : typing.Optional[RequestOptions]
|
|
229
|
+
Request-specific configuration.
|
|
230
|
+
|
|
231
|
+
Returns
|
|
232
|
+
-------
|
|
233
|
+
McpServerResponse
|
|
234
|
+
Successfully listed MCP servers
|
|
235
|
+
|
|
236
|
+
Examples
|
|
237
|
+
--------
|
|
238
|
+
import asyncio
|
|
239
|
+
|
|
240
|
+
from phenoml import Asyncphenoml
|
|
241
|
+
|
|
242
|
+
client = Asyncphenoml(
|
|
243
|
+
token="YOUR_TOKEN",
|
|
244
|
+
)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
async def main() -> None:
|
|
248
|
+
await client.tools.mcp_server.list()
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
asyncio.run(main())
|
|
252
|
+
"""
|
|
253
|
+
_response = await self._raw_client.list(request_options=request_options)
|
|
254
|
+
return _response.data
|
|
255
|
+
|
|
256
|
+
async def get(
|
|
257
|
+
self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
258
|
+
) -> McpServerResponse:
|
|
259
|
+
"""
|
|
260
|
+
Gets a MCP server by ID
|
|
261
|
+
|
|
262
|
+
Parameters
|
|
263
|
+
----------
|
|
264
|
+
mcp_server_id : str
|
|
265
|
+
ID of the MCP server to retrieve
|
|
266
|
+
|
|
267
|
+
request_options : typing.Optional[RequestOptions]
|
|
268
|
+
Request-specific configuration.
|
|
269
|
+
|
|
270
|
+
Returns
|
|
271
|
+
-------
|
|
272
|
+
McpServerResponse
|
|
273
|
+
Successfully retrieved MCP server
|
|
274
|
+
|
|
275
|
+
Examples
|
|
276
|
+
--------
|
|
277
|
+
import asyncio
|
|
278
|
+
|
|
279
|
+
from phenoml import Asyncphenoml
|
|
280
|
+
|
|
281
|
+
client = Asyncphenoml(
|
|
282
|
+
token="YOUR_TOKEN",
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
async def main() -> None:
|
|
287
|
+
await client.tools.mcp_server.get(
|
|
288
|
+
mcp_server_id="mcp_server_id",
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
asyncio.run(main())
|
|
293
|
+
"""
|
|
294
|
+
_response = await self._raw_client.get(mcp_server_id, request_options=request_options)
|
|
295
|
+
return _response.data
|
|
296
|
+
|
|
297
|
+
async def delete(
|
|
298
|
+
self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
299
|
+
) -> McpServerResponse:
|
|
300
|
+
"""
|
|
301
|
+
Deletes a MCP server by ID
|
|
302
|
+
|
|
303
|
+
Parameters
|
|
304
|
+
----------
|
|
305
|
+
mcp_server_id : str
|
|
306
|
+
ID of the MCP server to delete
|
|
307
|
+
|
|
308
|
+
request_options : typing.Optional[RequestOptions]
|
|
309
|
+
Request-specific configuration.
|
|
310
|
+
|
|
311
|
+
Returns
|
|
312
|
+
-------
|
|
313
|
+
McpServerResponse
|
|
314
|
+
Successfully deleted MCP server
|
|
315
|
+
|
|
316
|
+
Examples
|
|
317
|
+
--------
|
|
318
|
+
import asyncio
|
|
319
|
+
|
|
320
|
+
from phenoml import Asyncphenoml
|
|
321
|
+
|
|
322
|
+
client = Asyncphenoml(
|
|
323
|
+
token="YOUR_TOKEN",
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
async def main() -> None:
|
|
328
|
+
await client.tools.mcp_server.delete(
|
|
329
|
+
mcp_server_id="mcp_server_id",
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
asyncio.run(main())
|
|
334
|
+
"""
|
|
335
|
+
_response = await self._raw_client.delete(mcp_server_id, request_options=request_options)
|
|
336
|
+
return _response.data
|