--- name: fmode-image-analysis description: Analyze images, screenshots, posters, UI captures, charts, product photos, and image text through Fmode Doubao vision from Claude Code. Use when the user asks for 图片识别, 看图, 识图, 分析截图, 提取图片文字, UI 截图分析, 图片转 brief/context, or when DeepSeek/other text-only models cannot read images and Claude Code needs a vision fallback using the platform user token. --- # Fmode Image Analysis ## Core Rule Use MCP tool `fmode_image_analysis` for image understanding. Do not ask the user to install a VS Code image-recognition plugin when the installed Fmode tool can handle the image. Default to: - `baseUrl`: `https://api.fmode.cn` - `path`: `v1/chat/completions` - `model`: `doubao-seed-2-0-pro-260215` Billing/auth should use the configured platform user token. Never hardcode or echo tokens. ## Inputs Accept natural user input: - Local file paths: `imagePath` or `imagePaths` - Remote image URLs: `imageUrl` or `imageUrls` - Data URLs or mixed arrays: `images` - User request: `prompt`, `question`, or `text` - Optional background: `context` If the user provides a screenshot or image path in chat, pass it directly to `fmode_image_analysis`. If the user asks a broad question like "帮我看下这张图", use a concise general prompt that asks for visible text, subject, scene, key facts, risks, and next actions. ## Tool Call Examples Single local image: ```json { "imagePath": "E:\\workspace\\example\\screenshot.png", "prompt": "请识别这张截图里的关键信息,并指出可能的问题。" } ``` Multiple images: ```json { "imagePaths": [ "E:\\workspace\\example\\before.png", "E:\\workspace\\example\\after.png" ], "prompt": "对比两张 UI 截图,说明布局和文案差异。" } ``` Structured output: ```json { "imageUrl": "https://example.com/product.png", "prompt": "提取图片中的产品卖点、可见文字和合规风险。", "outputFormat": "json" } ``` ## Token Handling The tool may read tokens from tool input, `.env.local`, environment variables, or user-level Claude credential JSON. Preferred token fields: - `fmodeToken` - `sessionToken` - `vocToken` - `tihaoToken` Environment variables: - `FMODE_TOKEN` - `TIHAO_SESSION_TOKEN` - `VOC_TOKEN` - `DOUBAO_VISION_TOKEN` - `VIDEO_ANALYSIS_TOKEN` Friendly states: - Missing token: return `needs_token` with the platform open/recharge link and `errors=[]`. - Invalid token: return `needs_valid_token` and ask for a valid platform token. - Not opened or quota exhausted: return `needs_recharge` with the open/recharge link and `errors=[]`. - Success: return `ok` with the analysis in chat. Do not expose raw upstream errors, `Authorization`, bearer tokens, session tokens, stack traces, or model keys. ## Output Standard Return the analysis body in chat. For normal image reading, include: - Visible text or OCR-like extraction when present. - Main objects, people, product, interface, chart, or scene. - Important facts and uncertainty. - Risks, inconsistencies, or items that need manual review. - A short conclusion or next action. When the image analysis is meant to support Tihao sourcing, summarize the result as reusable context and pass it into `tihao_brief_sourcing_run` as `productContext`, `chatRecords`, or `briefText` only after the user asks to continue into sourcing.