Skip to main content
Glama
santoshray02

CSV Editor

by santoshray02

get_auto_save_status

Determine if auto-save is active for a session to verify data persistence settings. Use to confirm changes are saved automatically.

Instructions

Get auto-save status for a session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main tool handler: async function that gets auto-save status for a session. Retrieves the session from the session manager, calls session.get_auto_save_status(), wraps result in OperationResult model.
    async def get_auto_save_status(session_id: str, ctx: Context = None) -> dict[str, Any]:
        """
        Get auto-save status for a session.
    
        Args:
            session_id: Session identifier
            ctx: FastMCP context
    
        Returns:
            Dict with auto-save status
        """
        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()
    
            status = session.get_auto_save_status()
    
            if ctx:
                await ctx.info(f"Auto-save status retrieved for session {session_id}")
    
            return OperationResult(
                success=True, message="Auto-save status retrieved", session_id=session_id, data=status
            ).model_dump()
    
        except Exception as e:
            logger.error(f"Error getting auto-save status: {e!s}")
            if ctx:
                await ctx.error(f"Failed to get auto-save status: {e!s}")
            return OperationResult(
                success=False, message="Failed to get auto-save status", error=str(e)
            ).model_dump()
  • Session model method: delegates to auto_save_manager.get_status() to retrieve the auto-save status dict.
    def get_auto_save_status(self) -> dict[str, Any]:
        """Get current auto-save status."""
        return self.auto_save_manager.get_status()
  • AutoSaveManager.get_status(): returns a dict with enabled, mode, strategy, last_save, save_count, periodic_active, and full config.
    def get_status(self) -> dict[str, Any]:
        """Get auto-save status."""
        return {
            "enabled": self.config.enabled,
            "mode": self.config.mode.value,
            "strategy": self.config.strategy.value,
            "last_save": self.last_save.isoformat() if self.last_save else None,
            "save_count": self.save_count,
            "periodic_active": self.periodic_task is not None and not self.periodic_task.done(),
            "config": self.config.to_dict(),
        }
  • MCP tool registration via @mcp.tool decorator on get_auto_save_status, which delegates to the imported _get_auto_save_status.
    @mcp.tool
    async def get_auto_save_status(session_id: str, ctx: Context = None) -> dict[str, Any]:
        """Get auto-save status for a session."""
        return await _get_auto_save_status(session_id, ctx)
  • OperationResult Pydantic model used as the return type schema for the tool.
    class OperationResult(BaseModel):
        """Result of a data operation."""
    
        success: bool = Field(..., description="Whether operation succeeded")
        message: str = Field(..., description="Result message")
        session_id: str | None = Field(None, description="Session ID")
        rows_affected: int | None = Field(None, description="Number of rows affected")
        columns_affected: list[str] | None = Field(None, description="Columns affected")
        data: dict[str, Any] | None = Field(None, description="Additional result data")
        error: str | None = Field(None, description="Error message if failed")
        warnings: list[str] | None = Field(None, description="Warning messages")
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavioral traits. It only states 'Get auto-save status', implying a read operation, but does not mention any side effects, prerequisites (e.g., session must exist), or performance characteristics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence with no redundant words. It is appropriately sized for a simple tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, output schema exists), the description is minimal but sufficient for basic understanding. However, it could benefit from mentioning that the output schema defines the status structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%. The description adds no explanation for the required parameter 'session_id'. Although it is implied from context, the description should elaborate on its purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'Get' and resource 'auto-save status' for a session. It distinguishes from sibling tools like 'configure_auto_save' and 'disable_auto_save' which imply modification. However, it lacks specificity about the status type.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it does not mention that it should be called after configuring auto-save or before disabling it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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