Skip to main content
Glama
MauricePutinas

Android Studio MCP

as_inspect_code

Read-onlyIdempotent

Run Android Studio's headless code inspection to detect problems in your Android project, returning a structured list of issues grouped by severity and inspection type.

Instructions

Run Android Studio's code inspection headlessly and return the problems.

This launches the IDE's offline inspection engine (the same one behind "Analyze > Inspect Code") via studio64.exe inspect, writes XML reports to a temp dir and parses them into a structured problem list grouped by severity and inspection. It must index the project first, so it can take minutes on a large project. Do not run while Android Studio is open with the same project (config-dir contention) — close it first or expect a slower run.

Args: params (InspectInput): project_dir, optional scope_dir, optional profile, max_problems, timeout.

Returns: str: JSON with total_problems, by_severity, by_inspection, and a truncated 'problems' list of {inspection, severity, file, line, description}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations indicate readOnly, non-destructive, idempotent. The description adds crucial details: launches offline engine, writes XML reports, requires indexing, and potential issues with concurrent IDE usage. No contradiction with annotations.

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 concise with a clear opening sentence, followed by necessary implementation details, and structured Args/Returns sections. Every sentence adds value without redundancy.

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

Completeness5/5

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

Given the tool's complexity (headless inspection, indexing, contention), the description covers all important behavioral aspects. The return format is specified as JSON with key fields. Annotations and schema complement each other well.

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's Args section summarizes parameters (project_dir, scope_dir, profile, max_problems, timeout) with brief explanations. Although the schema already provides detailed descriptions, this summary adds value by grouping them in one place and indicating the nested Input type.

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 it runs Android Studio's code inspection headlessly and returns problems, specifying the same engine as 'Analyze > Inspect Code'. It effectively distinguishes itself from siblings like as_gradle_lint by naming the specific IDE tool.

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

Usage Guidelines5/5

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

The description explicitly advises against running while Android Studio is open due to config-dir contention, and notes that indexing can take minutes. It provides clear context for when to use this tool.

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/MauricePutinas/Android-Studio-MCP-Claude-Code'

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