Skip to main content
Glama
DarkNoah
by DarkNoah

Execute AutoGLM Task

autoglm_task
Destructive

Automate Android device tasks by sending natural language instructions; the model analyzes the screen and executes actions until the task is done.

Instructions

Execute a task on a connected device using AutoGLM online model.

This tool sends a natural language task description to the AutoGLM online model, which analyzes the current screen state and automatically performs the required actions to complete the task. The model will iteratively capture screenshots, analyze the screen, and execute actions until the task is complete or the maximum steps are reached.

Args:

  • device_id (string, optional): Target ADB device ID (if not specified, uses the first connected device)

  • prompt (string): Natural language task description for AutoGLM to execute (1-5000 characters)

  • max_steps (number, optional): Maximum number of steps to execute (default: 100, range: 1-200)

  • lang ('cn' | 'en', optional): Language for system prompt and responses (default: 'cn')

How it works:

  1. Captures the current screen via ADB

  2. Sends the screen image and task prompt to AutoGLM online model

  3. The model analyzes the screen and decides on the next action

  4. Executes the action via ADB

  5. Repeats until the task is complete or max_steps is reached

Examples:

  • Use when: "Open WeChat and send a message to Mom saying hello"

  • Use when: "Order a coffee from Starbucks app"

  • Use when: "Navigate to the settings and enable dark mode"

  • Don't use when: You only need to execute a single known action (use autoglm_execute_action instead)

Error Handling:

  • Returns "Error: No ADB devices connected" if no device is available

  • Returns "Error: API authentication failed" if API key is invalid

  • Returns "Error: Task execution failed" if the task cannot be completed

  • Returns partial results if the task is interrupted

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoLanguage for system prompt and responses (default: cn)cn
promptYesNatural language task description for AutoGLM to execute
device_idNoTarget ADB device ID (if not specified, uses the first connected device)
max_stepsNoMaximum number of steps to execute (default: 100)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.5

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, and the description adds meaningful behavioral context: it iterates through screenshots, executes actions via ADB, stops at max_steps, can return partial results, and lists specific error conditions. It discloses the autonomous multi-step nature that simple annotations cannot convey.

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 well-structured with sections for Args, How it works, Examples, and Error Handling. The opening sentence is front-loaded with the tool's purpose, and every section earns its place by providing operational or routing details.

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 complex autonomous tool with no output schema, the description covers workflow, parameters, examples, error conditions, and partial-result behavior. The only gap is that it does not explicitly describe what a successful return value looks like, though it does mention several failure return strings.

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 schema already documents all four parameters. The description repeats the parameter meanings and adds a few clarifications (e.g., device_id falls back to first connected device, max_steps controls iteration count), but it does not add substantial semantic value 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 uses a specific verb-resource pairing: 'Execute a task on a connected device using AutoGLM online model.' It clearly explains that the tool sends a natural-language prompt, iteratively captures screens, and performs actions until completion. This distinguishes it sharply from the sibling device-management tools.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use examples ('Open WeChat and send a message to Mom...', 'Order a coffee...') and an explicit when-not-to-use case, directing the agent to autoglm_execute_action for single known actions. This is strong decision routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools