Skip to content

Commit 7d77d92

Browse files
Release 2.11.0
1 parent 0dfd4f1 commit 7d77d92

File tree

16 files changed

+333
-435
lines changed

16 files changed

+333
-435
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "klavis"
33

44
[tool.poetry]
55
name = "klavis"
6-
version = "2.10.0"
6+
version = "2.11.0"
77
description = ""
88
readme = "README.md"
99
authors = []

reference.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ client.mcp_server.delete_instance_auth(
13061306
<dl>
13071307
<dd>
13081308

1309-
Get tools information for one or multiple MCP servers.
1309+
Get tools information for any MCP server.
13101310
</dd>
13111311
</dl>
13121312
</dd>
@@ -1321,13 +1321,13 @@ Get tools information for one or multiple MCP servers.
13211321
<dd>
13221322

13231323
```python
1324-
from klavis import Klavis
1324+
from klavis import Klavis, McpServerName
13251325

13261326
client = Klavis(
13271327
api_key="YOUR_API_KEY",
13281328
)
13291329
client.mcp_server.get_server_tools(
1330-
server_name="serverName",
1330+
server_name=McpServerName.AFFINITY,
13311331
)
13321332

13331333
```
@@ -1344,7 +1344,7 @@ client.mcp_server.get_server_tools(
13441344
<dl>
13451345
<dd>
13461346

1347-
**server_name:** `str` — The name of the target MCP server. Case-insensitive. Provide a comma-separated list (e.g., 'google calendar,slack') to fetch tools for multiple servers.
1347+
**server_name:** `McpServerName` — The name of the target MCP server. Case-insensitive (e.g., 'google calendar', 'GOOGLE_CALENDAR', 'Google Calendar' are all valid).
13481348

13491349
</dd>
13501350
</dl>
@@ -1384,7 +1384,7 @@ client.mcp_server.get_server_tools(
13841384
<dl>
13851385
<dd>
13861386

1387-
Get all MCP servers with their basic information including id, name, and description.
1387+
Get all MCP servers with their basic information including id, name, description, and tools.
13881388
</dd>
13891389
</dl>
13901390
</dd>
@@ -6222,8 +6222,7 @@ client.oauth.authorize_outlook(
62226222
</dl>
62236223
</details>
62246224

6225-
## OnedriveOauth
6226-
<details><summary><code>client.onedrive_oauth.<a href="src/klavis/onedrive_oauth/client.py">refresh_token</a>(...)</code></summary>
6225+
<details><summary><code>client.oauth.<a href="src/klavis/oauth/client.py">authorize_teams</a>(...)</code></summary>
62276226
<dl>
62286227
<dd>
62296228

@@ -6241,7 +6240,7 @@ from klavis import Klavis
62416240
client = Klavis(
62426241
api_key="YOUR_API_KEY",
62436242
)
6244-
client.onedrive_oauth.refresh_token(
6243+
client.oauth.authorize_teams(
62456244
instance_id="instance_id",
62466245
)
62476246

@@ -6259,7 +6258,31 @@ client.onedrive_oauth.refresh_token(
62596258
<dl>
62606259
<dd>
62616260

6262-
**instance_id:** `str` — Instance ID for which to refresh the token
6261+
**instance_id:** `str` — Unique identifier for the client instance requesting authorization
6262+
6263+
</dd>
6264+
</dl>
6265+
6266+
<dl>
6267+
<dd>
6268+
6269+
**client_id:** `typing.Optional[str]` — Client ID for white labeling, if not provided will use default credentials
6270+
6271+
</dd>
6272+
</dl>
6273+
6274+
<dl>
6275+
<dd>
6276+
6277+
**scope:** `typing.Optional[str]` — Optional OAuth scopes to request (space-separated string)
6278+
6279+
</dd>
6280+
</dl>
6281+
6282+
<dl>
6283+
<dd>
6284+
6285+
**redirect_url:** `typing.Optional[str]` — Optional URL to redirect to after authorization completes
62636286

62646287
</dd>
62656288
</dl>
@@ -6279,8 +6302,8 @@ client.onedrive_oauth.refresh_token(
62796302
</dl>
62806303
</details>
62816304

6282-
## OutlookOauth
6283-
<details><summary><code>client.outlook_oauth.<a href="src/klavis/outlook_oauth/client.py">refresh_token</a>(...)</code></summary>
6305+
## OnedriveOauth
6306+
<details><summary><code>client.onedrive_oauth.<a href="src/klavis/onedrive_oauth/client.py">refresh_token</a>(...)</code></summary>
62846307
<dl>
62856308
<dd>
62866309

@@ -6298,7 +6321,7 @@ from klavis import Klavis
62986321
client = Klavis(
62996322
api_key="YOUR_API_KEY",
63006323
)
6301-
client.outlook_oauth.refresh_token(
6324+
client.onedrive_oauth.refresh_token(
63026325
instance_id="instance_id",
63036326
)
63046327

@@ -6336,8 +6359,8 @@ client.outlook_oauth.refresh_token(
63366359
</dl>
63376360
</details>
63386361

6339-
## TeamsOauth
6340-
<details><summary><code>client.teams_oauth.<a href="src/klavis/teams_oauth/client.py">authorize_teams</a>(...)</code></summary>
6362+
## OutlookOauth
6363+
<details><summary><code>client.outlook_oauth.<a href="src/klavis/outlook_oauth/client.py">refresh_token</a>(...)</code></summary>
63416364
<dl>
63426365
<dd>
63436366

@@ -6355,7 +6378,7 @@ from klavis import Klavis
63556378
client = Klavis(
63566379
api_key="YOUR_API_KEY",
63576380
)
6358-
client.teams_oauth.authorize_teams(
6381+
client.outlook_oauth.refresh_token(
63596382
instance_id="instance_id",
63606383
)
63616384

@@ -6373,31 +6396,7 @@ client.teams_oauth.authorize_teams(
63736396
<dl>
63746397
<dd>
63756398

6376-
**instance_id:** `str` — Unique identifier for the client instance requesting authorization
6377-
6378-
</dd>
6379-
</dl>
6380-
6381-
<dl>
6382-
<dd>
6383-
6384-
**client_id:** `typing.Optional[str]` — Client ID for white labeling, if not provided will use default credentials
6385-
6386-
</dd>
6387-
</dl>
6388-
6389-
<dl>
6390-
<dd>
6391-
6392-
**scope:** `typing.Optional[str]` — Optional OAuth scopes to request (space-separated string)
6393-
6394-
</dd>
6395-
</dl>
6396-
6397-
<dl>
6398-
<dd>
6399-
6400-
**redirect_url:** `typing.Optional[str]` — Optional URL to redirect to after authorization completes
6399+
**instance_id:** `str` — Instance ID for which to refresh the token
64016400

64026401
</dd>
64036402
</dl>
@@ -6417,6 +6416,7 @@ client.teams_oauth.authorize_teams(
64176416
</dl>
64186417
</details>
64196418

6419+
## TeamsOauth
64206420
<details><summary><code>client.teams_oauth.<a href="src/klavis/teams_oauth/client.py">refresh_token</a>(...)</code></summary>
64216421
<dl>
64226422
<dd>

src/klavis/__init__.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@
2525
ListToolsResponse,
2626
McpServer,
2727
McpServerName,
28-
MultiServerToolsResponse,
2928
OAuthServerName,
3029
ServerTool,
31-
ServerToolsResult,
3230
StatusResponse,
3331
StrataAddServersResponse,
3432
StrataCreateResponse,
@@ -47,7 +45,6 @@
4745
from .mcp_server import (
4846
Authdata,
4947
DeleteServersFromStrataMcpServerStrataStrataIdServersDeleteRequestServersItem,
50-
GetServerToolsResponse,
5148
Servers,
5249
SetAuthRequestAuthData,
5350
)
@@ -76,7 +73,6 @@
7673
"GetAuthDataResponse",
7774
"GetInstanceResponse",
7875
"GetMcpServersResponse",
79-
"GetServerToolsResponse",
8076
"GetUserAuthResponse",
8177
"GetUserIntegrationsResponse",
8278
"GetUserResponse",
@@ -86,10 +82,8 @@
8682
"ListToolsResponse",
8783
"McpServer",
8884
"McpServerName",
89-
"MultiServerToolsResponse",
9085
"OAuthServerName",
9186
"ServerTool",
92-
"ServerToolsResult",
9387
"Servers",
9488
"SetAuthRequestAuthData",
9589
"SetUserAuthRequestAuthData",

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/2.10.0",
23+
"User-Agent": "klavis/2.11.0",
2424
"X-Fern-Language": "Python",
2525
"X-Fern-SDK-Name": "klavis",
26-
"X-Fern-SDK-Version": "2.10.0",
26+
"X-Fern-SDK-Version": "2.11.0",
2727
}
2828
api_key = self._get_api_key()
2929
if api_key is not None:

src/klavis/mcp_server/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
from .types import (
66
Authdata,
77
DeleteServersFromStrataMcpServerStrataStrataIdServersDeleteRequestServersItem,
8-
GetServerToolsResponse,
98
Servers,
109
SetAuthRequestAuthData,
1110
)
1211

1312
__all__ = [
1413
"Authdata",
1514
"DeleteServersFromStrataMcpServerStrataStrataIdServersDeleteRequestServersItem",
16-
"GetServerToolsResponse",
1715
"Servers",
1816
"SetAuthRequestAuthData",
1917
]

src/klavis/mcp_server/client.py

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from .types.delete_servers_from_strata_mcp_server_strata_strata_id_servers_delete_request_servers_item import (
2727
DeleteServersFromStrataMcpServerStrataStrataIdServersDeleteRequestServersItem,
2828
)
29-
from .types.get_server_tools_response import GetServerToolsResponse
3029
from .types.servers import Servers
3130
from .types.set_auth_request_auth_data import SetAuthRequestAuthData
3231

@@ -746,18 +745,18 @@ def delete_instance_auth(
746745

747746
def get_server_tools(
748747
self,
749-
server_name: str,
748+
server_name: McpServerName,
750749
*,
751750
format: typing.Optional[ToolFormat] = None,
752751
request_options: typing.Optional[RequestOptions] = None,
753-
) -> GetServerToolsResponse:
752+
) -> ListToolsResponse:
754753
"""
755-
Get tools information for one or multiple MCP servers.
754+
Get tools information for any MCP server.
756755
757756
Parameters
758757
----------
759-
server_name : str
760-
The name of the target MCP server. Case-insensitive. Provide a comma-separated list (e.g., 'google calendar,slack') to fetch tools for multiple servers.
758+
server_name : McpServerName
759+
The name of the target MCP server. Case-insensitive (e.g., 'google calendar', 'GOOGLE_CALENDAR', 'Google Calendar' are all valid).
761760
762761
format : typing.Optional[ToolFormat]
763762
The format to return tools in. Default is MCP Native format for maximum compatibility.
@@ -767,26 +766,26 @@ def get_server_tools(
767766
768767
Returns
769768
-------
770-
GetServerToolsResponse
769+
ListToolsResponse
771770
Successful Response
772771
773772
Examples
774773
--------
775-
from klavis import Klavis
774+
from klavis import Klavis, McpServerName
776775
777776
client = Klavis(
778777
api_key="YOUR_API_KEY",
779778
)
780779
client.mcp_server.get_server_tools(
781-
server_name="serverName",
780+
server_name=McpServerName.AFFINITY,
782781
)
783782
"""
784783
_response = self._raw_client.get_server_tools(server_name, format=format, request_options=request_options)
785784
return _response.data
786785

787786
def get_all_mcp_servers(self, *, request_options: typing.Optional[RequestOptions] = None) -> GetMcpServersResponse:
788787
"""
789-
Get all MCP servers with their basic information including id, name, and description.
788+
Get all MCP servers with their basic information including id, name, description, and tools.
790789
791790
Parameters
792791
----------
@@ -1738,18 +1737,18 @@ async def main() -> None:
17381737

17391738
async def get_server_tools(
17401739
self,
1741-
server_name: str,
1740+
server_name: McpServerName,
17421741
*,
17431742
format: typing.Optional[ToolFormat] = None,
17441743
request_options: typing.Optional[RequestOptions] = None,
1745-
) -> GetServerToolsResponse:
1744+
) -> ListToolsResponse:
17461745
"""
1747-
Get tools information for one or multiple MCP servers.
1746+
Get tools information for any MCP server.
17481747
17491748
Parameters
17501749
----------
1751-
server_name : str
1752-
The name of the target MCP server. Case-insensitive. Provide a comma-separated list (e.g., 'google calendar,slack') to fetch tools for multiple servers.
1750+
server_name : McpServerName
1751+
The name of the target MCP server. Case-insensitive (e.g., 'google calendar', 'GOOGLE_CALENDAR', 'Google Calendar' are all valid).
17531752
17541753
format : typing.Optional[ToolFormat]
17551754
The format to return tools in. Default is MCP Native format for maximum compatibility.
@@ -1759,14 +1758,14 @@ async def get_server_tools(
17591758
17601759
Returns
17611760
-------
1762-
GetServerToolsResponse
1761+
ListToolsResponse
17631762
Successful Response
17641763
17651764
Examples
17661765
--------
17671766
import asyncio
17681767
1769-
from klavis import AsyncKlavis
1768+
from klavis import AsyncKlavis, McpServerName
17701769
17711770
client = AsyncKlavis(
17721771
api_key="YOUR_API_KEY",
@@ -1775,7 +1774,7 @@ async def get_server_tools(
17751774
17761775
async def main() -> None:
17771776
await client.mcp_server.get_server_tools(
1778-
server_name="serverName",
1777+
server_name=McpServerName.AFFINITY,
17791778
)
17801779
17811780
@@ -1788,7 +1787,7 @@ async def get_all_mcp_servers(
17881787
self, *, request_options: typing.Optional[RequestOptions] = None
17891788
) -> GetMcpServersResponse:
17901789
"""
1791-
Get all MCP servers with their basic information including id, name, and description.
1790+
Get all MCP servers with their basic information including id, name, description, and tools.
17921791
17931792
Parameters
17941793
----------

0 commit comments

Comments
 (0)