Skip to main content
Glama

root_access

Enables root shell and stack dump access in Waydroid by running commands through sudo, with optional password-file authentication and a check that prevents sudo lockout.

Instructions

Sets up root in Android for shell with root and stack_dump. adb root is disabled in Waydroid, so root runs sudo waydroid shell. Pass a file holding the sudo password, or nothing to use sudo without one (a NOPASSWD rule). With check, runs id -u as root once; if sudo rejects the password, root stays off so repeated failures can't lock sudo.

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

Input Schema

NameRequiredDescriptionDefault
checkNo
password_fileNoAbsolute path of a file containing the sudo password.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly succeeds: it explains why the implementation uses `sudo waydroid shell` (adb root disabled in Waydroid), the NOPASSWD fallback, and the safety-oriented `check` behavior where a rejected password leaves root off to avoid sudo lockout. It does not disclose how root is later disabled or whether the effect persists across calls.

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?

Four short sentences, each earning its place: mechanism, credential modes, and verification behavior. The opening sentence is slightly awkward in its wording but does front-load the core purpose.

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 two-parameter tool with no annotations and no output schema, the description covers the mechanism, both parameter paths, and the failure mode. The remaining gap is whether the result of `id -u` is returned to the caller and how root state is torn down, which matters for a state-changing tool.

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 coverage is 50%: `password_file` is documented in the schema, while `check` is not, and the description fills that gap by explaining it runs `id -u` once as root. That is real added meaning, but the credential-handling detail for `password_file` (what happens to the file, whether it is read once) is not expanded beyond the schema.

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

Purpose4/5

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

The description names a specific action (sets up root in Android) and scopes it to two named sibling tools, `shell` and `stack_dump`, so the agent knows exactly which capabilities gain root. The phrasing 'Sets up root in Android for `shell` with root' is slightly circular, but the verb+resource is unambiguous.

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

Usage Guidelines3/5

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

It implies when to call this (before using `shell` or `stack_dump` with root) and explains the two calling modes: pass a password file, or nothing for a NOPASSWD sudo rule. It does not state when not to use it, what the alternative is if root is unavailable, or whether root persists after the call.

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