{ "jsonrpc": "2.0", "id": 2, "result": { "tools": [ { "name": "lanhu_resolve_invite_link", "description": "Resolve Lanhu invite/share link to actual project URL\n\nUSE THIS WHEN: User provides invite link (lanhuapp.com/link/#/invite?sid=xxx)\n\nPurpose: Convert invite link to usable project URL with tid/pid/docId parameters\n\nReturns:\n Resolved URL and parsed parameters", "inputSchema": { "additionalProperties": false, "properties": { "invite_url": { "description": "Lanhu invite link. Example: https://lanhuapp.com/link/#/invite?sid=xxx", "type": "string" } }, "required": [ "invite_url" ], "type": "object" }, "outputSchema": { "additionalProperties": true, "type": "object" }, "_meta": { "fastmcp": { "tags": [] } } }, { "name": "lanhu_list_product_documents", "description": "[PRD/Requirement Document Discovery] List all product documents (PRD/prototype) in a Lanhu project.\n\nUSE THIS WHEN user says: 有哪些需求文档, 列出项目的文档, 项目下的PRD列表, 产品文档列表,\n 这个项目有什么文档, 文档列表, list documents, product_documents, 所有文档, 全部 PRD\nDO NOT USE for: 获取某个具体文档的页面 (use lanhu_get_pages instead),\n UI设计图列表 (use lanhu_get_designs instead)\n\nPurpose: Discover available PRD/requirement documents in a project so the user can pick\n the right one to analyze. Typically used BEFORE lanhu_get_pages when docId is unknown.\n\nReturns a dict with top-level metadata and a simplified `documents` list. Each document\ncarries a ready-to-use `doc_url` that can be fed straight into lanhu_get_pages.", "inputSchema": { "additionalProperties": false, "properties": { "url": { "description": "Lanhu project URL. Example: https://lanhuapp.com/web/#/item/project/product?tid=xxx&pid=xxx (docId optional, will be ignored). Required params: tid, pid. If you have an invite link, use lanhu_resolve_invite_link first!", "type": "string" } }, "required": [ "url" ], "type": "object" }, "outputSchema": { "additionalProperties": true, "type": "object" }, "_meta": { "fastmcp": { "tags": [] } } }, { "name": "lanhu_get_pages", "description": "[PRD/Requirement Document] Get page list of Lanhu Axure prototype - CALL THIS FIRST before analyzing\n\nUSE THIS WHEN user says: 需求文档, 需求, PRD, 产品文档, 原型, 交互稿, Axure, 看看需求, 帮我看需求, 需求分析\nDO NOT USE for: UI设计图, 设计稿, 视觉设计, 切图 (use lanhu_get_designs instead)\n\nPurpose: Get page list of PRD/requirement/prototype document. Must call this BEFORE lanhu_get_ai_analyze_page_result.\n\nReturns:\n Page list and document metadata", "inputSchema": { "additionalProperties": false, "properties": { "url": { "description": "Lanhu URL with docId parameter (indicates PRD/prototype document). Example: https://lanhuapp.com/web/#/item/project/product?tid=xxx&pid=xxx&docId=xxx. Required param: pid. tid and docId recommended. Supports detailDetach format: ?pid=xxx&image_id=xxx. If you have an invite link, use lanhu_resolve_invite_link first!", "type": "string" } }, "required": [ "url" ], "type": "object" }, "outputSchema": { "additionalProperties": true, "type": "object" }, "_meta": { "fastmcp": { "tags": [] } } }, { "name": "lanhu_get_ai_analyze_page_result", "description": "[PRD/Requirement Document] Analyze Lanhu Axure prototype pages - GET VISUAL CONTENT\n\nUSE THIS WHEN user says: 需求文档, 需求, PRD, 产品文档, 原型, 交互稿, Axure, 看看需求, 帮我看需求, 分析需求, 需求分析\nDO NOT USE for: UI设计图, 设计稿, 视觉设计, 切图 (use lanhu_get_ai_analyze_design_result instead)\n\nFOUR-STAGE WORKFLOW (ZERO OMISSION):\n1. STAGE 1: Call with mode=\"text_only\" and page_names=\"all\" for global text scan\n - Purpose: Build god's view, understand structure, design grouping strategy\n - Output: Text only (fast)\n - ⚠️ IMPORTANT: After STAGE 1, MUST ask user to choose analysis_mode!\n\n2. STAGE 2: Call with mode=\"full\" for each group (output format varies by analysis_mode)\n - developer: Extract ALL details (fields, rules, flows) - for coding\n - tester: Extract test scenarios, validation points, field rules - for test cases\n - explorer: Extract core functions only (3-5 points) - for requirement review\n\n3. STAGE 3: Reverse validation (format varies by analysis_mode)\n\n4. STAGE 4: Generate deliverable (format varies by analysis_mode)\n - developer: Detailed requirement doc + global flowchart\n - tester: Test plan + test case list + field validation table\n - explorer: Review PPT-style doc + module table + dependency diagram\n\nReturns:\n - mode=\"text_only\": Text content only (for fast global scan)\n - mode=\"full\": Visual + text + design style info (format determined by analysis_mode)\n Each page includes [设计样式参考] with:\n - 文字颜色: exact text colors used (rgba/rgb values, sorted by frequency)\n - 背景颜色: exact background colors used\n - 字体规格: font-size / font-weight / color combinations\n - 页面图片资源: all images used on the page with dimensions and local paths\n When generating code, you MUST use these exact color/font/size values from\n [设计样式参考] instead of guessing. For images, use the local file paths provided.", "inputSchema": { "additionalProperties": false, "properties": { "url": { "description": "Lanhu URL with docId parameter (indicates PRD/prototype document). Example: https://lanhuapp.com/web/#/item/project/product?tid=xxx&pid=xxx&docId=xxx. Required param: pid. tid and docId recommended. Supports detailDetach format. If you have an invite link, use lanhu_resolve_invite_link first!", "type": "string" }, "page_names": { "anyOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ], "description": "Page name(s) to analyze. Use 'all' for all pages, single name like '退款流程', or list like ['退款流程', '用户中心']. Get exact names from lanhu_get_pages first!" }, "mode": { "default": "full", "description": "Analysis mode: 'text_only' (fast global scan, text only for overview) or 'full' (detailed analysis with images+text). Default: 'full'", "type": "string" }, "analysis_mode": { "default": "developer", "description": "Analysis perspective (MUST be chosen by user after STAGE 1): 'developer' (detailed for coding), 'tester' (test scenarios/validation), 'explorer' (quick overview for review). Default: 'developer'", "type": "string" } }, "required": [ "url", "page_names" ], "type": "object" }, "_meta": { "fastmcp": { "tags": [] } } }, { "name": "lanhu_get_designs", "description": "[UI Design] Get Lanhu UI design image list - CALL THIS FIRST before analyzing designs\n\nUSE THIS WHEN user says: UI设计图, 设计图, 设计稿, 视觉设计, UI稿, 看看设计, 帮我看设计图, 设计评审\nDO NOT USE for: 需求文档, PRD, 原型, 交互稿, Axure (use lanhu_get_pages instead)\nDO NOT USE for: 切图, 图标, 素材 (use lanhu_get_design_slices instead)\n\nPurpose: Get list of UI design images from designers. Must call this BEFORE lanhu_get_ai_analyze_design_result.\n\nReturns:\n Design image list and project metadata", "inputSchema": { "additionalProperties": false, "properties": { "url": { "description": "Lanhu URL WITHOUT docId (indicates UI design project, not PRD). Example: https://lanhuapp.com/web/#/item/project/stage?tid=xxx&pid=xxx. Required param: pid. tid is optional. Supports detailDetach format: ?pid=xxx&image_id=xxx", "type": "string" } }, "required": [ "url" ], "type": "object" }, "outputSchema": { "additionalProperties": true, "type": "object" }, "_meta": { "fastmcp": { "tags": [] } } }, { "name": "lanhu_get_ai_analyze_design_result", "description": "[UI Design] Analyze Lanhu UI design images - GET VISUAL CONTENT + HTML CODE\n\nUSE THIS WHEN user says: UI设计图, 设计图, 设计稿, 视觉设计, UI稿, 看看设计, 帮我看设计图, 设计评审\nDO NOT USE for: 需求文档, PRD, 原型, 交互稿, Axure (use lanhu_get_ai_analyze_page_result instead)\nDO NOT USE for: 切图, 图标, 素材 (use lanhu_get_design_slices instead)\n\nWORKFLOW: First call lanhu_get_designs to get design list, then call this to analyze specific designs.\n\nReturns:\n Visual representation of UI design images AND HTML+CSS code for each design.\n First block: summary text with \"设计图 1/2/3...\" and each design's HTML code.\n Following blocks: images in the same order as 设计图 1, 2, 3... (image N = design N).\n \nCRITICAL - How to use the returned HTML+CSS (MUST follow this workflow):\n\n ⚠️ AUTHORITY PRIORITY (highest → lowest):\n 1. HTML+CSS code — the PRIMARY source of truth for all visual parameters\n 2. Design Tokens — supplementary reference for gradients/borders/shadows\n 3. Design Image — visual verification ONLY, never override CSS values\n\n The returned HTML+CSS is the DESIGN SPECIFICATION generated from design schema.\n Every CSS property value (color, size, spacing, font, gradient, border-radius,\n etc.) is extracted from the original design data and MUST be used as-is.\n\n RULE 1 - HTML+CSS IS DESIGN SPEC, COPY CSS VALUES DIRECTLY:\n The CSS values are the single source of truth for all design parameters.\n You MUST directly copy/reuse the exact CSS property values from the code.\n DO NOT modify, simplify, or \"improve\" any CSS value. Specifically:\n - DO NOT change rgba() to hex or vice versa (keep rgba(255,115,10,1) as-is)\n - DO NOT round or simplify numbers (keep 0.30000001192092896 as-is)\n - DO NOT replace linear-gradient with solid colors\n - DO NOT change font-family order or remove fallback fonts\n - DO NOT adjust margin/padding values for \"cleaner\" numbers\n - DO NOT replace any img src or background-url with SVG, CSS shapes, or emoji\n - DO NOT omit any visual element from the design\n The HTML DOM structure and class names indicate layout intent (flex-row=Row,\n flex-col=Column, justify-between=SpaceBetween, etc.), adapt them to the\n target framework's component model while keeping all CSS values unchanged.\n\n RULE 2 - DETECT USER PROJECT AND GENERATE FRAMEWORK-APPROPRIATE CODE:\n STEP 1: Read project config files (package.json, tsconfig.json, pubspec.yaml,\n build.gradle, Podfile, etc.) to detect framework and styling approach.\n STEP 2: Generate code matching the detected framework:\n - React/Next.js → JSX component + CSS Modules / styled-components / Tailwind\n - Vue/Nuxt → Single File Component (.vue) with