Skip to main content
Glama
NutUI-React MCP Service

NutUI-React MCP Service

by tony2026m

list-components

Retrieve available NutUI-React components for mobile H5 or mini-program pages, so AI assistants can choose suitable components and generate accurate page code.

Instructions

当用户请求做成一个新的移动端页面(UI),或实现新的移动端业务页面时,使用 NutUI(NutUI-React) 组件时使用此工具。 此工具仅返回可用的组件列表。 调用此工具后,你必须根据你的业务需求、来选择符合你业务需求的组件,编辑或添加前端页面代码实现 组件列表元素数据结构: `ts export interface ComponentData { // 组件名称 name: string; // 组件文档所在文件夹名称 dirName: string; // 组件描述 description: string; // 何时使用组件 whenToUse: string; }

参数说明:isH5(是否H5页面,true:H5页面,false:非H5页面(小程序等)) `

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "isH5": "<isH5>"
    },
    "name": "list-components"
  }
}

Input Schema

NameRequiredDescriptionDefault
isH5Yes是否H5页面(true:H5页面,false:非H5页面(小程序等))

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden; it discloses that the call is purely informational ('此工具仅返回可用的组件列表') and describes the returned element structure field by field. It does not state error/empty behavior or whether the catalog is static, 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.

Conciseness4/5

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

Front-loads the trigger condition, then the return constraint, then the expected follow-up action, and ends with the payload interface. The embedded TypeScript interface earns its place by documenting the return shape, though the parameter note duplicates the schema text.

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?

With no output schema, the description usefully documents the returned ComponentData fields and what the agent must do after calling. For a single-parameter read tool this is nearly complete; only the lack of sibling routing and any note on result size/scope is missing.

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 coverage is 100% and the description's parameter note ('isH5: 是否H5页面, true:H5页面, false:非H5页面(小程序等)') essentially restates the schema description verbatim. It confirms the branch meaning but adds no new semantics beyond the schema, so the baseline 3 applies.

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 names a specific verb+resource (returns the list of available NutUI/NutUI-React components) and scopes it to mobile page work. It clarifies that only the component list is returned, implicitly separating it from doc/example siblings, but never names those siblings to make the distinction explicit.

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 states a clear trigger condition: when the user asks to build a new mobile page/UI or implement a new mobile business page with NutUI. It also gives a follow-up obligation (choose components per business need, then edit/add page code), but gives no explicit when-not-to-use or named alternative such as get-component-doc.

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