Skip to main content
Glama

get-component-changelog

Retrieve changelogs for Ant Design components to check version compatibility and track feature updates.

Instructions

列出 Ant Design 特定组件的更新日志 适用场景:

  1. 用户询问特定组件的更新日志

  2. 在知道用户 antd 版本的情况下,当用户需要实现相关组件功能时判断是否在后续版本中才实现,来决定是否需要升级依赖

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentNameYes

Implementation Reference

  • The core handler function for the 'get-component-changelog' tool. It fetches the changelog data using the helper, handles both error string and object responses, normalizes component name casing, reduces changelog items into a formatted string, and returns MCP-formatted text content.
        async ({ componentName }) => {
          const componentsChangelog = await getComponentsChangelog(componentName);
          if (typeof componentsChangelog === 'string') return {
            content: [
              {
                type: "text",
                text: componentsChangelog,
              },
            ],
          }
    
          const currentComponentChangelog = componentsChangelog[componentName] || componentsChangelog[componentName.charAt(0).toUpperCase() + componentName.slice(1)]
          
          const reduceChangelogContent = currentComponentChangelog?.reduce((acc, item) => {
            return `${acc}${item.version}:${item.releaseDate}:${item.changelog}\n`
          }, '')
    
          return {
            content: [
              {
                type: "text",
                text: currentComponentChangelog ? `以下是 ${ componentName } 组件的更新日志:
    ${reduceChangelogContent}` : '当前组件没有找到更新日志',
              },
            ],
          };
  • Registers the 'get-component-changelog' tool on the MCP server, including the tool name, description, input schema (componentName: string), and references the handler function.
    const registryTool = (server: McpServer) => {
      server.tool(
        "get-component-changelog",
        `列出 Ant Design 特定组件的更新日志
    适用场景:
    1. 用户询问特定组件的更新日志
    2. 在知道用户 antd 版本的情况下,当用户需要实现相关组件功能时判断是否在后续版本中才实现,来决定是否需要升级依赖`,
        { componentName: z.string() },
        async ({ componentName }) => {
          const componentsChangelog = await getComponentsChangelog(componentName);
          if (typeof componentsChangelog === 'string') return {
            content: [
              {
                type: "text",
                text: componentsChangelog,
              },
            ],
          }
    
          const currentComponentChangelog = componentsChangelog[componentName] || componentsChangelog[componentName.charAt(0).toUpperCase() + componentName.slice(1)]
          
          const reduceChangelogContent = currentComponentChangelog?.reduce((acc, item) => {
            return `${acc}${item.version}:${item.releaseDate}:${item.changelog}\n`
          }, '')
    
          return {
            content: [
              {
                type: "text",
                text: currentComponentChangelog ? `以下是 ${ componentName } 组件的更新日志:
    ${reduceChangelogContent}` : '当前组件没有找到更新日志',
              },
            ],
          };
        },
      );
    }
  • Helper utility that loads, parses, and caches the changelog data for all components from a JSON file. Returns the full changelog record or an error message if the component is not found or file issues occur.
    export const getComponentsChangelog = async (componentName: string): Promise<Record<string, ComponentChangelogItem[]> | string> => {
      const component = await findComponentByName(componentName);
    
      if (!component) {
        return `${component} 组件不存在`;
      }
    
      try {
        const cacheComponentChangelog = componentCache.get('componentsChangelog')
        if (cacheComponentChangelog) {
          return cacheComponentChangelog
        }
        const componentChangelog = await readFile(EXTRACTED_COMPONENTS_DATA_CHANGELOG_PATH, "utf-8");
        const componentChangelogJson = JSON.parse(componentChangelog)
        
        componentCache.set('componentsChangelog', componentChangelogJson)
        return componentChangelogJson
    
      } catch (error) {
        console.error(`获取组件更新记录错误 ${component.name}: ${(error as Error).message}`);
        return `未找到 ${component.name} 更新日志`;
      }
    };
  • Aggregator that imports the registryTool for get-component-changelog and invokes it along with other tools during server setup.
    import getComponentChangelog from "./get-component-changelog";
    import listComponents from "./list-components";
    
    export default function registryTools(server: McpServer) {
      [getComponentDocs, listComponentExamples, getComponentChangelog, listComponents].forEach((registryFn) => {
        registryFn(server)
      })
    }
  • Zod schema for tool input: requires a 'componentName' string.
    { componentName: z.string() },
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. While it mentions the tool lists changelogs, it doesn't disclose behavioral traits like whether it returns full or partial changelogs, how it handles invalid component names, if there are rate limits, or what format the output takes. For a tool with zero annotation coverage, this leaves significant gaps in understanding its 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?

The description is appropriately sized with two clear usage scenarios. It's front-loaded with the core purpose, followed by specific contexts. While efficient, the second scenario sentence is somewhat lengthy but still earns its place by providing valuable context.

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

Completeness2/5

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

Given the tool has no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It covers purpose and usage well but lacks critical information about parameters, return values, and behavioral constraints. For a tool with this complexity level, more comprehensive documentation is needed.

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 schema has 1 parameter with 0% description coverage, and the description doesn't mention the 'componentName' parameter at all. While it implies a component is needed ('特定组件'), it provides no guidance on parameter format, valid values, or semantics. With low schema coverage, the description fails to compensate for the documentation gap.

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 tool's purpose as '列出 Ant Design 特定组件的更新日志' (list changelog for specific Ant Design components), which is a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'get-component-docs' or 'list-components', which might also provide component-related information but for different purposes.

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

Usage Guidelines5/5

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

The description provides explicit usage scenarios: '用户询问特定组件的更新日志' (when users ask about specific component changelogs) and '在知道用户 antd 版本的情况下...来决定是否需要升级依赖' (when knowing the user's antd version to decide if dependency upgrade is needed for functionality). This clearly indicates when to use this tool versus alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zhixiaoqiang/antd-components-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server