Skip to main content
Glama

list_crash_dumps

Scan directories recursively to discover crash dump files for system analysis.

Instructions

Scans for crash dumps in the specified directory (recursive).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_pathNo/app/crash

Implementation Reference

  • The handler function for the 'list_crash_dumps' MCP tool. It is decorated with @mcp.tool() for registration with FastMCP. Scans the specified directory recursively for crash dumps using CrashDiscovery.find_dumps, sorts them by modification time, limits to top 10, and formats the output as a string.
    @mcp.tool() def list_crash_dumps(search_path: str = Config.CRASH_SEARCH_PATH) -> str: """Scans for crash dumps in the specified directory (recursive).""" logger.info(f"Listing crash dumps in {search_path}") try: dumps = CrashDiscovery.find_dumps([search_path]) if not dumps: return "No crash dumps found." # Sort by modification time (newest first) dumps.sort(key=lambda x: x['modified'], reverse=True) # Limit to top 10 to save tokens total_count = len(dumps) limit = 10 dumps = dumps[:limit] output = [f"Found {total_count} crash dumps (showing top {limit}):"] for d in dumps: output.append(f"- {d['path']} (Size: {d['size']} bytes)") if total_count > limit: output.append(f"... and {total_count - limit} more.") logger.info(f"Returning {len(output)} lines of output") return "\n".join(output) except Exception as e: logger.error(f"Error in list_crash_dumps: {e}", exc_info=True) return f"Error scanning for dumps: {str(e)}"
  • The @mcp.tool() decorator registers the list_crash_dumps function as an MCP tool with FastMCP instance 'mcp'.
    @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