Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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"])
  • 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`.", )
  • 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()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Zhuoli/mcp101'

If you have feedback or need assistance with the MCP directory API, please join our Discord server