Skip to content

Commit b84f4ad

Browse files
committed
Release 1.0.1
1 parent 1aa344e commit b84f4ad

File tree

7 files changed

+63
-41
lines changed

7 files changed

+63
-41
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Klavis.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ from klavis import Klavis
2525
client = Klavis(
2626
api_key="YOUR_API_KEY",
2727
)
28-
client.mcp_server.call_server_tool(
28+
client.mcp_server.call_tools(
2929
server_url="serverUrl",
3030
tool_name="toolName",
3131
)
@@ -46,7 +46,7 @@ client = AsyncKlavis(
4646

4747

4848
async def main() -> None:
49-
await client.mcp_server.call_server_tool(
49+
await client.mcp_server.call_tools(
5050
server_url="serverUrl",
5151
tool_name="toolName",
5252
)
@@ -64,7 +64,7 @@ will be thrown.
6464
from klavis.core.api_error import ApiError
6565

6666
try:
67-
client.mcp_server.call_server_tool(...)
67+
client.mcp_server.call_tools(...)
6868
except ApiError as e:
6969
print(e.status_code)
7070
print(e.body)
@@ -83,7 +83,7 @@ from klavis import Klavis
8383
client = Klavis(
8484
...,
8585
)
86-
response = client.mcp_server.with_raw_response.call_server_tool(...)
86+
response = client.mcp_server.with_raw_response.call_tools(...)
8787
print(response.headers) # access the response headers
8888
print(response.data) # access the underlying object
8989
```
@@ -103,7 +103,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
103103
Use the `max_retries` request option to configure this behavior.
104104

105105
```python
106-
client.mcp_server.call_server_tool(..., request_options={
106+
client.mcp_server.call_tools(..., request_options={
107107
"max_retries": 1
108108
})
109109
```
@@ -123,7 +123,7 @@ client = Klavis(
123123

124124

125125
# Override timeout for a specific method
126-
client.mcp_server.call_server_tool(..., request_options={
126+
client.mcp_server.call_tools(..., request_options={
127127
"timeout_in_seconds": 1
128128
})
129129
```

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ name = "klavis"
33

44
[tool.poetry]
55
name = "klavis"
6-
version = "0.1.9"
6+
version = "1.0.1"
77
description = ""
88
readme = "README.md"
99
authors = []
1010
keywords = []
11-
11+
license = "MIT"
1212
classifiers = [
1313
"Intended Audience :: Developers",
1414
"Programming Language :: Python",
@@ -24,7 +24,8 @@ classifiers = [
2424
"Operating System :: POSIX :: Linux",
2525
"Operating System :: Microsoft :: Windows",
2626
"Topic :: Software Development :: Libraries :: Python Modules",
27-
"Typing :: Typed"
27+
"Typing :: Typed",
28+
"License :: OSI Approved :: MIT License"
2829
]
2930
packages = [
3031
{ include = "klavis", from = "src"}

reference.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Reference
22
## McpServer
3-
<details><summary><code>client.mcp_server.<a href="src/klavis/mcp_server/client.py">call_server_tool</a>(...)</code></summary>
3+
<details><summary><code>client.mcp_server.<a href="src/klavis/mcp_server/client.py">call_tools</a>(...)</code></summary>
44
<dl>
55
<dd>
66

@@ -33,7 +33,7 @@ from klavis import Klavis
3333
client = Klavis(
3434
api_key="YOUR_API_KEY",
3535
)
36-
client.mcp_server.call_server_tool(
36+
client.mcp_server.call_tools(
3737
server_url="serverUrl",
3838
tool_name="toolName",
3939
)
@@ -96,7 +96,7 @@ client.mcp_server.call_server_tool(
9696
</dl>
9797
</details>
9898

99-
<details><summary><code>client.mcp_server.<a href="src/klavis/mcp_server/client.py">list_server_tools</a>(...)</code></summary>
99+
<details><summary><code>client.mcp_server.<a href="src/klavis/mcp_server/client.py">list_tools</a>(...)</code></summary>
100100
<dl>
101101
<dd>
102102

@@ -132,7 +132,7 @@ from klavis import Klavis
132132
client = Klavis(
133133
api_key="YOUR_API_KEY",
134134
)
135-
client.mcp_server.list_server_tools(
135+
client.mcp_server.list_tools(
136136
server_url="serverUrl",
137137
)
138138

@@ -497,7 +497,7 @@ client.mcp_server.delete_server_instance(
497497
</dl>
498498
</details>
499499

500-
<details><summary><code>client.mcp_server.<a href="src/klavis/mcp_server/client.py">get_server_tools</a>(...)</code></summary>
500+
<details><summary><code>client.mcp_server.<a href="src/klavis/mcp_server/client.py">get_tools</a>(...)</code></summary>
501501
<dl>
502502
<dd>
503503

@@ -530,7 +530,7 @@ from klavis import Klavis, McpServerName
530530
client = Klavis(
531531
api_key="YOUR_API_KEY",
532532
)
533-
client.mcp_server.get_server_tools(
533+
client.mcp_server.get_tools(
534534
server_name=McpServerName.MARKDOWN2DOC,
535535
)
536536

src/klavis/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ def __init__(
2020

2121
def get_headers(self) -> typing.Dict[str, str]:
2222
headers: typing.Dict[str, str] = {
23-
"User-Agent": "klavis/0.1.9",
23+
"User-Agent": "klavis/1.0.1",
2424
"X-Fern-Language": "Python",
2525
"X-Fern-SDK-Name": "klavis",
26-
"X-Fern-SDK-Version": "0.1.9",
26+
"X-Fern-SDK-Version": "1.0.1",
2727
}
2828
api_key = self._get_api_key()
2929
if api_key is not None:

src/klavis/mcp_server/client.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def with_raw_response(self) -> RawMcpServerClient:
3636
"""
3737
return self._raw_client
3838

39-
def call_server_tool(
39+
def call_tools(
4040
self,
4141
*,
4242
server_url: str,
@@ -78,12 +78,12 @@ def call_server_tool(
7878
client = Klavis(
7979
api_key="YOUR_API_KEY",
8080
)
81-
client.mcp_server.call_server_tool(
81+
client.mcp_server.call_tools(
8282
server_url="serverUrl",
8383
tool_name="toolName",
8484
)
8585
"""
86-
_response = self._raw_client.call_server_tool(
86+
_response = self._raw_client.call_tools(
8787
server_url=server_url,
8888
tool_name=tool_name,
8989
tool_args=tool_args,
@@ -92,7 +92,7 @@ def call_server_tool(
9292
)
9393
return _response.data
9494

95-
def list_server_tools(
95+
def list_tools(
9696
self,
9797
*,
9898
server_url: str,
@@ -133,11 +133,11 @@ def list_server_tools(
133133
client = Klavis(
134134
api_key="YOUR_API_KEY",
135135
)
136-
client.mcp_server.list_server_tools(
136+
client.mcp_server.list_tools(
137137
server_url="serverUrl",
138138
)
139139
"""
140-
_response = self._raw_client.list_server_tools(
140+
_response = self._raw_client.list_tools(
141141
server_url=server_url, connection_type=connection_type, format=format, request_options=request_options
142142
)
143143
return _response.data
@@ -302,7 +302,7 @@ def delete_server_instance(
302302
_response = self._raw_client.delete_server_instance(instance_id, request_options=request_options)
303303
return _response.data
304304

305-
def get_server_tools(
305+
def get_tools(
306306
self, server_name: McpServerName, *, request_options: typing.Optional[RequestOptions] = None
307307
) -> GetToolsResponse:
308308
"""
@@ -329,11 +329,11 @@ def get_server_tools(
329329
client = Klavis(
330330
api_key="YOUR_API_KEY",
331331
)
332-
client.mcp_server.get_server_tools(
332+
client.mcp_server.get_tools(
333333
server_name=McpServerName.MARKDOWN2DOC,
334334
)
335335
"""
336-
_response = self._raw_client.get_server_tools(server_name, request_options=request_options)
336+
_response = self._raw_client.get_tools(server_name, request_options=request_options)
337337
return _response.data
338338

339339
def get_all_mcp_servers(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetMcpServersResponse:
@@ -479,7 +479,7 @@ def with_raw_response(self) -> AsyncRawMcpServerClient:
479479
"""
480480
return self._raw_client
481481

482-
async def call_server_tool(
482+
async def call_tools(
483483
self,
484484
*,
485485
server_url: str,
@@ -526,15 +526,15 @@ async def call_server_tool(
526526
527527
528528
async def main() -> None:
529-
await client.mcp_server.call_server_tool(
529+
await client.mcp_server.call_tools(
530530
server_url="serverUrl",
531531
tool_name="toolName",
532532
)
533533
534534
535535
asyncio.run(main())
536536
"""
537-
_response = await self._raw_client.call_server_tool(
537+
_response = await self._raw_client.call_tools(
538538
server_url=server_url,
539539
tool_name=tool_name,
540540
tool_args=tool_args,
@@ -543,7 +543,7 @@ async def main() -> None:
543543
)
544544
return _response.data
545545

546-
async def list_server_tools(
546+
async def list_tools(
547547
self,
548548
*,
549549
server_url: str,
@@ -589,14 +589,14 @@ async def list_server_tools(
589589
590590
591591
async def main() -> None:
592-
await client.mcp_server.list_server_tools(
592+
await client.mcp_server.list_tools(
593593
server_url="serverUrl",
594594
)
595595
596596
597597
asyncio.run(main())
598598
"""
599-
_response = await self._raw_client.list_server_tools(
599+
_response = await self._raw_client.list_tools(
600600
server_url=server_url, connection_type=connection_type, format=format, request_options=request_options
601601
)
602602
return _response.data
@@ -793,7 +793,7 @@ async def main() -> None:
793793
_response = await self._raw_client.delete_server_instance(instance_id, request_options=request_options)
794794
return _response.data
795795

796-
async def get_server_tools(
796+
async def get_tools(
797797
self, server_name: McpServerName, *, request_options: typing.Optional[RequestOptions] = None
798798
) -> GetToolsResponse:
799799
"""
@@ -825,14 +825,14 @@ async def get_server_tools(
825825
826826
827827
async def main() -> None:
828-
await client.mcp_server.get_server_tools(
828+
await client.mcp_server.get_tools(
829829
server_name=McpServerName.MARKDOWN2DOC,
830830
)
831831
832832
833833
asyncio.run(main())
834834
"""
835-
_response = await self._raw_client.get_server_tools(server_name, request_options=request_options)
835+
_response = await self._raw_client.get_tools(server_name, request_options=request_options)
836836
return _response.data
837837

838838
async def get_all_mcp_servers(

src/klavis/mcp_server/raw_client.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class RawMcpServerClient:
3131
def __init__(self, *, client_wrapper: SyncClientWrapper):
3232
self._client_wrapper = client_wrapper
3333

34-
def call_server_tool(
34+
def call_tools(
3535
self,
3636
*,
3737
server_url: str,
@@ -107,7 +107,7 @@ def call_server_tool(
107107
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
108108
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
109109

110-
def list_server_tools(
110+
def list_tools(
111111
self,
112112
*,
113113
server_url: str,
@@ -411,7 +411,7 @@ def delete_server_instance(
411411
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
412412
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
413413

414-
def get_server_tools(
414+
def get_tools(
415415
self, server_name: McpServerName, *, request_options: typing.Optional[RequestOptions] = None
416416
) -> HttpResponse[GetToolsResponse]:
417417
"""
@@ -646,7 +646,7 @@ class AsyncRawMcpServerClient:
646646
def __init__(self, *, client_wrapper: AsyncClientWrapper):
647647
self._client_wrapper = client_wrapper
648648

649-
async def call_server_tool(
649+
async def call_tools(
650650
self,
651651
*,
652652
server_url: str,
@@ -722,7 +722,7 @@ async def call_server_tool(
722722
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
723723
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
724724

725-
async def list_server_tools(
725+
async def list_tools(
726726
self,
727727
*,
728728
server_url: str,
@@ -1026,7 +1026,7 @@ async def delete_server_instance(
10261026
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
10271027
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
10281028

1029-
async def get_server_tools(
1029+
async def get_tools(
10301030
self, server_name: McpServerName, *, request_options: typing.Optional[RequestOptions] = None
10311031
) -> AsyncHttpResponse[GetToolsResponse]:
10321032
"""

0 commit comments

Comments
 (0)