Skip to main content
Glama
NutUI-React MCP Service

NutUI-React MCP Service

by tony2026m

get-component-example

Retrieves external example code for a specified NutUI-React component using src, helping you supply usable code samples for component questions or feature implementation.

Instructions

获取外部示例代码,通过 src,获取 NutUI(NutUI-React) 特定组件的外部示例代码 适用场景:

  1. 用户询问组件特定的外部代码示例时

  2. 用户想要实现某个特定功能时直接告知可使用的代码例子

  3. 生成业务页面前,获取类似可用的外部代码示例

参数说明:src(外部代码示例的 src 属性)

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": {
      "src": "<src>"
    },
    "name": "get-component-example"
  }
}

Input Schema

NameRequiredDescriptionDefault
srcYes外部代码示例的 src 属性

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral load. '获取' implies a side-effect-free read of remote example code, which is the key safety signal, but nothing is said about whether src is a path/URL, what the returned payload looks like (raw code vs. list of examples), or what happens when src does not resolve.

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?

Purpose is front-loaded, followed by a compact numbered scenario list; overall length is proportionate. The trailing parameter line is pure redundancy against a 100%-covered schema and could be dropped.

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?

For a single-parameter tool with no annotations and no output schema, the definition covers the 'what' and 'when' adequately. It falls short on how to source the src argument and on the shape of the returned example code, both of which an agent needs to chain this tool into a workflow.

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

Parameters2/5

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

The parameter note ('参数说明:src(外部代码示例的 src 属性)') is circular and simply restates the schema description verbatim, so it adds no meaning despite nominal 100% coverage. Crucially it never explains where an agent should obtain a valid src value (e.g., from get-component-doc or a listing), which is the actual ambiguity for a caller.

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 (获取) and a specific resource (NutUI/NutUI-React 组件的外部示例代码), scoped by the src attribute. It is clearly distinct from a documentation lookup, but it never explicitly contrasts itself with siblings such as get-component-doc or list-components.

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?

Three concrete invocation scenarios are stated (user asks for a component code example, user wants a runnable sample for a feature, and pre-generation of a business page), which is clear when-to-use guidance. There are no exclusions or explicit 'use X instead' routing, 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.