rtfm
Retrieve Android development documentation for build tools, ADB commands, emulators, UI automation, or cache management to support application building and debugging.
Instructions
Get documentation. Pass category or tool name.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Category: build, adb, emulator, ui, cache | |
| tool | No | Tool name for specific docs |
Implementation Reference
- src/tools/rtfm.ts:33-56 (handler)The core handler function for the 'rtfm' tool, which reads and returns documentation files based on the input category or tool name.
export async function handleRtfmTool(input: RtfmInput): Promise<{ content: string }> { if (!input.category && !input.tool) { const content = await readFile(join(RTFM_DIR, "index.md"), "utf-8"); return { content }; } if (input.category) { try { const content = await readFile(join(RTFM_DIR, `${input.category}.md`), "utf-8"); return { content }; } catch { return { content: `Category '${input.category}' not found. Available: build, adb, emulator, ui, cache` }; } } const category = TOOL_TO_CATEGORY[input.tool!] || "index"; try { const content = await readFile(join(RTFM_DIR, `${category}.md`), "utf-8"); const toolSection = extractToolSection(content, input.tool!); return { content: toolSection || content }; } catch { return { content: `Tool '${input.tool}' not found.` }; } } - src/tools/rtfm.ts:9-12 (schema)Input schema validation for the rtfm tool.
export const rtfmInputSchema = z.object({ category: z.string().optional(), tool: z.string().optional(), }); - src/tools/rtfm.ts:64-80 (registration)Definition object used to register the 'rtfm' tool in the MCP server.
export const rtfmToolDefinition = { name: "rtfm", description: "Get documentation. Pass category or tool name.", inputSchema: { type: "object", properties: { category: { type: "string", description: "Category: build, adb, emulator, ui, cache" }, tool: { type: "string", description: "Tool name for specific docs" }, }, }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, };