Skip to main content
Glama
santoshray02

CSV Editor

by santoshray02

trigger_manual_save

Manually save CSV editing sessions to preserve data changes and prevent loss, ensuring work is securely stored when needed.

Instructions

Manually trigger a save for a session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function implementing the tool logic. It retrieves the session, calls session.manual_save(), handles the result, and returns an OperationResult.
    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()
  • Registration of the tool using the @mcp.tool decorator. This wrapper function calls the actual handler 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)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a write operation ('trigger a save') but doesn't specify whether this requires specific permissions, what happens if the session is invalid, or if there are rate limits. The description is minimal and lacks crucial behavioral context for a mutation tool.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 that there's an output schema (which handles return values) and only 1 parameter, the description is minimally adequate. However, as a mutation tool with no annotations, it should provide more context about behavioral aspects like error conditions or side effects to be fully complete.

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

Parameters4/5

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

The input schema has 1 parameter with 0% description coverage, but the description doesn't add any details about the 'session_id' parameter. However, with only 1 parameter, the baseline is 4 as the agent can infer it from context, though additional guidance would be beneficial.

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 ('Manually trigger a save') and the target resource ('for a session'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'configure_auto_save' or 'disable_auto_save' which are related to save functionality but serve different purposes.

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?

The description provides no guidance on when to use this tool versus alternatives like 'configure_auto_save' or 'disable_auto_save', nor does it mention prerequisites such as needing an active session. It only states what the tool does, not when it's appropriate.

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