Skip to main content
Glama
nacos-group

Nacos MCP Server

Official
by nacos-group

get_config_history

Retrieve historical change records for specific configurations in Nacos MCP Server by providing namespace, group, and data ID. Essential for tracking and auditing configuration updates.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataIdYesThe dataId of config, Required.
groupNameYesThe groupName of config, Required.
namespaceIdNoThe namespaceId of configs, default is `public` if missing
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 retrieving the tool's URL and making an HTTP GET request to the Nacos server with the provided arguments.
    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 input schema for the get_config_history tool, specifying parameters like namespaceId, groupName, dataId, and nid.
    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"
  • Tool class implementation defining the get_config_history tool's name, description, input schema, and the specific Nacos API URL to call.
    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 (get_config_history) in the server's list_tools() function.
    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(), ]
  • Defines the string name for the GET_CONFIG_HISTORY tool enum.
    GET_CONFIG_HISTORY = "get_config_history",

Other Tools

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

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