Skip to main content
Glama

nacos_get_config_previous

Read-onlyIdempotent

Retrieve the previous version of a Nacos configuration by its storage ID, enabling comparison and rollback to earlier states.

Instructions

查询配置最新状态的前一次变更历史。

对应 Nacos OpenAPI:

  • v1:GET /nacos/v1/cs/history/previous

  • v2:GET /nacos/v2/cs/history/previous

  • v3:GET /v3/console/cs/history/previous(Console API)

按配置存储 ID(id)返回上一版本的完整配置内容。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_idYes配置 ID
config_idYes配置存储 ID(对应历史接口中的 id 字段),必填
group_nameNo配置分组,默认 DEFAULT_GROUPDEFAULT_GROUP
namespace_idNo命名空间 ID,可选

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
contentNo
data_idNo
op_typeNo
operatorNo
group_nameNo
namespace_idNo
publish_timeNo
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds value by clarifying that it returns the complete config content of the previous version and that config_id corresponds to the id field in the history API. It also lists the three API endpoint variants, which is extra context beyond the annotations. No contradiction exists.

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 short and front-loaded with the purpose, followed by a compact endpoint list and a behavior statement. The endpoint list might be slightly over-detailed for invocation, but it is not wasteful. Overall, it is concise and well-structured.

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

Completeness4/5

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

The description covers the main purpose, output behavior, and parameter semantics, and an output schema exists for return values. It does not explicitly contrast with sibling history/lookup tools, but for a read-only query with strong annotations and schema coverage, it is sufficiently complete.

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

Parameters4/5

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

Schema description coverage is 100%, so baseline is 3. The description adds crucial clarification that config_id is '配置存储 ID(对应历史接口中的 id 字段)' and is required, reinforcing its role beyond the generic schema description. This extra semantic context justifies a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/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: '查询配置最新状态的前一次变更历史' (query the previous change history of the latest config state) and specifies that it returns the complete content of the previous version. This is specific and distinguishes it from siblings like nacos_get_config (current config) and nacos_get_config_history (specific history version).

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 by describing what the tool does (retrieve last previous version), but it does not explicitly state when to use this over alternatives such as nacos_get_config_history or nacos_list_config_history. No when-not guidance or alternative tool references are 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/zhouweico/mcp-nacos'

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