Skip to main content
POST
/
mcp-server
/
list-tools
List Tools
curl --request POST \
  --url https://api.klavis.ai/mcp-server/list-tools \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "serverUrl": "<string>",
  "connectionType": "StreamableHttp",
  "format": "mcp_native",
  "headers": {}
}
'
import requests

url = "https://api.klavis.ai/mcp-server/list-tools"

payload = {
"serverUrl": "<string>",
"connectionType": "StreamableHttp",
"format": "mcp_native",
"headers": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serverUrl: '<string>',
connectionType: 'StreamableHttp',
format: 'mcp_native',
headers: {}
})
};

fetch('https://api.klavis.ai/mcp-server/list-tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
serverUrl: '<string>',
connectionType: 'StreamableHttp',
format: 'mcp_native',
headers: {}
})
};

fetch('https://api.klavis.ai/mcp-server/list-tools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "success": true,
  "tools": [
    "<unknown>"
  ],
  "error": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Your Klavis AI API key.

Body

application/json
serverUrl
string
required

The full URL for connecting to the MCP server

connectionType
enum<string>
default:StreamableHttp

The connection type to use for the MCP server. Default is STREAMABLE_HTTP.

Available options:
SSE,
StreamableHttp
format
enum<string>
default:mcp_native

The format to return tools in. Default is MCP Native format for maximum compatibility.

Available options:
openai,
anthropic,
gemini,
mcp_native
headers
Headers · object | null

Optional HTTP headers to include when connecting to the server

Response

Successful Response

success
boolean
required

Whether the list tools request was successful

format
enum<string>
required

The format of the returned tools

Available options:
openai,
anthropic,
gemini,
mcp_native
tools
any[] | null

List of tools in the requested format

error
string | null

Error message, if the request failed