Skip to main content
Glama
xinayida
by xinayida

Lanhu MCP Server

A Model Context Protocol (MCP) server for Lanhu (蓝湖) design collaboration platform.

Enable LLMs and AI coding assistants to directly inspect design artboards, extract pixel-perfect CSS properties and layer hierarchies, and download exportable assets—with zero vision token overhead.

English简体中文


💡 Why Lanhu MCP?

When implementing UI designs with AI coding agents (Claude, Cursor, Copilot, Antigravity, etc.), passing screenshots often results in:

  • High token cost for vision models

  • Imprecise positioning, guessed margins, and approximate colors

  • Hallucinated font sizes and line heights

  • Inability to automatically extract and download SVG/image assets

Lanhu MCP Server parses Lanhu's structured design specs directly into typed data trees:

  • Zero Vision Token Overhead: Pure JSON structured data instead of heavy screenshots.

  • 📐 Pixel-Perfect Accuracy: Exact layer bounds (x, y, width, height), colors (HEX/RGBA), typography (fontSize, fontWeight, fontFamily, lineHeight), border radius, fills, borders, and shadows.

  • 🎨 Smart Asset Extraction: Automatically discovers slice assets, provides direct CDN download links, and supports lossless conversion to modern WebP or SVG formats.

  • 🔄 Resilient Authentication: Persistent session management with automated headless token refresh via Playwright.


Related MCP server: lanhu-mcp-server

✨ Key Features

  • Team & Project Exploration: Query teams, workspace design files, and search projects seamlessly.

  • Artboard Inspection: List artboards (screens), preview thumbnails, and search screens by name.

  • Deep Layer Annotations: Recursively retrieve complete layer trees with comprehensive CSS/UI styling attributes.

  • Asset Pipeline: Download SVG vectors and bitmap images directly to your local workspace.

  • Automated Session Keeper: Headless Playwright script keeps your Lanhu session alive in the background without repeated manual logins.


📋 Requirements

  • Python: >= 3.10

  • Package Manager: uv (strongly recommended)

  • MCP Client: Cursor, Claude Desktop, Claude Code, Antigravity, Windsurf, Cline, Codex, VS Code, or any other MCP-compatible tool.


🚀 Quick Start

1. Run with uvx (No installation needed)

You can run lanhu-mcp directly without cloning the repository:

uvx --from git+https://github.com/xinayida/lanhu-mcp.git lanhu-mcp

2. Run from Source

# Clone the repository
git clone https://github.com/xinayida/lanhu-mcp.git
cd lanhu-mcp

# Sync environment and dependencies
uv sync

# Run the server (stdio mode)
uv run lanhu-mcp

🔐 Authentication

Lanhu MCP connects to lanhuapp.com using browser session cookies. It reads from ~/.lanhu/cookie (file permission 0600).

Run the included Playwright automation script:

uv run scripts/refresh_cookie.py
  • If already logged in: Headlessly verifies session, refreshes token, and writes to ~/.lanhu/cookie.

  • If session expired: Automatically opens a Chrome window for a one-time login (SMS code or password). Once authenticated, it saves the session and closes the browser.

Tip for Scheduled Tasks: Run with --headless-only in cron jobs to periodically renew the cookie without popping up windows:

uv run scripts/refresh_cookie.py --headless-only

Method 2: Dynamic Set via Chat Tool

Call the MCP tool directly inside your AI chat:

lanhu_set_cookie(cookie="session=...; user_token=...")

To get your cookie manually:

  1. Open lanhuapp.com in Chrome and open DevTools (F12).

  2. Go to Network tab, click any request to lanhuapp.com.

  3. In Request Headers, copy the full Cookie string containing session and user_token.

Method 3: Environment Variable

Create .env in the project root or pass LANHU_COOKIE:

cp .env.example .env
# Edit .env and set LANHU_COOKIE=session=...; user_token=...

🛠️ MCP Client Configuration

Add lanhu-mcp to your favorite MCP client:

Go to Cursor Settings -> MCP -> Add new MCP Server:

  • Name: lanhu

  • Type: command

  • Command:

    uvx --from git+https://github.com/xinayida/lanhu-mcp.git lanhu-mcp

Or configure via ~/.cursor/mcp.json:

{
  "mcpServers": {
    "lanhu": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/xinayida/lanhu-mcp.git", "lanhu-mcp"]
    }
  }
}

