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,358 @@
|
|
|
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_tool_call_response import McpServerToolCallResponse
|
|
8
|
+
from ...types.mcp_server_tool_response import McpServerToolResponse
|
|
9
|
+
from .raw_client import AsyncRawToolsClient, RawToolsClient
|
|
10
|
+
|
|
11
|
+
# this is used as the default value for optional parameters
|
|
12
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ToolsClient:
|
|
16
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
17
|
+
self._raw_client = RawToolsClient(client_wrapper=client_wrapper)
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def with_raw_response(self) -> RawToolsClient:
|
|
21
|
+
"""
|
|
22
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
23
|
+
|
|
24
|
+
Returns
|
|
25
|
+
-------
|
|
26
|
+
RawToolsClient
|
|
27
|
+
"""
|
|
28
|
+
return self._raw_client
|
|
29
|
+
|
|
30
|
+
def list(
|
|
31
|
+
self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
32
|
+
) -> McpServerToolResponse:
|
|
33
|
+
"""
|
|
34
|
+
Lists all MCP server tools for a specific MCP server
|
|
35
|
+
|
|
36
|
+
Parameters
|
|
37
|
+
----------
|
|
38
|
+
mcp_server_id : str
|
|
39
|
+
ID of the MCP server to list tools for
|
|
40
|
+
|
|
41
|
+
request_options : typing.Optional[RequestOptions]
|
|
42
|
+
Request-specific configuration.
|
|
43
|
+
|
|
44
|
+
Returns
|
|
45
|
+
-------
|
|
46
|
+
McpServerToolResponse
|
|
47
|
+
Successfully listed MCP server tools
|
|
48
|
+
|
|
49
|
+
Examples
|
|
50
|
+
--------
|
|
51
|
+
from phenoml import phenoml
|
|
52
|
+
|
|
53
|
+
client = phenoml(
|
|
54
|
+
token="YOUR_TOKEN",
|
|
55
|
+
)
|
|
56
|
+
client.tools.mcp_server.tools.list(
|
|
57
|
+
mcp_server_id="mcp_server_id",
|
|
58
|
+
)
|
|
59
|
+
"""
|
|
60
|
+
_response = self._raw_client.list(mcp_server_id, request_options=request_options)
|
|
61
|
+
return _response.data
|
|
62
|
+
|
|
63
|
+
def get(
|
|
64
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
65
|
+
) -> McpServerToolResponse:
|
|
66
|
+
"""
|
|
67
|
+
Gets a MCP server tool by ID
|
|
68
|
+
|
|
69
|
+
Parameters
|
|
70
|
+
----------
|
|
71
|
+
mcp_server_tool_id : str
|
|
72
|
+
ID of the MCP server tool to retrieve
|
|
73
|
+
|
|
74
|
+
request_options : typing.Optional[RequestOptions]
|
|
75
|
+
Request-specific configuration.
|
|
76
|
+
|
|
77
|
+
Returns
|
|
78
|
+
-------
|
|
79
|
+
McpServerToolResponse
|
|
80
|
+
Successfully retrieved MCP server tool
|
|
81
|
+
|
|
82
|
+
Examples
|
|
83
|
+
--------
|
|
84
|
+
from phenoml import phenoml
|
|
85
|
+
|
|
86
|
+
client = phenoml(
|
|
87
|
+
token="YOUR_TOKEN",
|
|
88
|
+
)
|
|
89
|
+
client.tools.mcp_server.tools.get(
|
|
90
|
+
mcp_server_tool_id="mcp_server_tool_id",
|
|
91
|
+
)
|
|
92
|
+
"""
|
|
93
|
+
_response = self._raw_client.get(mcp_server_tool_id, request_options=request_options)
|
|
94
|
+
return _response.data
|
|
95
|
+
|
|
96
|
+
def delete(
|
|
97
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
98
|
+
) -> McpServerToolResponse:
|
|
99
|
+
"""
|
|
100
|
+
Deletes a MCP server tool by ID
|
|
101
|
+
|
|
102
|
+
Parameters
|
|
103
|
+
----------
|
|
104
|
+
mcp_server_tool_id : str
|
|
105
|
+
ID of the MCP server tool to delete
|
|
106
|
+
|
|
107
|
+
request_options : typing.Optional[RequestOptions]
|
|
108
|
+
Request-specific configuration.
|
|
109
|
+
|
|
110
|
+
Returns
|
|
111
|
+
-------
|
|
112
|
+
McpServerToolResponse
|
|
113
|
+
Successfully deleted MCP server tool
|
|
114
|
+
|
|
115
|
+
Examples
|
|
116
|
+
--------
|
|
117
|
+
from phenoml import phenoml
|
|
118
|
+
|
|
119
|
+
client = phenoml(
|
|
120
|
+
token="YOUR_TOKEN",
|
|
121
|
+
)
|
|
122
|
+
client.tools.mcp_server.tools.delete(
|
|
123
|
+
mcp_server_tool_id="mcp_server_tool_id",
|
|
124
|
+
)
|
|
125
|
+
"""
|
|
126
|
+
_response = self._raw_client.delete(mcp_server_tool_id, request_options=request_options)
|
|
127
|
+
return _response.data
|
|
128
|
+
|
|
129
|
+
def call(
|
|
130
|
+
self,
|
|
131
|
+
mcp_server_tool_id: str,
|
|
132
|
+
*,
|
|
133
|
+
arguments: typing.Dict[str, typing.Optional[typing.Any]],
|
|
134
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
135
|
+
) -> McpServerToolCallResponse:
|
|
136
|
+
"""
|
|
137
|
+
Calls a MCP server tool
|
|
138
|
+
|
|
139
|
+
Parameters
|
|
140
|
+
----------
|
|
141
|
+
mcp_server_tool_id : str
|
|
142
|
+
ID of the MCP server tool to call
|
|
143
|
+
|
|
144
|
+
arguments : typing.Dict[str, typing.Optional[typing.Any]]
|
|
145
|
+
Arguments to pass to the MCP server tool
|
|
146
|
+
|
|
147
|
+
request_options : typing.Optional[RequestOptions]
|
|
148
|
+
Request-specific configuration.
|
|
149
|
+
|
|
150
|
+
Returns
|
|
151
|
+
-------
|
|
152
|
+
McpServerToolCallResponse
|
|
153
|
+
Successfully called MCP server tool
|
|
154
|
+
|
|
155
|
+
Examples
|
|
156
|
+
--------
|
|
157
|
+
from phenoml import phenoml
|
|
158
|
+
|
|
159
|
+
client = phenoml(
|
|
160
|
+
token="YOUR_TOKEN",
|
|
161
|
+
)
|
|
162
|
+
client.tools.mcp_server.tools.call(
|
|
163
|
+
mcp_server_tool_id="mcp_server_tool_id",
|
|
164
|
+
arguments={"title": "PhenoML Agent API"},
|
|
165
|
+
)
|
|
166
|
+
"""
|
|
167
|
+
_response = self._raw_client.call(mcp_server_tool_id, arguments=arguments, request_options=request_options)
|
|
168
|
+
return _response.data
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class AsyncToolsClient:
|
|
172
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
173
|
+
self._raw_client = AsyncRawToolsClient(client_wrapper=client_wrapper)
|
|
174
|
+
|
|
175
|
+
@property
|
|
176
|
+
def with_raw_response(self) -> AsyncRawToolsClient:
|
|
177
|
+
"""
|
|
178
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
179
|
+
|
|
180
|
+
Returns
|
|
181
|
+
-------
|
|
182
|
+
AsyncRawToolsClient
|
|
183
|
+
"""
|
|
184
|
+
return self._raw_client
|
|
185
|
+
|
|
186
|
+
async def list(
|
|
187
|
+
self, mcp_server_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
188
|
+
) -> McpServerToolResponse:
|
|
189
|
+
"""
|
|
190
|
+
Lists all MCP server tools for a specific MCP server
|
|
191
|
+
|
|
192
|
+
Parameters
|
|
193
|
+
----------
|
|
194
|
+
mcp_server_id : str
|
|
195
|
+
ID of the MCP server to list tools for
|
|
196
|
+
|
|
197
|
+
request_options : typing.Optional[RequestOptions]
|
|
198
|
+
Request-specific configuration.
|
|
199
|
+
|
|
200
|
+
Returns
|
|
201
|
+
-------
|
|
202
|
+
McpServerToolResponse
|
|
203
|
+
Successfully listed MCP server tools
|
|
204
|
+
|
|
205
|
+
Examples
|
|
206
|
+
--------
|
|
207
|
+
import asyncio
|
|
208
|
+
|
|
209
|
+
from phenoml import Asyncphenoml
|
|
210
|
+
|
|
211
|
+
client = Asyncphenoml(
|
|
212
|
+
token="YOUR_TOKEN",
|
|
213
|
+
)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
async def main() -> None:
|
|
217
|
+
await client.tools.mcp_server.tools.list(
|
|
218
|
+
mcp_server_id="mcp_server_id",
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
asyncio.run(main())
|
|
223
|
+
"""
|
|
224
|
+
_response = await self._raw_client.list(mcp_server_id, request_options=request_options)
|
|
225
|
+
return _response.data
|
|
226
|
+
|
|
227
|
+
async def get(
|
|
228
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
229
|
+
) -> McpServerToolResponse:
|
|
230
|
+
"""
|
|
231
|
+
Gets a MCP server tool by ID
|
|
232
|
+
|
|
233
|
+
Parameters
|
|
234
|
+
----------
|
|
235
|
+
mcp_server_tool_id : str
|
|
236
|
+
ID of the MCP server tool to retrieve
|
|
237
|
+
|
|
238
|
+
request_options : typing.Optional[RequestOptions]
|
|
239
|
+
Request-specific configuration.
|
|
240
|
+
|
|
241
|
+
Returns
|
|
242
|
+
-------
|
|
243
|
+
McpServerToolResponse
|
|
244
|
+
Successfully retrieved MCP server tool
|
|
245
|
+
|
|
246
|
+
Examples
|
|
247
|
+
--------
|
|
248
|
+
import asyncio
|
|
249
|
+
|
|
250
|
+
from phenoml import Asyncphenoml
|
|
251
|
+
|
|
252
|
+
client = Asyncphenoml(
|
|
253
|
+
token="YOUR_TOKEN",
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
async def main() -> None:
|
|
258
|
+
await client.tools.mcp_server.tools.get(
|
|
259
|
+
mcp_server_tool_id="mcp_server_tool_id",
|
|
260
|
+
)
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
asyncio.run(main())
|
|
264
|
+
"""
|
|
265
|
+
_response = await self._raw_client.get(mcp_server_tool_id, request_options=request_options)
|
|
266
|
+
return _response.data
|
|
267
|
+
|
|
268
|
+
async def delete(
|
|
269
|
+
self, mcp_server_tool_id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
270
|
+
) -> McpServerToolResponse:
|
|
271
|
+
"""
|
|
272
|
+
Deletes a MCP server tool by ID
|
|
273
|
+
|
|
274
|
+
Parameters
|
|
275
|
+
----------
|
|
276
|
+
mcp_server_tool_id : str
|
|
277
|
+
ID of the MCP server tool to delete
|
|
278
|
+
|
|
279
|
+
request_options : typing.Optional[RequestOptions]
|
|
280
|
+
Request-specific configuration.
|
|
281
|
+
|
|
282
|
+
Returns
|
|
283
|
+
-------
|
|
284
|
+
McpServerToolResponse
|
|
285
|
+
Successfully deleted MCP server tool
|
|
286
|
+
|
|
287
|
+
Examples
|
|
288
|
+
--------
|
|
289
|
+
import asyncio
|
|
290
|
+
|
|
291
|
+
from phenoml import Asyncphenoml
|
|
292
|
+
|
|
293
|
+
client = Asyncphenoml(
|
|
294
|
+
token="YOUR_TOKEN",
|
|
295
|
+
)
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
async def main() -> None:
|
|
299
|
+
await client.tools.mcp_server.tools.delete(
|
|
300
|
+
mcp_server_tool_id="mcp_server_tool_id",
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
asyncio.run(main())
|
|
305
|
+
"""
|
|
306
|
+
_response = await self._raw_client.delete(mcp_server_tool_id, request_options=request_options)
|
|
307
|
+
return _response.data
|
|
308
|
+
|
|
309
|
+
async def call(
|
|
310
|
+
self,
|
|
311
|
+
mcp_server_tool_id: str,
|
|
312
|
+
*,
|
|
313
|
+
arguments: typing.Dict[str, typing.Optional[typing.Any]],
|
|
314
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
315
|
+
) -> McpServerToolCallResponse:
|
|
316
|
+
"""
|
|
317
|
+
Calls a MCP server tool
|
|
318
|
+
|
|
319
|
+
Parameters
|
|
320
|
+
----------
|
|
321
|
+
mcp_server_tool_id : str
|
|
322
|
+
ID of the MCP server tool to call
|
|
323
|
+
|
|
324
|
+
arguments : typing.Dict[str, typing.Optional[typing.Any]]
|
|
325
|
+
Arguments to pass to the MCP server tool
|
|
326
|
+
|
|
327
|
+
request_options : typing.Optional[RequestOptions]
|
|
328
|
+
Request-specific configuration.
|
|
329
|
+
|
|
330
|
+
Returns
|
|
331
|
+
-------
|
|
332
|
+
McpServerToolCallResponse
|
|
333
|
+
Successfully called MCP server tool
|
|
334
|
+
|
|
335
|
+
Examples
|
|
336
|
+
--------
|
|
337
|
+
import asyncio
|
|
338
|
+
|
|
339
|
+
from phenoml import Asyncphenoml
|
|
340
|
+
|
|
341
|
+
client = Asyncphenoml(
|
|
342
|
+
token="YOUR_TOKEN",
|
|
343
|
+
)
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
async def main() -> None:
|
|
347
|
+
await client.tools.mcp_server.tools.call(
|
|
348
|
+
mcp_server_tool_id="mcp_server_tool_id",
|
|
349
|
+
arguments={"title": "PhenoML Agent API"},
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
asyncio.run(main())
|
|
354
|
+
"""
|
|
355
|
+
_response = await self._raw_client.call(
|
|
356
|
+
mcp_server_tool_id, arguments=arguments, request_options=request_options
|
|
357
|
+
)
|
|
358
|
+
return _response.data
|