Skip to main content
Glama

qwen_prompt

Send detailed prompts to the Qwen Code CLI and get response text, model used, and session ID for multi-turn conversations. Choose qwen-max, qwen-plus, or qwen-turbo based on task complexity.

Instructions

Send a detailed prompt to the Qwen Code CLI. Returns response text, model used, and session_id.

MODEL SELECTION:

  • Default work → leave model empty (CLI picks best for your tier)

  • Complex work → qwen-max (deep reasoning, architecture, hard bugs)

  • Standard work → qwen-plus (balanced, most coding tasks)

  • Bulk/batch work → qwen-turbo (fastest, cheapest, high-volume tasks)

SESSION CONTINUITY: First call returns a session_id. Pass it back on the next call to continue the conversation. Qwen persists session history to disk — context is preserved across calls.

ALWAYS write detailed prompts. Include file paths, numbered steps, and output format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoQwen model to use. Leave empty to use the CLI default (recommended). '' (empty) — DEFAULT. CLI picks the best model for your auth tier automatically. 'qwen-max' — COMPLEX tasks: architecture, multi-file refactors, deep analysis. 'qwen-plus' — STANDARD: balanced capability and speed for most coding tasks. 'qwen-turbo' — BULK: fastest and cheapest for batch/repetitive/loop tasks.
promptYesThe full, detailed prompt for Qwen Code. ALWAYS write in detail — never vague. Rules: (1) Include exact file paths for any files involved. (2) Number each step when asking for multi-step work. (3) Specify the exact output format: 'return a JSON object', 'return only the modified function as a code block', 'list changed files'. (4) Paste the relevant code, error message, or data directly into the prompt. Example GOOD: 'Read C:/projects/app/utils/parser.py. Step 1: Find the function parse_date(s: str). Step 2: Add handling for ISO 8601 format (YYYY-MM-DDTHH:MM:SS). Step 3: Return the complete updated function as a Python code block.' Example BAD: 'Fix the date parser.'
session_idNoResume a previous Qwen session by its ID (from a prior qwen_prompt response). Leave empty to start a fresh session. Pass the same session_id on every subsequent turn of a multi-turn conversation. Qwen persists session history to disk — context is preserved across calls.
project_dirNoAbsolute path to the working directory for this call. Set this when your prompt references files in a specific project. Example: 'C:/Users/User/projects/myapp'. Defaults to current directory.
timeout_secondsNoSeconds to wait for a response. Increase to 300 for qwen-max on complex tasks.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses session persistence to disk ('Qwen persists session history to disk'), the session_id lifecycle, and the output components (response text, model, session_id). While it doesn't cover auth or errors, it covers the key behavioral traits.

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 clear sections for purpose, model selection, session continuity, and prompt best practices. It is appropriately sized for a 5-parameter tool, with every sentence providing value.

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

Completeness5/5

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

Given the output schema exists and parameter descriptions are thorough, the description covers all essential aspects: purpose, model selection rules, session management, and prompt-writing guidelines. It is sufficiently complete for correct tool invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with detailed descriptions. The tool description adds practical meaning by categorizing model choices (default, complex, etc.) and explaining the session_id continuity pattern, enhancing the raw 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 clearly states 'Send a detailed prompt to the Qwen Code CLI. Returns response text, model used, and session_id.' This identifies the verb, resource, and output. It also distinguishes from siblings like gemini_prompt by specifying the Qwen CLI.

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

Usage Guidelines4/5

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

The description provides explicit model selection guidance for different task types (default, complex, standard, bulk) and explains session continuation. However, it does not explicitly contrast with alternative tools, relying on the tool name to imply when to use Qwen vs. other models.

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/h19overflow/polycode'

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