77from ..types .call_tool_response import CallToolResponse
88from ..types .connection_type import ConnectionType
99from ..types .create_server_response import CreateServerResponse
10+ from ..types .get_auth_metadata_response import GetAuthMetadataResponse
1011from ..types .get_instance_response import GetInstanceResponse
1112from ..types .get_mcp_servers_response import GetMcpServersResponse
1213from ..types .get_o_auth_url_response import GetOAuthUrlResponse
@@ -160,7 +161,7 @@ def create_server_instance(
160161 Parameters
161162 ----------
162163 server_name : McpServerName
163- The name of the target MCP server.
164+ The name of the target MCP server. Case-insensitive (e.g., 'google calendar', 'GOOGLE_CALENDAR', 'Google Calendar' are all valid).
164165
165166 user_id : str
166167 The identifier for the user requesting the server URL.
@@ -312,7 +313,7 @@ def get_tools(
312313 Parameters
313314 ----------
314315 server_name : McpServerName
315- The name of the target MCP server.
316+ The name of the target MCP server. Case-insensitive (e.g., 'google calendar', 'GOOGLE_CALENDAR', 'Google Calendar' are all valid).
316317
317318 request_options : typing.Optional[RequestOptions]
318319 Request-specific configuration.
@@ -402,6 +403,43 @@ def set_instance_auth_token(
402403 )
403404 return _response .data
404405
406+ def get_instance_auth_metadata (
407+ self , instance_id : str , * , request_options : typing .Optional [RequestOptions ] = None
408+ ) -> GetAuthMetadataResponse :
409+ """
410+ Retrieves the auth metadata for a specific instance that the API key owner controls.
411+ Includes access token, refresh token, and other authentication metadata.
412+
413+ This endpoint includes proper ownership verification to ensure users can only access
414+ authentication data for instances they own. It also handles token refresh if needed.
415+
416+ Parameters
417+ ----------
418+ instance_id : str
419+ The ID of the connection instance to get auth metadata for.
420+
421+ request_options : typing.Optional[RequestOptions]
422+ Request-specific configuration.
423+
424+ Returns
425+ -------
426+ GetAuthMetadataResponse
427+ Successful Response
428+
429+ Examples
430+ --------
431+ from klavis import Klavis
432+
433+ client = Klavis(
434+ api_key="YOUR_API_KEY",
435+ )
436+ client.mcp_server.get_instance_auth_metadata(
437+ instance_id="instance_id",
438+ )
439+ """
440+ _response = self ._raw_client .get_instance_auth_metadata (instance_id , request_options = request_options )
441+ return _response .data
442+
405443 def get_o_auth_url (
406444 self ,
407445 * ,
@@ -419,7 +457,7 @@ def get_o_auth_url(
419457 Parameters
420458 ----------
421459 server_name : McpServerName
422- The name of the target MCP server.
460+ The name of the target MCP server. Case-insensitive (e.g., 'google calendar', 'GOOGLE_CALENDAR', 'Google Calendar' are all valid).
423461
424462 instance_id : str
425463 The unique identifier for the connection instance.
@@ -619,7 +657,7 @@ async def create_server_instance(
619657 Parameters
620658 ----------
621659 server_name : McpServerName
622- The name of the target MCP server.
660+ The name of the target MCP server. Case-insensitive (e.g., 'google calendar', 'GOOGLE_CALENDAR', 'Google Calendar' are all valid).
623661
624662 user_id : str
625663 The identifier for the user requesting the server URL.
@@ -803,7 +841,7 @@ async def get_tools(
803841 Parameters
804842 ----------
805843 server_name : McpServerName
806- The name of the target MCP server.
844+ The name of the target MCP server. Case-insensitive (e.g., 'google calendar', 'GOOGLE_CALENDAR', 'Google Calendar' are all valid).
807845
808846 request_options : typing.Optional[RequestOptions]
809847 Request-specific configuration.
@@ -919,6 +957,51 @@ async def main() -> None:
919957 )
920958 return _response .data
921959
960+ async def get_instance_auth_metadata (
961+ self , instance_id : str , * , request_options : typing .Optional [RequestOptions ] = None
962+ ) -> GetAuthMetadataResponse :
963+ """
964+ Retrieves the auth metadata for a specific instance that the API key owner controls.
965+ Includes access token, refresh token, and other authentication metadata.
966+
967+ This endpoint includes proper ownership verification to ensure users can only access
968+ authentication data for instances they own. It also handles token refresh if needed.
969+
970+ Parameters
971+ ----------
972+ instance_id : str
973+ The ID of the connection instance to get auth metadata for.
974+
975+ request_options : typing.Optional[RequestOptions]
976+ Request-specific configuration.
977+
978+ Returns
979+ -------
980+ GetAuthMetadataResponse
981+ Successful Response
982+
983+ Examples
984+ --------
985+ import asyncio
986+
987+ from klavis import AsyncKlavis
988+
989+ client = AsyncKlavis(
990+ api_key="YOUR_API_KEY",
991+ )
992+
993+
994+ async def main() -> None:
995+ await client.mcp_server.get_instance_auth_metadata(
996+ instance_id="instance_id",
997+ )
998+
999+
1000+ asyncio.run(main())
1001+ """
1002+ _response = await self ._raw_client .get_instance_auth_metadata (instance_id , request_options = request_options )
1003+ return _response .data
1004+
9221005 async def get_o_auth_url (
9231006 self ,
9241007 * ,
@@ -936,7 +1019,7 @@ async def get_o_auth_url(
9361019 Parameters
9371020 ----------
9381021 server_name : McpServerName
939- The name of the target MCP server.
1022+ The name of the target MCP server. Case-insensitive (e.g., 'google calendar', 'GOOGLE_CALENDAR', 'Google Calendar' are all valid).
9401023
9411024 instance_id : str
9421025 The unique identifier for the connection instance.
0 commit comments