Skip to main content
Glama

trigger_manual_save

Manually save changes to a session in the CSV Editor MCP server by specifying the session ID, ensuring data modifications are securely stored without relying on auto-save.

Instructions

Manually trigger a save for a session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes

Implementation Reference

  • Core handler function that performs the manual save operation by retrieving the CSV session and invoking session.manual_save(), with comprehensive error handling and logging.
    async def trigger_manual_save( session_id: str, ctx: Context = None ) -> Dict[str, Any]: """ Manually trigger a save for a session. Args: session_id: Session identifier ctx: FastMCP context Returns: Dict with save result """ try: manager = get_session_manager() session = manager.get_session(session_id) if not session: return OperationResult( success=False, message="Session not found", error=f"No session with ID: {session_id}" ).model_dump() if ctx: await ctx.info(f"Triggering manual save for session {session_id}") result = await session.manual_save() if result["success"]: if ctx: await ctx.info(f"Manual save completed: {result.get('save_path')}") return OperationResult( success=True, message="Manual save completed", session_id=session_id, data=result ).model_dump() else: return OperationResult( success=False, message="Manual save failed", error=result.get("error") ).model_dump() except Exception as e: logger.error(f"Error in manual save: {str(e)}") if ctx: await ctx.error(f"Failed to trigger manual save: {str(e)}") return OperationResult( success=False, message="Failed to trigger manual save", error=str(e) ).model_dump()
  • MCP tool registration using @mcp.tool decorator, which wraps the core implementation imported as _trigger_manual_save from auto_save_operations.
    @mcp.tool async def trigger_manual_save( session_id: str, ctx: Context = None ) -> Dict[str, Any]: """Manually trigger a save for a session.""" return await _trigger_manual_save(session_id, ctx)

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