Skip to main content
Glama

list_sessions

Display all active CSV editing sessions to manage ongoing data manipulation tasks within the CSV Editor MCP server.

Instructions

List all active sessions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function implementing the list_sessions tool logic. It retrieves the session manager, lists active sessions, and returns formatted session information.
    async def list_sessions(ctx: Context = None) -> Dict[str, Any]: """List all active sessions. Args: ctx: FastMCP context Returns: List of active sessions """ try: session_manager = get_session_manager() sessions = session_manager.list_sessions() if ctx: await ctx.info(f"Found {len(sessions)} active sessions") return { "success": True, "message": f"Found {len(sessions)} active sessions", "sessions": [s.model_dump() for s in sessions] } except Exception as e: if ctx: await ctx.error(f"Failed to list sessions: {str(e)}") return { "success": False, "message": "Failed to list sessions", "error": str(e) }
  • Registration of the 'list_sessions' tool using the @mcp.tool decorator. This thin wrapper delegates to the implementation in io_operations.py.
    @mcp.tool async def list_sessions(ctx: Context = None) -> Dict[str, Any]: """List all active sessions.""" return await _list_sessions(ctx)
  • Helper method in SessionManager class that performs the actual listing of active sessions after cleanup, returning SessionInfo objects.
    def list_sessions(self) -> List[SessionInfo]: """List all active sessions.""" self._cleanup_expired() return [session.get_info() for session in self.sessions.values() if session.df is not None]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/santoshray02/csv-editor'

If you have feedback or need assistance with the MCP directory API, please join our Discord server