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

boolTrue if the session was found and closed, False otherwise.

Example

1from signalwire.mcp_gateway import SessionManager
2
3manager = SessionManager(config)
4closed = manager.close_session("call-abc-123")
5if closed:
6 print("Session closed successfully")
7else:
8 print("Session not found")