battery_status
Check current battery information including charge level, status, and health metrics from macOS systems using system power management data.
Instructions
Show current battery information reported by pmset -g batt.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- macos_tools_mcp/tools.py:71-73 (handler)Core implementation of the battery_status tool: runs `pmset -g batt` command to fetch battery information.def battery_status() -> str: """Return the battery summary from ``pmset -g batt``.""" return _run_command(["pmset", "-g", "batt"])
- macos_tools_mcp/server.py:27-30 (registration)Registration of the 'battery_status' tool using the @app.tool decorator.@app.tool( name="battery_status", description="Show current battery information reported by `pmset -g batt`.", )
- macos_tools_mcp/server.py:31-32 (handler)Server-side handler function for battery_status tool, which delegates execution to tools.battery_status().def battery_status(_: Context | None = None) -> str: return tools.battery_status()