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

const client = new Retell({
  apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});

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"
      ]
    }
  }
]

Documentation Index

Fetch the complete documentation index at: https://docs.retellai.com/llms.txt

Use this file to discover all available pages before exploring further.

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.

Minimum string length: 1
Example:

"oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD"

Query Parameters

version

Optional version of the agent to use for this request. Default to latest version. Agent version reference. Supports a numeric version (for example 3) or a tag/environment name (for example "prod"). When a tag is provided, resolution uses that exact tag assignment (including its dynamic variables). If the tag exists but is currently unassigned, it resolves to latest. When a numeric version (or latest) is provided, resolution applies dynamic variables from the preferred tag for that resolved version (most recently assigned), if any.

Required range: x >= 0
Example:

1

mcp_id
string
required

The ID of the MCP server to get tools from.

Example:

"mcp-server-1"

component_id
string

The ID of the component if the MCP server is configured under a component.

Example:

"component-123"

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"]
}