Add to your claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "lanhu": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/xinayida/lanhu-mcp.git", "lanhu-mcp"]
    }
  }
}

Use the Claude Code CLI:

claude mcp add lanhu uvx --from git+https://github.com/xinayida/lanhu-mcp.git lanhu-mcp

Add to your Antigravity configuration or settings.json:

{
  "mcpServers": {
    "lanhu": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/xinayida/lanhu-mcp.git", "lanhu-mcp"]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "lanhu": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/xinayida/lanhu-mcp.git", "lanhu-mcp"]
    }
  }
}

Add to your cline_mcp_settings.json:

{
  "mcpServers": {
    "lanhu": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/xinayida/lanhu-mcp.git", "lanhu-mcp"],
      "disabled": false,
      "autoApprove": []
    }
  }
}

Add using the Codex CLI:

codex mcp add lanhu uvx "--from" "git+https://github.com/xinayida/lanhu-mcp.git" "lanhu-mcp"

Or edit ~/.codex/config.toml:

[mcp_servers.lanhu]
command = "uvx"
args = ["--from", "git+https://github.com/xinayida/lanhu-mcp.git", "lanhu-mcp"]

Add via VS Code MCP extension or settings:

{
  "mcpServers": {
    "lanhu": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/xinayida/lanhu-mcp.git", "lanhu-mcp"]
    }
  }
}

🧰 Available Tools

Tool Name

Description

Key Parameters

lanhu_set_cookie

Update authentication cookie and persist to ~/.lanhu/cookie

cookie: string containing session and user_token

lanhu_get_teams

Retrieve user teams list (also acts as auth health check)

(none)

lanhu_get_projects

Fetch design projects in a specific team

team_id: string

lanhu_search_projects

Search projects in team by keyword

team_id: string, keyword: string

lanhu_get_screens

List all artboards/screens under a project with dimensions & thumbnails

project_id: string, team_id: string

lanhu_search_images

Search artboards by keyword

project_id: string, team_id: string, keyword: string

lanhu_get_annotations

⭐ Core Tool: Retrieve complete layer tree, CSS styles, typography & assets

project_id: string, image_id: string, team_id: string

lanhu_get_assets

Get exportable image/icon assets with download URLs

project_id: string, image_id: string, team_id: string

lanhu_download_asset

Download asset to local disk (supports WebP lossless / SVG / PNG)

asset_id, asset_name, download_url, format, save_dir


🧭 Typical AI Pair-Programming Workflow

When asking your AI agent to implement a UI from Lanhu:

User: "Please implement the checkout screen from our Lanhu project and download necessary icons."

The agent will autonomously execute the following chain:

graph LR
    A[1. lanhu_get_teams] --> B[2. lanhu_get_projects]
    B --> C[3. lanhu_get_screens]
    C --> D[4. lanhu_get_annotations]
    D --> E[5. Generate Code CSS/HTML/React/Flutter]
    D --> F[6. lanhu_download_asset]

Example Tool Invocation

# 1. Fetch team list
teams = lanhu_get_teams()
team_id = teams[0]["id"]

# 2. Get project list
projects = lanhu_get_projects(team_id=team_id)
project_id = projects[0]["id"]

# 3. Get artboards list
screens = lanhu_get_screens(project_id=project_id, team_id=team_id)
image_id = screens[0]["id"]

# 4. Extract full annotations
annotations = lanhu_get_annotations(
    project_id=project_id,
    image_id=image_id,
    team_id=team_id
)

# 5. Download icons/slices
assets = lanhu_get_assets(project_id=project_id, image_id=image_id, team_id=team_id)
lanhu_download_asset(
    asset_id=assets[0]["id"],
    asset_name=assets[0]["name"],
    download_url=assets[0]["download_url"],
    format="webp" # or "svg"
)

📦 Annotation Data Structure

Calling lanhu_get_annotations returns structured JSON:

