You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

529 lines
29 KiB

3 weeks ago
{
"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 <style scoped>\n - Angular component.ts + component.html + component.css\n - Svelte Component.svelte with <style>\n - Flutter StatelessWidget with EdgeInsets, BoxDecoration, etc.\n - SwiftUI View struct with ViewModifier\n - Android Compose @Composable function with Modifier\n - Plain HTML Single self-contained .html file with inline <style>\n STEP 3: Follow the project's existing conventions (file naming, directory\n structure, styling approach). If no framework detected, default to\n plain HTML single file.\n CSS-to-platform property mapping reference:\n width/height px Android: dp, iOS: pt, Flutter: logical pixels\n font-size px Android: sp, iOS: pt, Flutter: fontSize\n margin/padding Keep proportions, convert px to dp/pt\n border-radius Android: dp, iOS: cornerRadius, Flutter: BorderRadius\n color rgba() Android: Color.argb(), iOS: UIColor, Flutter:
"inputSchema": {
"additionalProperties": false,
"properties": {
"url": {
"description": "Lanhu URL WITHOUT docId (indicates UI design project). 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"
},
"design_names": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"description": "Design name(s) or index number(s). 'all' = all designs. Number (e.g. 6) = the 6th item in lanhu_get_designs list (by 'index' field), NOT by name prefix. Exact name (e.g. '6_friend页_挂件墙') = match by full name. Get names/index from lanhu_get_designs first."
}
},
"required": [
"url",
"design_names"
],
"type": "object"
},
"_meta": {
"fastmcp": {
"tags": []
}
}
},
{
"name": "lanhu_get_design_slices",
"description": "[UI Slices/Assets] Get slice/asset info from Lanhu design for download\n\nUSE THIS WHEN user says: 切图, 下载切图, 图标, icon, 素材, 资源, 导出切图, 下载素材, 获取图标\nDO NOT USE for: 需求文档, PRD, 原型 (use lanhu_get_pages instead)\nDO NOT USE for: 看设计图, 设计评审 (use lanhu_get_designs instead)\n\nWORKFLOW: First call lanhu_get_designs to get design list, then call this to get slices from specific design.\n\nReturns:\n Slice list with download URLs, AI will handle smart naming and batch download",
"inputSchema": {
"additionalProperties": false,
"properties": {
"url": {
"description": "Lanhu URL WITHOUT docId (indicates UI design project). 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"
},
"design_name": {
"description": "Exact design name (single design only, NOT 'all'). Example: '首页设计', '登录页'. Must match exactly with name from lanhu_get_designs result!",
"type": "string"
},
"include_metadata": {
"default": true,
"description": "Include color, opacity, shadow info",
"type": "boolean"
}
},
"required": [
"url",
"design_name"
],
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"_meta": {
"fastmcp": {
"tags": []
}
}
},
{
"name": "lanhu_say",
"description": "Post message to team message board\n\nUSE THIS WHEN user says: 有话说, 留言, 发消息, 通知团队, 告诉xxx, @张三, @李四, 共享给xxx, 分享给xxx, 发给xxx, 写给xxx, 转发给xxx\n\nMessage type description:\n- normal: Normal message/notification (default)\n- task: Query task - Only for query operations (query code, query database, query TODO, etc.), NO code modification\n- question: Question message - Needs answer from others\n- urgent: Urgent message - Needs immediate attention\n- knowledge: Knowledge base - Long-term preserved experience, pitfalls, notes, best practices\n\nSecurity restrictions:\ntask type can only be used for query operations, including:\n- Query code location, code logic\n- Query database table structure, data\n- Query test methods, test coverage\n- Query TODO, comments\n- Forbidden: Modify code, delete files, execute commands, commit code\n\nKnowledge use cases:\n- Pitfalls encountered and solutions\n- Testing notes\n- Development experience and best practices\n- Common FAQ\n- Technical decision records\n\nPurpose: Post message to project message board, can @ specific person to send Feishu notification\n\nReturns:\n Post result, including message ID and details",
"inputSchema": {
"additionalProperties": false,
"properties": {
"url": {
"description": "蓝湖URL(含tid和pid)。例: https://lanhuapp.com/web/#/item/project/product?tid=xxx&pid=xxx&docId=xxx。会自动提取项目和文档信息",
"type": "string"
},
"summary": {
"description": "留言标题/概要",
"type": "string"
},
"content": {
"description": "留言详细内容",
"type": "string"
},
"mentions": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "⚠️@提醒人名。必须是具体人名,例如: 张三/李四/王五/赵六等。禁止使用角色名(后端/前端等)!"
},
"message_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "留言类型。可选: normal(普通留言), task(查询任务-仅限查询操作,禁止修改代码), question(需要回答的问题), urgent(紧急通知), knowledge(知识库-长期保存的经验知识)。默认: normal"
}
},
"required": [
"url",
"summary",
"content"
],
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"_meta": {
"fastmcp": {
"tags": []
}
}
},
{
"name": "lanhu_say_list",
"description": "Get message list with filtering and search\n\nUSE THIS WHEN user says: 查看留言, 有什么消息, 谁@我了, 留言列表, 消息列表\n\nSupports two modes:\n1. Provide specific URL: Query messages in that project\n2. url='all' or url=None: Query messages in all projects (global mode)\n\nImportant: To prevent AI context overflow, it is recommended:\n1. Use filter_type to filter by type\n2. Use search_regex for further filtering (regex, AI can generate itself)\n3. Use limit to limit the number of returned messages\n4. Unless user explicitly requests \"view all\", filters must be used\n\nExample:\n- Query all knowledge: filter_type=\"knowledge\"\n- Search containing \"test\" or \"refund\": search_regex=\"test|refund\"\n- Query tasks and containing \"database\": filter_type=\"task\", search_regex=\"database\"\n- Limit to 10 latest: limit=10\n\nPurpose: Get message board message summary list, supports type filtering, regex search and quantity limit\n\nReturns:\n Message list, including mentions_me count",
"inputSchema": {
"additionalProperties": false,
"properties": {
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "蓝湖URL或'all'。不传或传'all'=查询所有项目;传具体URL=查询单个项目"
},
"filter_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "筛选留言类型: normal/task/question/urgent/knowledge。不传则返回所有类型"
},
"search_regex": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "正则表达式搜索(在summary和content中匹配)。例: '测试|退款|坑'。建议使用以避免返回过多消息"
},
"limit": {
"default": null,
"description": "限制返回消息数量(防止上下文爆炸)。不传则不限制",
"title": "Limit"
}
},
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"_meta": {
"fastmcp": {
"tags": []
}
}
},
{
"name": "lanhu_say_detail",
"description": "Get message detail (supports batch query)\n\nUSE THIS WHEN user says: 查看详情, 看看内容, 详细内容, 消息详情\n\nTwo modes:\n1. Provide url: Parse project_id from url, query messages in that project\n2. url='all'/None + project_id: Global mode, need to manually specify project_id\n\nPurpose: Get full content of messages by message ID\n\nReturns:\n Message detail list with full content",
"inputSchema": {
"additionalProperties": false,
"properties": {
"message_ids": {
"description": "消息ID。单个数字或数组。例: 1 或 [1,2,3]"
},
"url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "蓝湖URL。传URL则自动解析项目ID;不传则需手动提供project_id参数"
},
"project_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "项目ID。仅在不传url时需要,用于全局查询模式"
}
},
"required": [
"message_ids"
],
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"_meta": {
"fastmcp": {
"tags": []
}
}
},
{
"name": "lanhu_say_edit",
"description": "Edit message\n\nUSE THIS WHEN user says: 编辑留言, 修改消息, 更新内容\n\nPurpose: Edit published message, will record editor and edit time\n\nReturns:\n Updated message details",
"inputSchema": {
"additionalProperties": false,
"properties": {
"url": {
"description": "蓝湖URL(含tid和pid)",
"type": "string"
},
"message_id": {
"description": "要编辑的消息ID"
},
"summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "新标题(可选,不传则不修改)"
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "新内容(可选,不传则不修改)"
},
"mentions": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "新@列表(可选,不传则不修改)"
}
},
"required": [
"url",
"message_id"
],
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"_meta": {
"fastmcp": {
"tags": []
}
}
},
{
"name": "lanhu_say_delete",
"description": "Delete message\n\nUSE THIS WHEN user says: 删除留言, 删除消息, 移除\n\nPurpose: Delete published message\n\nReturns:\n Delete result",
"inputSchema": {
"additionalProperties": false,
"properties": {
"url": {
"description": "蓝湖URL(含tid和pid)",
"type": "string"
},
"message_id": {
"description": "要删除的消息ID"
}
},
"required": [
"url",
"message_id"
],
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"_meta": {
"fastmcp": {
"tags": []
}
}
},
{
"name": "lanhu_get_members",
"description": "Get project collaborators list\n\nUSE THIS WHEN user says: 谁参与了, 协作者, 团队成员, 有哪些人\n\nPurpose: Get list of team members who have used Lanhu MCP tools to access this project\n\nReturns:\n Collaborator list with first and last access time",
"inputSchema": {
"additionalProperties": false,
"properties": {
"url": {
"description": "蓝湖URL(含tid和pid)",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
},
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"_meta": {
"fastmcp": {
"tags": []
}
}
}
]
}
}