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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "battery_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
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()