gradle-get-details
Retrieve detailed build or test output from Android development projects by specifying an ID. Access logs, errors, tasks, or complete results with configurable truncation and summary options.
Instructions
Fetch full output for a previous build/test by ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| detailType | No | ||
| maxChars | No | Truncate to N chars | |
| summaryOnly | No | Return compact summary payload for logs/tasks/all detail types (ignored for errors) | |
| previewChars | No | For summaryOnly with detailType logs/all: preview length in characters (default: 400) |
Implementation Reference
- src/tools/gradle-get-details.ts:175-194 (handler)The main handler function for the gradle-get-details tool, which retrieves data from the cache and formats it based on the requested detailType.
export async function handleGradleGetDetailsTool( input: GradleGetDetailsInput, context: ServerContext ): Promise<Record<string, unknown>> { const { fullOutput, result, operation } = getCacheEntry(input, context); const previewChars = input.previewChars ?? 400; switch (input.detailType) { case "logs": return buildLogsResponse(input, fullOutput, operation, previewChars); case "errors": return buildErrorsResponse(input, fullOutput, operation); case "tasks": return buildTasksResponse(input, fullOutput, operation); case "all": default: return buildAllResponse(input, fullOutput, result, operation, previewChars); } } - src/tools/gradle-get-details.ts:5-13 (schema)Zod input schema definition for the gradle-get-details tool.
export const gradleGetDetailsInputSchema = z.object({ id: z.string(), detailType: z.enum(["logs", "errors", "tasks", "all"]).optional().default("all"), maxChars: z.number().min(1).optional(), summaryOnly: z.boolean().optional(), previewChars: z.number().min(1).optional(), }); export type GradleGetDetailsInput = z.infer<typeof gradleGetDetailsInputSchema>; - src/tools/gradle-get-details.ts:196-228 (registration)The definition object for the gradle-get-details tool, used for registration.
export const gradleGetDetailsToolDefinition = { name: "gradle-get-details", description: "Fetch full output for a previous build/test by ID.", inputSchema: { type: "object", properties: { id: { type: "string" }, detailType: { type: "string", enum: ["logs", "errors", "tasks", "all"], }, maxChars: { type: "number", description: "Truncate to N chars", }, summaryOnly: { type: "boolean", description: "Return compact summary payload for logs/tasks/all detail types (ignored for errors)", }, previewChars: { type: "number", description: "For summaryOnly with detailType logs/all: preview length in characters (default: 400)", }, }, required: ["id"], }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, };