- clear_o_auth_token - ClearOAuthToken
- delete - DeleteMCPServer
- get_servers - GetMCPServers
- handle_o_auth_callback - HandleOAuthCallback
- initiate_o_auth_flow - InitiateOAuthFlow
- toggle_server - ToggleMCPServer
- upsert_mcp_servers - UpsertMCPServers
ClearOAuthToken
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.mcp.clear_o_auth_token()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
server_id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.MCPServiceClearOAuthTokenResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
DeleteMCPServer
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.mcp.delete()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.MCPServiceDeleteMCPServerResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
GetMCPServers
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.mcp.get_servers(body={})
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
body |
models.TextqlRPCPublicMCPGetMCPServersRequest | ✔️ | N/A |
connect_timeout_ms |
Optional[float] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.MCPServiceGetMCPServersResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
HandleOAuthCallback
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.mcp.handle_o_auth_callback()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
server_id |
Optional[str] | ➖ | N/A |
code |
Optional[str] | ➖ | N/A |
state |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.MCPServiceHandleOAuthCallbackResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
InitiateOAuthFlow
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.mcp.initiate_o_auth_flow()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
server_id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.MCPServiceInitiateOAuthFlowResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
ToggleMCPServer
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.mcp.toggle_server()
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
id |
Optional[str] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.MCPServiceToggleMCPServerResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |
UpsertMCPServers
import os
from textql_sdk import Textql
from textql_sdk.utils import parse_datetime
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.mcp.upsert_mcp_servers(mcp_servers=[
{
"sse_config": {},
"created_at": parse_datetime("2023-01-15T01:30:15.01Z"),
"updated_at": parse_datetime("2023-01-15T01:30:15.01Z"),
},
])
# Handle response
print(res)| Parameter | Type | Required | Description |
|---|---|---|---|
connect_timeout_ms |
Optional[float] | ➖ | N/A |
mcp_servers |
List[models.TextqlRPCPublicMCPMCPServer] | ➖ | N/A |
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
models.MCPServiceUpsertMCPServersResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.TextqlDefaultError | 4XX, 5XX | */* |