Skip to main content
Glama
santoshray02

CSV Editor

by santoshray02

get_session_info

Retrieve details about a specific CSV editing session, including its current state and data, by providing the session ID.

Instructions

Get information about a specific session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the get_session_info tool. Retrieves session from manager, extracts info, and returns formatted OperationResult.
    async def get_session_info(
        session_id: str,
        ctx: Context = None
    ) -> Dict[str, Any]:
        """Get information about a specific session.
        
        Args:
            session_id: Session ID
            ctx: FastMCP context
        
        Returns:
            Session information
        """
        try:
            session_manager = get_session_manager()
            session = session_manager.get_session(session_id)
            
            if not session:
                return OperationResult(
                    success=False,
                    message="Session not found",
                    error="Invalid session ID"
                ).model_dump()
            
            if ctx:
                await ctx.info(f"Retrieved info for session {session_id}")
            
            info = session.get_info()
            return OperationResult(
                success=True,
                message="Session info retrieved",
                session_id=session_id,
                data=info.model_dump()
            ).model_dump()
            
        except Exception as e:
            if ctx:
                await ctx.error(f"Failed to get session info: {str(e)}")
            return OperationResult(
                success=False,
                message="Failed to get session info",
                error=str(e)
            ).model_dump()
  • Registers the get_session_info tool with FastMCP using @mcp.tool decorator. Acts as a thin wrapper delegating to the core handler.
    @mcp.tool
    async def get_session_info(
        session_id: str,
        ctx: Context = None
    ) -> Dict[str, Any]:
        """Get information about a specific session."""
        return await _get_session_info(session_id, ctx)
  • Imports the core get_session_info handler from io_operations module, aliased as _get_session_info for use in the server registration.
    from .tools.io_operations import (
        load_csv as _load_csv,
        load_csv_from_url as _load_csv_from_url,
        load_csv_from_content as _load_csv_from_content,
        export_csv as _export_csv,
        get_session_info as _get_session_info,
        list_sessions as _list_sessions,
        close_session as _close_session
    )
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 states it 'gets information,' implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, what happens if the session doesn't exist, or the format of returned information. This leaves significant gaps for a tool that likely interacts with session data.

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 with no wasted words. It's front-loaded with the core action ('Get information'), making it easy to scan and understand quickly. Every word earns its place by conveying the essential purpose.

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 low complexity (1 parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and a vague purpose, it lacks completeness for understanding behavioral aspects like error handling or session context, leaving room for improvement despite the output schema.

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, and the description doesn't add any parameter details. However, with 0 parameters effectively (since the description provides no param info), the baseline is 4 as per the rules, as there's no need to compensate for undocumented parameters beyond the minimal schema.

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

Purpose3/5

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

The description 'Get information about a specific session' clearly states the verb ('Get') and resource ('session'), but it's vague about what information is retrieved. It distinguishes from siblings like 'list_sessions' (which lists multiple sessions) but doesn't specify what 'information' entails beyond the generic term.

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 doesn't clarify if this should be used after 'list_sessions' to get details for a specific session, or if it's for checking session status versus using 'get_history' for logs. The description implies usage for a 'specific session' but offers no explicit when/when-not instructions.

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