Skip to main content
Glama

update_gravity

Refresh Pi-hole's adlist database to update blocklists and improve ad-blocking performance.

Instructions

Refresh Pi-hole gravity (adlist database). Takes a minute or more to complete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'update_gravity' tool. It posts to the '/action/gravity' endpoint to refresh Pi-hole's adlist database (gravity).
    async def update_gravity() -> dict:
        """Refresh Pi-hole gravity (adlist database). Takes a minute or more to complete."""
        return await client.post("/action/gravity")
  • The tool is registered via the @mcp.tool() decorator in the register() function of maintenance.py.
    @mcp.tool()
    async def update_gravity() -> dict:
        """Refresh Pi-hole gravity (adlist database). Takes a minute or more to complete."""
        return await client.post("/action/gravity")
  • register_all() iterates over all tool modules (including maintenance) and calls their register() function to register all tools on the FastMCP server.
    count += module.register(mcp, client)
  • The top-level server startup calls register_all() to register all tools including update_gravity on the FastMCP instance.
    _tool_count = register_all(mcp, _client)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosing behavioral traits. It only mentions the duration but does not state whether the operation is destructive, idempotent, requires specific permissions, or affects system state beyond the gravity database.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two sentences, front-loading the purpose and adding only the essential duration note. Every word contributes value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with no parameters and an existing output schema, the description is largely complete. It could add context about prerequisites (e.g., Pi-hole must be enabled) but is adequate for its complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so 100% coverage is trivially achieved. No additional parameter semantics are needed; the description does not mislead or omit anything regarding parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Refresh') and the resource ('Pi-hole gravity (adlist database)'), making the tool's purpose immediately understandable and distinct from sibling tools that are primarily get/list or add/remove operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes a practical note about the operation taking 'a minute or more to complete,' which sets user expectations. However, it does not explicitly state when to use this tool versus alternatives or provide any exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/chris2ao/pihole-mcp'

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