Skip to main content
Glama
yup-21
by yup-21

stop_session

Terminates an active crash analysis session to free system resources and end debugging processes.

Instructions

Terminates an active session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `stop_session` tool handler, registered via `@mcp.tool()` decorator. Terminates the specified session (or last active one) by calling `session.stop()`, removing it from the sessions dictionary, and updating the last_session_id if necessary.
    @mcp.tool()
    def stop_session(session_id: Optional[str] = None) -> str:
        """Terminates an active session."""
        global last_session_id
        
        target_id = session_id or last_session_id
        
        if not target_id:
            return "Error: No session specified and no active default session."
        
        if target_id not in sessions:
            return f"Error: Session ID {target_id} not found."
            
        session = sessions[target_id]
        session.stop()
        del sessions[target_id]
        
        if last_session_id == target_id:
            last_session_id = None
            
        return f"Session {target_id} closed."
Behavior2/5

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

No annotations are provided, so the description carries full burden. 'Terminates' implies a destructive mutation, but it doesn't disclose behavioral traits such as whether termination is reversible, what happens to session data, permission requirements, or error conditions (e.g., if session_id is invalid). The description is minimal and lacks critical 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 with zero waste. It is front-loaded with the core action ('Terminates') and resource ('an active session'), making it easy to scan. Every word earns its place, and there is no redundant or verbose language.

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 complexity (destructive mutation with 1 parameter) and no annotations, the description is incomplete—it lacks behavioral details and parameter guidance. However, an output schema exists, so return values needn't be explained. The description covers the basic purpose but falls short on usage and transparency, making it minimally adequate but with clear gaps.

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

Parameters3/5

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

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description adds no information about the 'session_id' parameter (e.g., what it is, how to obtain it, default behavior if null). However, with only 1 parameter and a default of null, the baseline is 3 as the tool might operate on a current or default session without explicit input.

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 'Terminates an active session' clearly states the action (terminates) and resource (active session). It distinguishes from siblings like 'start_session' (opposite action) and 'get_sys_info' (different resource). However, it doesn't specify what type of session (e.g., debugging, system) or what termination entails beyond the basic verb.

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. It doesn't mention prerequisites (e.g., requires an active session), exclusions (e.g., don't use if session is already stopped), or comparisons to siblings like 'run_crash_command' (which might operate within a session). Usage is implied from the name but not explicitly stated.

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/yup-21/crash-mcp'

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