Skip to main content
Glama
rahulkr
by rahulkr

clear_logcat

Clear Android device logcat buffers to remove old logs and start fresh debugging sessions. Use this tool to maintain clean logs for development, testing, and troubleshooting workflows.

Instructions

Clear the logcat buffer

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_serialNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the clear_logcat tool, registered via the @mcp.tool() decorator. It executes 'adb shell logcat -c' to clear the logcat buffer on the specified device.
    @mcp.tool()
    def clear_logcat(device_serial: str | None = None) -> str:
        """Clear the logcat buffer"""
        return run_adb(["shell", "logcat", "-c"], device_serial)
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does, not how it behaves. It doesn't disclose whether this requires specific permissions, whether it affects system stability, what confirmation (if any) is provided, or what the output contains. 'Clear' implies a destructive operation, but the description doesn't elaborate on implications.

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 - a single verb phrase that communicates the core functionality without any wasted words. It's front-loaded with the essential action and target.

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?

For a destructive operation tool with no annotations, the description is minimal but complete enough to understand the basic function. The presence of an output schema means return values don't need explanation in the description. However, more behavioral context would be helpful given this is a system modification tool.

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 description doesn't mention parameters at all, but with only one optional parameter (device_serial) and 0% schema description coverage, the baseline would be lower. However, the tool's purpose is so specific (clearing a system buffer) that the single parameter's role is reasonably inferable - it identifies which device to target when multiple are connected.

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 action ('Clear') and target resource ('the logcat buffer'), making the purpose immediately understandable. It doesn't differentiate from siblings like 'get_logcat' beyond the verb, but the verb itself provides clear distinction.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives. While the verb 'clear' suggests it's for resetting/emptying the buffer, there's no mention of prerequisites, side effects, or when this operation is appropriate versus just reading logs with 'get_logcat'.

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