server
Job Monitor MCP Server.
Provides log inspection, failure detection, and structured diagnostics for jobs executed through the MADA Job Manager. This server exposes tools to read log files, extract tails, and classify failures using regex-based patterns.
JobMonitorServer
Bases: BaseMCPServer
MCP server that provides tools for job log inspection, failure detection, and diagnostic summarization.
The server exposes tools that read stdout and stderr logs, extract tail segments, and classify failures using the regex-based patterns defined in the job_monitor.failure_patterns module.
Attributes:
| Name | Type | Description |
|---|---|---|
tail_bytes |
int
|
Maximum number of bytes to read from the end of each log file. Used to avoid sending excessive log content to the client. Default is obtained from the MONITOR_LOG_TAIL_BYTES environment variable or falls back to 50000. |
status_depth |
int
|
Number of historical status entries to inspect when summarizing job state. Default is obtained from the MONITOR_DEFAULT_STATUS_DEPTH environment variable or falls back to 20. |
Methods:
| Name | Description |
|---|---|
summarize_status |
Inspect logs, classify failures, and return a structured summary suitable for planning or diagnosis. |
read_logs |
Return the tailed stdout and stderr logs for a specific job. |
Source code in src/mada_tools/monitor/job_monitor/server.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |