Skip to main content
Glama

run_crash_command

Execute crash utility commands to analyze Linux system crash dumps, including sys, bt, log, ps, files, vm, and kmem operations.

Instructions

Runs crash utility command (e.g., sys, bt, log, ps, files, vm, kmem).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
session_idNo
truncateNo

Implementation Reference

  • The MCP tool handler for 'run_crash_command', registered via @mcp.tool() decorator. Retrieves the session, validates it, and delegates command execution to UnifiedSession.execute_command with 'crash:' prefix.
    @mcp.tool() def run_crash_command(command: str, session_id: Optional[str] = None, truncate: bool = True) -> str: """Runs crash utility command (e.g., sys, bt, log, ps, files, vm, kmem).""" 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] if not session.is_active(): del sessions[target_id] return "Error: Session is no longer active." try: return session.execute_command(f"crash:{command}", truncate=truncate) except Exception as e: return f"Error executing command: {str(e)}"
  • The @mcp.tool() decorator registers the run_crash_command function as an MCP tool.
    @mcp.tool()

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