close_session

View as MarkdownOpen in Claude

Close and remove a session. Stops the underlying MCP client process. Returns True if the session was found and closed, False if the session did not exist.

Parameters

session_id
strRequired

The session ID to close.

Returns

bool — True if the session was found and closed, False otherwise.

Example

from signalwire.mcp_gateway import SessionManager
manager = SessionManager(config)
closed = manager.close_session("call-abc-123")
if closed:
print("Session closed successfully")
else:
print("Session not found")