Skip to main content
Glama

pull_file

Download files from Android devices to your local machine by specifying remote and local paths. This tool transfers data from connected Android devices for backup, analysis, or processing.

Instructions

Download a file from the Android device to the local machine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
remote_pathYesAbsolute path on the Android device
local_pathYesLocal filesystem path to save the file to
device_idNoDevice serial number

Implementation Reference

  • Actual implementation of the pull_file tool logic, executing ADB pull.
    export async function pullFile(
      remotePath: string,
      localPath: string,
      deviceId?: string
    ): Promise<string> {
      const resolved = await deviceManager.resolveDeviceId(deviceId);
      const validRemote = validateDevicePath(remotePath);
      validateLocalPath(localPath);
    
      const result = await adbExec(['pull', validRemote, localPath], resolved, 60000);
    
      log.info('File pulled', { remotePath: validRemote, localPath, deviceId: resolved });
      return `${result.stdout}\n${result.stderr}`.trim();
    }
  • MCP registration and handler wrapper for the 'pull_file' tool.
    server.registerTool(
      'pull_file',
      {
        description: 'Download a file from the Android device to the local machine.',
        inputSchema: {
          remote_path: z.string().describe('Absolute path on the Android device'),
          local_path: z.string().describe('Local filesystem path to save the file to'),
          device_id: z.string().optional().describe('Device serial number'),
        },
      },
      async ({ remote_path, local_path, device_id }) => {
        return await metrics.measure('pull_file', device_id || 'default', async () => {
          const result = await pullFile(remote_path, local_path, device_id);
          return {
            content: [{
              type: 'text' as const,
              text: JSON.stringify({ success: true, message: result }, null, 2),
            }],
          };
        });
      }
    );
Behavior2/5

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

No annotations are provided, so the description must carry full behavioral disclosure burden. It fails to specify critical file operation behaviors: overwrite behavior for existing local files, handling of binary vs. text files, permission preservation, or error conditions (e.g., remote file not found). 'Download' implies a read operation but lacks safety or side-effect details.

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?

Single sentence of 11 words with no redundancy. The action is front-loaded ('Download'), and every word serves to define scope or directionality. Efficient and unambiguous.

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

Completeness3/5

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

For a file transfer tool with no output schema and no annotations, the description is minimally viable. It covers the basic operation but omits behavioral specifics (overwrite, error handling) that would be necessary for robust agent usage. The 100% schema parameter coverage compensates partially for the lack of operational detail.

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?

With 100% schema description coverage, the schema fully documents all three parameters ('Absolute path on the Android device', 'Local filesystem path'). The description reinforces the semantics by stating the transfer direction ('from...to'), but adds no additional syntax constraints, path format requirements, or examples beyond the schema.

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 provides a specific verb ('Download'), clear resource ('file'), and explicit directionality ('from the Android device to the local machine'). This scope clearly distinguishes it from sibling tool 'push_file' and UI automation tools like 'click_element' or 'list_files'.

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

Usage Guidelines3/5

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

While the directional language ('from Android to local') implicitly signals when to use this tool versus 'push_file', there is no explicit guidance on prerequisites (e.g., device connection state), error handling, or explicit cross-reference to sibling alternatives.

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/divineDev-dotcom/android_mcp'

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