examples.health
Tools: health.system. Part of the Java Tool SDK examples.
By ToolGate Examples Signed
Java 17, protocol 2
Use in ToolGate
In the ToolGate console, open Server packages, then Marketplace, and install this package. These values identify exactly what you install:
{
"marketplace": "olo-labs-marketplace",
"packageId": "examples.health",
"version": "0.1.0",
"packageDigest": "sha256:0c092bbfd1665b02480446611c2e97de2aa4a0cfccc9a85f32479b3682505e30"
}
Overview
System health
Tools: health.system. Part of the Java Tool SDK examples.
One call that answers "is this machine healthy?": CPU load, memory, swap and every disk volume, each rated OK, WARN or CRITICAL against thresholds the administrator sets, with the worst one as the overall status. Also reports host name, OS, processors, load average and uptime. Pure Java, so the same jar works on Linux, Windows and macOS.
Safety
- Read-only, takes no arguments, and reads only operating-system counters.
Settings
Globals unless marked. Set them in toolgate.dev.json for development, as TOOLGATE_GLOBAL_<NAME> (or TOOLGATE_DESTINATION_<NAME>, TOOLGATE_SECRET_<NAME>) for a standalone jar, or on the deployment under ToolGate.
| Setting | Default | Meaning |
|---|---|---|
CpuWarnPercent |
85 |
CPU load that warns. |
MemoryWarnPercent |
90 |
Memory or swap use that warns. |
DiskWarnPercent |
85 |
Disk use that warns. |
CriticalPercent |
95 |
Use at which any check is critical. |
DiskPaths |
* |
Comma-separated paths whose volumes are checked, or * for all. |
Deploy it to every Tool Host (leave Tool Hosts blank) and the same question works on any machine in the fleet.
Try it
cp toolgate.dev.example.json toolgate.dev.json # then edit it; never commit toolgate.dev.json
toolgate dev # an MCP server over stdio
toolgate pack # build/toolgate/system-health-0.1.0.tgpkg
Things to ask a model connected to it:
- "Is this server healthy?"
- "Are any disks close to full?"
- Source repository
- License: Apache-2.0
Tools
health.systemRead only- System health Takes a health snapshot of this machine: CPU load, memory, swap and disk use, each rated OK, WARN or CRITICAL against the configured thresholds, with an overall status.
Settings it needs
| Name | Kind | Type | Default | Description |
|---|---|---|---|---|
CpuWarnPercent | global | INT | 85 | System CPU load at or above which the CPU check warns. |
CriticalPercent | global | INT | 95 | Use at or above which any check is critical. |
DiskPaths | global | STRING | * | Comma-separated paths whose volumes are checked, or * for every volume. |
DiskWarnPercent | global | INT | 85 | Disk use at or above which a disk check warns. |
MemoryWarnPercent | global | INT | 90 | Memory use at or above which the memory check warns. |
Versions
| Version | API change | Compatibility | Published |
|---|---|---|---|
| 0.1.0 | none | Java 17, protocol 2 | 15 Oct 2026 - 11:55 |
Publisher
ToolGate Examples, OLO Labs
Publisher details are supplied by the publisher. Validation checks package format, not code safety.