Skip to main content
Glama

mumu_add_hosts

Adds IP-to-hostname mappings to the Android hosts file on a MuMu emulator, optionally replacing existing entries; requires root system overlay for persistence.

Instructions

Pin DNS: add {"ip": "hostname"} mappings to /system/etc/hosts.

Needs the root overlay (mumu_root_system(True)) because the file is on the read-only system partition. replace=True rewrites the file instead of appending. Mappings persist across reboots via the overlay diff image.

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": "mumu_add_hosts"
  }
}

Input Schema

NameRequiredDescriptionDefault
entriesNo
replaceNo
vmindexNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does well: it discloses the prerequisite root overlay, the append-vs-overwrite semantics of replace, and that changes persist across reboots via the overlay diff image. It does not say what happens on duplicate entries, whether an error is raised if the overlay is off, or what the call returns.

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

Conciseness4/5

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

The purpose is front-loaded in the first clause, and each following sentence adds a distinct operational fact (prerequisite, replace semantics, persistence) with no filler. Slightly dense formatting with backticked fragments, but nothing is wasted.

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 mutating tool with no annotations and no output schema, the description covers the prerequisite, the write mode, and durability across reboots, which is the critical context. The remaining gaps are error behavior and the unexplained vmindex parameter.

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

Parameters3/5

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

Schema description coverage is 0% and the entries property has no type at all, so the description's `{"ip": "hostname"}` mapping format and the replace=True behavior are genuinely additive. However, vmindex is never mentioned anywhere, leaving one of three parameters completely undefined.

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?

Names a specific verb and resource ("Pin DNS: add {\"ip\": \"hostname\"} mappings to /system/etc/hosts") and states the exact data shape, so an agent can distinguish this mutating hosts-file tool from the read-side sibling mumu_hosts.

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?

Explicitly states the precondition that the root overlay must be enabled first via mumu_root_system(True) because the target file lives on the read-only system partition, and explains when replace=True applies versus the default append. No exclusion of alternatives beyond the stated prerequisite, which keeps it short of a 5.

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

Deploy Server

Other Tools