{
  "id": "651234567890abcdef",
  "name": "Checkout Page",
  "width": 375.0,
  "height": 812.0,
  "thumbnail_url": "https://...",
  "layers": [
    {
      "id": "layer_01",
      "name": "Submit Button",
      "type": "rect",
      "bounds": { "x": 16.0, "y": 740.0, "width": 343.0, "height": 48.0 },
      "border_radius": 8.0,
      "opacity": 1.0,
      "visible": true,
      "fills": [
        { "type": "color", "color": "#0066FF", "opacity": 1.0 }
      ],
      "shadows": [
        { "x": 0.0, "y": 4.0, "blur": 12.0, "spread": 0.0, "color": "#0066FF33" }
      ],
      "children": [
        {
          "id": "layer_02",
          "name": "Button Label",
          "type": "text",
          "text": "Confirm & Pay",
          "bounds": { "x": 140.0, "y": 754.0, "width": 95.0, "height": 20.0 },
          "font": {
            "size": 16.0,
            "weight": "600",
            "family": "PingFang SC",
            "line_height": 20.0,
            "letter_spacing": 0.0,
            "color": "#FFFFFF",
            "text_align": "center"
          }
        }
      ]
    }
  ],
  "assets": [
    {
      "id": "asset_01:svg",
      "name": "icon_cart",
      "format": "svg",
      "download_url": "https://..."
    }
  ]
}

⚙️ Environment Variables

Variable

Default

Description

LANHU_COOKIE

(empty)

Raw cookie string fallback (session=...; user_token=...)

LANHU_DOWNLOAD_DIR

~/Downloads/lanhu_assets

Directory where downloaded assets are stored

LANHU_TIMEOUT

30

API HTTP request timeout in seconds

LANHU_LOG_LEVEL

INFO

Logging level (DEBUG, INFO, WARNING, ERROR)


⚠️ Disclaimer

This project is an independent open-source tool developed for educational, testing, and AI productivity research purposes. It interacts with Lanhu through reverse-engineered web interfaces. Please adhere to Lanhu's Terms of Service when using this tool. The authors are not responsible for any misuse.


📄 License

This project is licensed under the MIT License.

Available Tools

9 tools
lanhu_download_assetA

下载指定的切图/图标到本地文件(位图默认自动转为 WebP 格式),返回保存路径。

需要先调用 lanhu_get_assets 获取资源的 download_url 等信息。

ParametersJSON Schema
NameRequiredDescriptionDefault
formatNo文件格式:webp/svg/png(位图切图默认推荐 webp)webp
asset_idYes资源 ID(从 lanhu_get_assets 获取)
save_dirNo保存目录(可选,默认 ~/Downloads/lanhu_assets)
asset_nameYes资源名称,用作文件名
download_urlYes下载链接(从 lanhu_get_assets 获取)

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description bears the burden of behavioral disclosure. It does so by stating that the tool writes to a local file, converts bitmap assets to WebP by default, returns a saved path, and depends on a prior lanhu_get_assets call. It does not mention overwrite behavior or cookie/authentication requirements, which keeps it short of a 5.

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 definition is two short sentences with no filler: the first packs action, conversion, and return value; the second gives the prerequisite. Both sentences earn their place and the key behavior is front-loaded.

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

Completeness4/5

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

For a simple download tool with no output schema, the description covers the core return value and the mandatory upstream call, and the schema covers parameter semantics. Minor gaps remain around whether the save directory is auto-created and whether authenticated cookies are required, so it is complete but not exhaustive.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter already has semantic documentation; the baseline is 3. The description only reinforces that download_url comes from lanhu_get_assets and restates the WebP default, adding no schema-independent parameter detail such as directory-creation or naming behavior.

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 uses a concrete verb and resource ('download specified cutout/icon to local file') and names the outcome (returns the saved path). It also notes the WebP conversion, making the tool's purpose unmistakable and distinguishing it from sibling listing tools like lanhu_get_assets.

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 explicitly says to call lanhu_get_assets first to obtain download_url and other required asset information, which gives clear invocation sequencing. It does not explicitly state when not to use the tool or name alternative download paths, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lanhu_get_annotationsA

获取单张设计图的完整标注数据(最核心的工具)。

返回内容包含:

  • 所有图层的树形结构(位置、尺寸、颜色、字体、行高、圆角、阴影、边框等)

  • 文本图层的文字内容与字体样式

  • 可下载的切图/图标列表(含 download_url)

  • 画板尺寸与缩略图

ParametersJSON Schema
NameRequiredDescriptionDefault
team_idYes团队 ID
image_idYes设计图 ID(从 lanhu_get_screens 获取)
project_idYes项目 ID

TDQS

A3.5/5.0
Behavior3/5

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

