Skip to main content
Glama

gradle-test

Execute Gradle tests for Android applications, detect regressions with baseline comparison, and generate test summaries for development workflows.

Instructions

Run tests. Returns summary with testId. With baseline, auto-detects regressions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
operationYes
moduleNo
filterNoe.g., '*LoginTest*'
taskNameNoTask name for baseline operations. Defaults to operation name.

Implementation Reference

  • The main handler function for the 'gradle-test' tool, which delegates to specialized handler functions based on the requested operation.
    export async function handleGradleTestTool(
      input: GradleTestInput,
      context: ServerContext
    ): Promise<Record<string, unknown>> {
      switch (input.operation) {
        case "unitTest":
        case "connectedTest":
          return handleRunTests(input, context, input.operation);
        case "saveBaseline":
          return handleSaveBaseline(input, context);
        case "clearBaseline":
          return handleClearBaseline(input);
      }
    }
  • Zod schema defining the input validation for the 'gradle-test' tool.
    export const gradleTestInputSchema = z.object({
      operation: z.enum(["unitTest", "connectedTest", "saveBaseline", "clearBaseline"]),
      module: z.string().optional(),
      filter: z.string().optional(),
      taskName: z.string().optional().describe("Task name for baseline operations. Defaults to operation name."),
    });
  • Tool definition for 'gradle-test' which is used for registration.
    export const gradleTestToolDefinition = {
      name: "gradle-test",
      description: "Run tests. Returns summary with testId. With baseline, auto-detects regressions.",
      inputSchema: {
        type: "object",
        properties: {
          operation: {
            type: "string",
            enum: ["unitTest", "connectedTest", "saveBaseline", "clearBaseline"],
          },
          module: { type: "string" },
          filter: { type: "string", description: "e.g., '*LoginTest*'" },
          taskName: {
            type: "string",
            description: "Task name for baseline operations. Defaults to operation name.",
          },
        },
        required: ["operation"],
      },
      annotations: {
        readOnlyHint: false,
        destructiveHint: true,
        idempotentHint: false,
        openWorldHint: false,
      },
    };
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. It discloses that the tool returns a summary with testId and auto-detects regressions when baselines exist, which adds value. However, it fails to disclose whether operations are destructive (clearBaseline), what the summary contains, or side effects like filesystem modifications.

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?

The description is extremely concise at three short sentences. While efficiently structured and front-loaded with the primary action, it sacrifices necessary detail for the tool's complexity. Every sentence earns its place, but the brevity is excessive given four parameters and multiple operation modes.

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

Completeness2/5

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

Given four parameters, four operation modes, baseline management complexity, and no output schema or annotations, the description is inadequate. It lacks explanation of the baseline workflow, the testId's purpose (likely for gradle-get-details), parameter interactions (e.g., filter only applies to test operations), and return value structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (filter and taskName described; operation and module undescribed). The description fails to compensate by explaining the critical 'operation' enum values (particularly saveBaseline/clearBaseline) or what 'module' refers to (Gradle module path?). No parameter guidance is provided in the text.

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

Purpose3/5

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

The description states 'Run tests' which is somewhat tautological given the tool name 'gradle-test', but it partially redeems itself by mentioning the baseline regression detection feature. However, it fails to capture the full scope of the tool—it omits that the tool also manages baselines (save/clear operations) via the operation enum, leaving the agent unaware of roughly half the tool's functionality.

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 provided on when to use this tool versus gradle-build (sibling), or when to choose between unitTest vs connectedTest operations. The baseline feature is mentioned but without guidance on when to save vs clear baselines or prerequisites for using regression detection.

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/thecombatwombat/replicant-mcp'

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