Skip to main content
Glama

qwen

Destructive

Runs an AI code assistant non-interactively to answer coding questions, analyze code, and delegate tasks with configurable approval modes and multi-turn sessions.

Instructions

Run the Qwen Code CLI non-interactively for AI assistance. Read-only (approval mode "plan") unless configured or asked otherwise.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "qwen"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel to use (defaults to QWEN_MCP_DEFAULT_MODEL, else Qwen Code’s own default)
promptYesThe coding task, question, or analysis request
sessionIdNoOptional caller-chosen ID for a multi-turn conversation. Calls with the same ID continue the same Qwen session, in the working directory of the first call.
maxWallTimeNoWall-clock budget for this run, e.g. 90, 30s, 5m, 1.5h (defaults to QWEN_MCP_MAX_WALL_TIME, else 15m)
approvalModeNoplan: analyze only, no edits or commands (default). default: edits and commands need approval, and a headless run has nobody to give it. auto-edit: file edits approved. auto: a classifier approves safe actions. yolo: everything approved.
resetSessionNoForget the Qwen session behind sessionId and start a fresh one with this request
workingDirectoryNoDirectory to run Qwen Code in. Fixed by the first call of a session.
appendSystemPromptNoExtra instructions appended to the system prompt

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The description adds the important behavioral fact that the default approval mode is "plan" and therefore read-only unless the caller opts into something broader, which is consistent with the destructive/openWorld annotations (it does not claim the tool is always safe). However, that default is also visible in the approvalMode schema, and the description says nothing about latency, cost, or that a headless approval-gated run has no approver.

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?

Two short sentences, front-loaded with the core action and followed by the key default-state caveat. No filler or redundant restatement of the title.

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?

The tool is a heavy, open-world agent invocation with 8 parameters, yet the description omits practical context such as expected runtime/cost, that sessionId enables multi-turn continuation, and roughly what a run returns. The rich schema and annotations compensate substantially, making this adequate but not complete.

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 schema description coverage at 100%, the schema already documents model, prompt, sessionId, maxWallTime, approvalMode, resetSession, workingDirectory, and appendSystemPrompt thoroughly. The description's only parameter-relevant contribution is the vague "unless configured or asked otherwise," which adds essentially nothing beyond the enum and its per-value explanations.

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

Purpose4/5

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

The description states a specific verb and resource ("Run the Qwen Code CLI") and qualifies the mode ("non-interactively for AI assistance"), which is enough to separate it from siblings like help, listSessions, and ping. It stops short of explicitly naming those siblings or contrasting behavior, so it is clear but not fully differentiated.

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?

Usage is implied rather than stated: the agent learns this is for non-interactive AI assistance and that the default posture is read-only, with escalation possible when "configured or asked otherwise." There is no explicit when-not-to-use guidance or pointer to the session/listing siblings for follow-up work.

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