无注解,描述承担全部责任。它列出了返回内容(树形结构、切图列表、画板尺寸等),提供了行为信息,但未明确是否只读、是否需要认证、失败时返回什么、是否有速率限制。'获取'暗示读取操作,但未明确确认。返回内容细节是积极因素,但覆盖面有限。

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

描述使用一个短句和列表高效传递关键信息,避免冗余。返回内容分类清晰,结构良好。未超长,语言精炼。

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

Completeness4/5

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

考虑到工具复杂性(无输出schema),描述详细列出了返回的内容类别,涵盖主要使用所需信息。虽然未提及认证或错误处理,但兄弟工具中有lanhu_set_cookie,且参数描述已提示image_id来源,整体信息足以支持正确调用。欠缺的是使用场景和前提,但描述已相当完整。

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

Parameters3/5

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

输入schema中所有参数都有中文描述,覆盖率达100%,描述未额外解释参数含义,符合基线(schema已承担解释重任)。没有需要补偿的缺口,因此3分合适。

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?

描述明确说明工具用途:获取单张设计图的完整标注数据,并详细列出了返回内容(图层树、文本、切图、画板尺寸),清晰区分于兄弟工具(如获取屏幕列表或资产)。动词'获取'配合'设计图标注数据',资源具体。

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

Usage Guidelines2/5

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

描述声称是'最核心的工具',但未明确指明何时使用它而非兄弟工具,也未提及前置步骤(如先获取团队/项目/屏幕ID)。没有排除用途或替代方案。参数描述中提供了一些来源信息,但描述本身未强化使用场景。

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lanhu_get_assetsB

获取设计图中所有可下载的切图/图标资源列表(含 svg/png 直链)。

ParametersJSON Schema
NameRequiredDescriptionDefault
team_idYes团队 ID
image_idYes设计图 ID
project_idYes项目 ID

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

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

没有提供任何注解,描述承担全部行为披露责任。它说明了返回的是可下载资源列表并包含直链,但对返回的格式、是否涉及认证、是否分页或限流等行为细节未作说明。虽然不矛盾,但信息有限,且没有注解补充,因此只能给予中等分数。

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

描述仅一句话,简洁明了,没有冗余。'所有可下载'和'svg/png 直链'这两个关键信息放在前半部分,符合前置要求。虽然缺少使用指南,但从简洁性角度看,句子组织高效。

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

Completeness3/5

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

工具较为简单,参数均有 schema 描述,且存在输出 schema,因此描述无需解释返回字段。但描述未提供任何使用上下文,如调用时机或与下载工具的关系,使得代理难以判断何时使用。整体而言,描述刚好覆盖核心功能,但缺少重要的使用指引,因此给出中等分数。

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

Parameters3/5

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

输入 schema 对所有三个必填参数提供了中文描述(团队 ID、设计图 ID、项目 ID),覆盖率 100%。描述文本未增加任何额外参数含义,因此依据标准,当 schema 已充分覆盖时,基础分为 3 是合适的。

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

描述明确说明工具的功能是获取设计图中所有可下载的切图/图标资源列表,并指出包含 svg/png 直链。动词'获取'和资源'资源列表'清晰,与兄弟工具中的下载工具(lanhu_download_asset)形成区分,但没有直接说明区别,因此未达到满分。

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

Usage Guidelines2/5

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

描述没有提供任何使用指南,比如何时使用此工具而非下载工具、是否需要先设置 cookie 或获得授权等。没有提及前置条件或替代方案,代理只能凭名称和描述猜测。

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lanhu_get_projectsB

获取团队下的设计项目列表。

ParametersJSON Schema
NameRequiredDescriptionDefault
team_idYes团队 ID(从 lanhu_get_teams 获取)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It only states the action (get a list) without disclosing any behavioral traits such as pagination, ordering, or potential empty results. It does not go beyond the basic action, leaving the agent uninformed about call behavior.

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 a single, concise sentence that immediately conveys the purpose and scope. There is no wasted verbiage, and the essential dependency hint is embedded efficiently.

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

Completeness3/5

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

Given the tool is simple (one parameter, has output schema), the description is minimally sufficient. However, it omits mention of potential pagination, result limits, or error cases, and the dependency on a prior call is only hinted at in the schema, not in the main description. This leaves minor gaps for an agent to infer.

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

Parameters3/5

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

