Skip to main content
Glama
nacos-group

Nacos MCP Server

Official
by nacos-group

get_config_history

Retrieve specific historical configuration change records from Nacos to track modifications, identify issues, and maintain configuration integrity.

Instructions

This interface retrieves a specific historical change record of a configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceIdNoThe namespaceId of configs, default is `public` if missing
groupNameYesThe groupName of config, Required.
dataIdYesThe dataId of config, Required.
nidNothe actual id of config history record, Get from list config history api/tool, `id` field.

Implementation Reference

  • Executes the "get_config_history" tool by instantiating the tool class to get its URL, then calling NacosServer.get() with the tool name, URL, and input arguments to perform the HTTP GET request to Nacos API.
    case nacos_tools.NacosToolNames.GET_CONFIG_HISTORY: url = nacos_tools.NacosGetConfigHistory().url result = nacos.get(name, url, arguments) return [types.TextContent(type="text", text=result)]
  • Defines the tool schema, name, description, input parameters validation (namespaceId optional, groupName/dataId required, nid optional), and the Nacos API endpoint URL "/nacos/v3/admin/cs/history".
    class NacosGetConfigHistory(NacosTool): def __init__(self): super().__init__( name=NacosToolNames.GET_CONFIG_HISTORY, description="This interface retrieves a specific historical change record of a configuration.", inputSchema={ "type": "object", "properties": { "namespaceId": {"type": "string", "description": "The namespaceId of configs, default is `public` if missing"}, "groupName": {"type": "string", "description": "The groupName of config, Required."}, "dataId": {"type": "string", "description": "The dataId of config, Required."}, "nid": {"type": "long", "description": "the actual id of config history record, Get from list config history api/tool, `id` field."}, }, "required": ["groupName", "dataId"], }, url="/nacos/v3/admin/cs/history" )
  • Registers the NacosGetConfigHistory tool instance in the MCP server's list of available tools.
    return [ nacos_tools.NacosListNamespacesTool(), nacos_tools.NacosListServices(), nacos_tools.NacosGetService(), nacos_tools.NacosListInstances(), nacos_tools.NacosListServiceSubscribers(), nacos_tools.NacosListConfigs(), nacos_tools.NacosGetConfig(), nacos_tools.NacosListConfigHistory(), nacos_tools.NacosGetConfigHistory(), nacos_tools.NacosListConfigListeners(), nacos_tools.NacosListListenedConfigs(), ]
  • Helper enum defining the exact string name "get_config_history" for the tool.
    GET_CONFIG_HISTORY = "get_config_history",

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/nacos-group/nacos-mcp-server'

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