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",
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it 'retrieves' (read operation) but doesn't disclose behavioral aspects like authentication requirements, rate limits, error conditions, or what format the historical record returns. For a tool with no annotation coverage, this leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded with the core action.

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 no annotations, no output schema, and 4 parameters (2 required), the description is incomplete. It doesn't explain what the historical record contains, how to obtain the 'nid' parameter (only hinted in schema), or any behavioral constraints. For a retrieval tool with specific identifiers, more context is needed.

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 description coverage is 100%, so the schema fully documents all 4 parameters. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain relationships between parameters like how 'nid' relates to 'list_config_history'). Baseline 3 is appropriate when schema does the heavy lifting.

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 action ('retrieves') and resource ('specific historical change record of a configuration'), distinguishing it from siblings like 'get_config' (current config) and 'list_config_history' (multiple records). However, it doesn't explicitly contrast with these siblings in the description text itself.

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

Usage Guidelines3/5

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

The description implies usage for retrieving a specific historical record, but doesn't explicitly state when to use this versus alternatives like 'list_config_history' (for multiple records) or 'get_config' (for current config). No guidance on prerequisites or exclusions is provided.

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

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