battery_status
Check macOS battery charge level and status using system utilities. Retrieve current battery information for monitoring power usage.
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 handler function implementing the battery_status tool by executing `pmset -g batt` command.def battery_status() -> str: """Return the battery summary from ``pmset -g batt``.""" return _run_command(["pmset", "-g", "batt"])
- macos_tools_mcp/server.py:27-32 (registration)Registers the battery_status tool with FastMCP server, providing a thin wrapper that delegates to tools.battery_status().@app.tool( name="battery_status", description="Show current battery information reported by `pmset -g batt`.", ) def battery_status(_: Context | None = None) -> str: return tools.battery_status()