MCPcopy Create free account
hub / github.com/IBM/mcp-cli / delete

Method delete

src/mcp_cli/chat/session_store.py:156–170  ·  view source on GitHub ↗

Delete a saved session. Args: session_id: Session ID to delete Returns: True if deleted, False if not found

(self, session_id: str)

Source from the content-addressed store, hash-verified

154 return sessions
155
156 def delete(self, session_id: str) -> bool:
157 """Delete a saved session.
158
159 Args:
160 session_id: Session ID to delete
161
162 Returns:
163 True if deleted, False if not found
164 """
165 path = self._session_path(session_id)
166 if path.exists():
167 path.unlink()
168 logger.info(f"Session deleted: {session_id}")
169 return True
170 return False

Callers 7

executeMethod · 0.95
handleAppLaunchedFunction · 0.80
handleAppClosedFunction · 0.80
popoutSidebarViewFunction · 0.80
test_delete_existingMethod · 0.80
test_delete_missingMethod · 0.80

Calls 1

_session_pathMethod · 0.95

Tested by 2

test_delete_existingMethod · 0.64
test_delete_missingMethod · 0.64