Schema description coverage is 100% and the schema already explains team_id with the same '从 lanhu_get_teams 获取' note. The description adds no additional meaning beyond what the schema provides, so it meets the baseline for a well-covered parameter but does not exceed it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb '获取' (get) and the resource '设计项目列表' (design project list) scoped to a team. It distinguishes from lanhu_get_teams (which returns teams) but does not explicitly contrast with lanhu_search_projects, so it meets the clarity bar without full sibling differentiation.

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

Usage Guidelines3/5

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

The description provides a prerequisite hint by stating '从 lanhu_get_teams 获取' (obtained from lanhu_get_teams) for the team_id parameter, implying a dependency on that sibling tool. However, it does not offer explicit when-to-use versus lanhu_search_projects or any exclusions, leaving usage context partially implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lanhu_get_screensA

获取指定项目下的所有设计图(画板)列表,返回缩略图与尺寸信息。

ParametersJSON Schema
NameRequiredDescriptionDefault
team_idYes团队 ID
project_idYes项目 ID(从 lanhu_get_projects 获取)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the tool returns thumbnails and size information, which indicates a read operation. However, it does not explicitly state that it is read-only, any authentication requirements, pagination behavior, or error conditions. As a simple get-list operation, the basic transparency is adequate but not rich.

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?

A single, front-loaded sentence that states the action, scope, and return value without any filler. Every word earns its place.

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

Completeness4/5

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

For a simple list operation with two documented parameters and an output schema, the description is nearly complete. It states what is returned, and the schema covers parameter origins. Minor omissions like pagination or result limits are not critical for this low-complexity tool.

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

Parameters3/5

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

Schema description coverage is 100%, with both parameters documented. The description itself adds no additional parameter details beyond what the schema provides, so baseline 3 is appropriate.

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 the verb '获取' (get) the list of all design images/artboards under a specified project, and specifies the returned data (thumbnail and size). It distinguishes itself from sibling tools by focusing on screens/artboards, not teams, projects, annotations, or assets.

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

Usage Guidelines3/5

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

There is no explicit guidance on when to use this tool versus alternatives, nor exclusions. The schema hints that project_id comes from lanhu_get_projects, implying a prerequisite flow, but the description itself does not mention this. Usage is therefore only implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lanhu_get_teamsA

获取当前登录用户所在的团队列表。也可用于验证认证是否有效。

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden. It mentions a secondary behavior (auth validation), which hints at failure on invalid authentication. However, it does not specify prerequisites (e.g., setting a cookie via a sibling tool) or the exact behavior when authentication fails, and it does not explicitly state read-only semantics.

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 two short sentences that front-load the primary purpose and append a useful secondary use. Every word earns its place, with no redundancy or filler.

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

Completeness4/5

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

For a parameterless getter, the description covers the core function and an extra use case. An output schema is present, so return values need not be described. The only minor gap is not stating that authentication must be configured first, but the auth-validation hint partially addresses this.

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?

The tool has zero parameters, so the description has nothing to explain about parameter meaning. The baseline for 0-parameter tools is 4, and the description adds no unnecessary parameter information.

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 states a specific verb ('获取' / get) and resource ('团队列表' / team list) for the current logged-in user, and adds a secondary purpose (verifying authentication validity). This clearly distinguishes it from sibling tools that operate on projects, screens, or assets.

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?

It explicitly indicates when to use it (list teams and check auth validity), which is clear context. It does not explicitly name alternatives, but sibling tools target different resources, so the usage scenario is unambiguous without exclusion statements.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lanhu_search_imagesC

在指定项目中按名称关键词搜索设计图。

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordYes搜索关键词
team_idYes团队 ID
project_idYes项目 ID

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral characteristics. However, it only states the search intent and gives no indication of whether the operation is read-only, whether it requires prior cookie setup (e.g., lanhu_set_cookie), or any limits such as pagination or response size. The existing output schema is present but not referenced, so the description carries an insufficient burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that conveys the core purpose without redundancy. It is front-loaded with the action and resource. While it is minimal, it is appropriately concise for a straightforward search operation, though it could have been slightly more informative without losing conciseness.

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

Completeness3/5

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

The tool is simple with three required parameters and a known output schema, so the description does not need to detail return values. However, because there are no annotations and no usage guidance, the description lacks the context an agent needs to decide when to invoke it and what to expect in terms of behavior (e.g., read-only nature, prior authentication via lanhu_set_cookie). The existing schema covers parameter definitions but not operational context.

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

Parameters3/5

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

