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
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Qwen 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. | |
| prompt | Yes | The 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_id | No | Resume 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_dir | No | Absolute 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_seconds | No | Seconds to wait for a response. Increase to 300 for qwen-max on complex tasks. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||