Skip to content
Sign up

Refresh Mcp Server Tools

client.mcpServers.refresh(stringmcpServerID, McpServerRefreshParams { agent_id } params?, RequestOptionsoptions?): McpServerRefreshResponse
patch/v1/mcp-servers/{mcp_server_id}/refresh

Refresh tools for an MCP server by:

  1. Fetching current tools from the MCP server
  2. Deleting tools that no longer exist on the server
  3. Updating schemas for existing tools
  4. Adding new tools from the server

Returns a summary of changes made.

ParametersExpand Collapse
mcpServerID: string
params: McpServerRefreshParams { agent_id }
agent_id?: string | null
ReturnsExpand Collapse
McpServerRefreshResponse = unknown
Refresh Mcp Server Tools
import Letta from '@letta-ai/letta-client';

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

const response = await client.mcpServers.refresh('mcp_server_id');

console.log(response);
{}
Returns Examples
{}