curl --request POST \
--url https://api.tryhamsa.com/v2/voice-agents/web-tool/mcp/discover \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"serverUrl": "https://mcp.example.com/sse",
"authToken": "Bearer {{secrets.MCP_TOKEN}}",
"timeOut": 10
}
'
{
"success": true,
"message": "success",
"data": {
"functions": [
{
"name": "create_ticket",
"description": "Create a support ticket",
"inputSchema": {
"type": "object",
"properties": {
"title": {
"type": "string"
}
},
"required": [
"title"
]
}
}
]
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}Web Tools Routes
Discover MCP Functions
Connects to an MCP server and returns the functions it offers, so you can pick them for an MCP tool. It works with servers your browser can’t reach directly, and resolves secret placeholders without exposing them.
POST
/
v2
/
voice-agents
/
web-tool
/
mcp
/
discover
curl --request POST \
--url https://api.tryhamsa.com/v2/voice-agents/web-tool/mcp/discover \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"serverUrl": "https://mcp.example.com/sse",
"authToken": "Bearer {{secrets.MCP_TOKEN}}",
"timeOut": 10
}
'
{
"success": true,
"message": "success",
"data": {
"functions": [
{
"name": "create_ticket",
"description": "Create a support ticket",
"inputSchema": {
"type": "object",
"properties": {
"title": {
"type": "string"
}
},
"required": [
"title"
]
}
}
]
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"code": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}Authorizations
Body
application/json
Was this page helpful?