The schema provides descriptions for all three parameters (keyword, team_id, project_id) at 100% coverage, so the baseline is 3. The description does not add any specific semantic detail beyond what the schema already provides, but that is acceptable given the coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (search) and the resource (design images) with a scoping condition ('in the specified project') and the search criterion (by name keyword). It is specific enough to distinguish from sibling tools like lanhu_search_projects, though it does not explicitly name alternatives.

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

Usage Guidelines2/5

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

No guidance is given for when to use this tool versus alternatives. The description does not state conditions, prerequisites, or mention other search tools like lanhu_search_projects. The agent is left to infer context from the sibling list, which is not dependable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

lanhu_search_projectsB

在团队下按名称关键词搜索项目。

ParametersJSON Schema
NameRequiredDescriptionDefault
keywordYes搜索关键词
team_idYes团队 ID(从 lanhu_get_teams 获取)

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior1/5

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

没有提供注释,因此描述承担全部行为披露责任。描述仅说‘按名称关键词搜索’,但未透露搜索是否匹配子串、是否分页、返回数量限制、是否可能无结果或失败模式等。对于一个搜索工具,缺少这些行为细节可能让代理产生错误预期。

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?

一行简洁的描述,直接陈述核心功能,无冗余信息。信息前置且易于理解。

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

Completeness3/5

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

工具简单且有输出模式,但缺少关于搜索行为(如大小写、模糊性、结果排序)的说明。对于基本使用可能足够,但未覆盖所有代理可能需要的执行细节,尤其没有注释的情况下。

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

Parameters3/5

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

输入模式覆盖率为100%,两个参数均有说明。描述中‘按名称关键词’重复了 keyword 参数的含义,但未增添新语义。由于模式已完整,基线为3,描述未提供额外价值。

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?

描述明确说明了工具的作用:在团队下(team_id)按名称关键词(keyword)搜索项目。动词具体(搜索),对象清楚(项目),且与兄弟工具(如 lanhu_get_projects)区分明确。

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

Usage Guidelines2/5

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

描述未提供任何使用场景或与其他工具的对比。未说明何时用搜索而非获取项目列表,也未提及排除条件或前置要求。虽然参数架构中提及 team_id 来自 lanhu_get_teams,但这不算是使用指南,仅是参数说明。

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 9 tool updatesv0.1.0
    • First observedlanhu_download_asset
    • First observedlanhu_get_annotations
    • First observedlanhu_get_assets
    • First observedlanhu_get_projects
    • First observedlanhu_get_screens
    • First observedlanhu_get_teams
    • First observedlanhu_search_images
    • First observedlanhu_search_projects
    • First observedlanhu_set_cookie

TDQS

A3.6/5.0

Scored across 9 tools

Disambiguation3/5

Several tools have overlapping retrieval surfaces: get_projects vs search_projects and get_screens vs search_images are list-vs-search pairs, and get_annotations already includes downloadable assets that get_assets re-exposes. Descriptions clarify the intended use, but an agent could still select a broader tool when a narrower one is needed.

Naming Consistency5/5

All tools share the lanhu_ prefix and follow a consistent verb_noun snake_case pattern (set_, get_, search_, download_), with no mixed conventions or vague generic names.

Tool Count5/5

9 tools is well-scoped for a design-handoff/annotation server: auth, team/project navigation, screen listing, annotation retrieval, and asset download each have a focused tool.

Completeness4/5

The read-only workflow is well covered: authenticate, navigate teams/projects/screens, fetch annotations, and download assets. Minor gaps such as no direct get-by-id for a single project/screen (relying on list/search) and the redundant asset list inside get_annotations keep it from a perfect score.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enables AI to directly read and analyze Lanhu design drafts and requirement documents to generate HTML, CSS, and structural analyses. It allows users to extract design slices and process prototype pages directly within AI clients.
    3
    300 npm
    127
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI coding tools to read Lanhu design data and automate Design to Code, including project browsing, layer tree extraction, DDS semantic components, and code generation.
    14
    68 npm
    2
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    Fetches Lanhu UI design specs and assets with minimal tokens, enabling coding agents to implement high-fidelity UI by providing precise coordinates, styles, and downloaded resources.
    2
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to connect to the Lanhu design collaboration platform, allowing them to analyze requirement documents, inspect UI designs with detailed parameters, download design slices, and share team knowledge through a collaborative message board.
    MIT