Skip to main content
Glama

run_gradle

Executes Gradle commands for builds, tests, linting, and dependency checks. Prefers ./gradlew in the project directory, falling back to the global gradle binary.

Instructions

Executes a Gradle command and returns stdout. Uses ./gradlew if present in cwd, otherwise falls back to the global 'gradle' binary. Use for: build, assembleDebug, test, lint, dependencies, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoOptional project directory (where gradlew lives). Defaults to current directory.
commandYesThe gradle task and args, e.g. 'assembleDebug' or 'test --tests PlayerViewModelTest'.
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It explains the gradlew-vs-global-gradle fallback and the stdout return, which is useful. However, it omits details like stderr handling, exit code behavior, or potential side effects (e.g., file modifications from builds). This is a partial but not complete picture.

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 two sentences, front-loaded with the primary purpose, then concisely covering fallback behavior and usage examples. Every sentence earns its place with no fluff or redundancy.

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 simple command executor with two parameters and no output schema, the description is quite complete. It covers what the tool does, how the executable is selected, and typical use cases. It doesn't address error handling or environment prerequisites, but these are not critical for an agent to begin using it effectively. Given the tool's moderate complexity, the description meets the bar.

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 100%, so the input schema already fully documents both parameters (cwd and command). The description's examples ('build', 'assembleDebug') align exactly with schema examples, adding no additional semantic value. The baseline of 3 applies.

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 the tool 'Executes a Gradle command and returns stdout', which is a specific verb and resource. It distinguishes itself from sibling tools like run_bash or run_android_cli by focusing solely on Gradle commands, making its purpose unambiguous.

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?

It provides explicit use-case examples ('build, assembleDebug, test, lint, dependencies') and explains when to use the tool. While it doesn't explicitly mention when not to use it (e.g., for non-Gradle commands), the clear scope and sibling context imply the boundary. This is strong guidance, though not exhaustive.

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/maheshmishra271090-design/android-dev-mcp'

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