GET
/
get-mcp-tools
/
{agent_id}
JavaScript
import Retell from 'retell-sdk';

const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
});

const mcpToolDefinitions = await client.mcpTool.getMcpTools('oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD', {
  mcp_id: 'mcp-server-1',
});

console.log(mcpToolDefinitions);
[
  {
    "name": "search_files",
    "description": "Search for files in the filesystem",
    "inputSchema": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "description": "Search query"
        }
      },
      "required": [
        "query"
      ]
    }
  }
]

Authorizations

Authorization
string
header
required

Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"

Path Parameters

agent_id
string
required

Unique id of the agent to get MCP tools for.

Example:

"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD"

Query Parameters

version
integer

Optional version of the API to use for this request.

Example:

1

mcp_id
string
required

The ID of the MCP server to get tools from.

Example:

"mcp-server-1"

Response

Successfully retrieved MCP tools.

name
string
required

Name of the MCP tool.

Example:

"search_files"

description
string
required

Description of what the MCP tool does.

Example:

"Search for files in the filesystem"

inputSchema
object
required

JSON schema defining the input parameters for the tool.

Example:
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query"
}
},
"required": ["query"]
}