Skip to main content
Glama
rahulkr
by rahulkr

set_animation_scale

Adjust Android device animation speed for UI testing by setting scale values (0=off, 1=normal, 0.5=fast) to control visual transitions during development workflows.

Instructions

Set animation scale (0 = off, 1 = normal, 0.5 = fast). Useful for speeding up UI tests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scaleNo
device_serialNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'set_animation_scale' tool. It sets the window, transition, and animator animation scales on the Android device using ADB shell settings commands. The @mcp.tool() decorator registers it as an MCP tool.
    @mcp.tool()
    def set_animation_scale(scale: float = 1.0, device_serial: str | None = None) -> str:
        """
        Set animation scale (0 = off, 1 = normal, 0.5 = fast).
        Useful for speeding up UI tests.
        """
        scale_str = str(scale)
        run_adb(["shell", "settings", "put", "global", "window_animation_scale", scale_str], device_serial)
        run_adb(["shell", "settings", "put", "global", "transition_animation_scale", scale_str], device_serial)
        run_adb(["shell", "settings", "put", "global", "animator_duration_scale", scale_str], device_serial)
        return f"Animation scale set to {scale}"
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the tool's purpose and use case but doesn't describe important behavioral aspects: whether this requires specific permissions, if changes persist across reboots, what happens on different Android versions, or what the output contains. For a system configuration tool with zero annotation coverage, this is insufficient.

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 perfectly concise with two sentences that each earn their place. The first sentence explains what the tool does with specific parameter semantics. The second sentence provides clear usage context. No wasted words, well-structured, and front-loaded with the core functionality.

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

Completeness3/5

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

Given that there's an output schema (which reduces the need to describe return values), no annotations, and moderate complexity (2 parameters with 0% schema coverage), the description is moderately complete. It covers the main purpose and use case but misses important behavioral context for a system configuration tool and leaves one parameter undocumented. It's adequate but has clear gaps.

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%, so the schema provides no parameter documentation. The description explains the 'scale' parameter values (0, 1, 0.5) and their meanings, which adds significant value beyond the bare schema. However, it doesn't mention the 'device_serial' parameter at all, leaving half the parameters undocumented. The description partially compensates but doesn't fully address the coverage gap.

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 clearly states the tool's purpose: 'Set animation scale' with specific scale values explained (0=off, 1=normal, 0.5=fast). It distinguishes itself from siblings like 'set_font_scale' by focusing on animation rather than font or other UI settings. However, it doesn't explicitly differentiate from all possible UI configuration tools beyond the immediate context.

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 provides clear context for when to use this tool: 'Useful for speeding up UI tests.' This gives practical guidance about its primary use case. However, it doesn't specify when NOT to use it or mention alternatives like other performance optimization tools in the sibling list.

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/rahulkr/r_adb_mcp_server'

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