Skip to main content
Glama
Nacos MCP Server

Nacos MCP Server

by litianfu1997

nacos_publish_config

Publishes configuration content to Nacos while preserving original formatting; fetch the current config first, modify it, then publish the updated dataId, group, and content.

Instructions

发布配置到 Nacos。原样保存配置内容,不修改任何格式(缩进、注释、空行等)。使用前必须先通过 nacos_get_config 获取当前内容,在原始内容基础上修改后再发布。

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dataId": "<dataId>",
      "content": "<content>"
    },
    "name": "nacos_publish_config"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNo配置分组,默认使用环境变量 NACOS_GROUP
dataIdYes配置的 dataId,如 re-gateway.yaml
contentYes完整的配置内容,必须保持原始格式(YAML/properties 原样保存)
namespaceNo命名空间 ID,默认使用环境变量 NACOS_NAMESPACE

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry behavioral disclosure and it does add real value: content is stored byte-for-byte with indentation, comments and blank lines preserved. However it never states that publishing overwrites/replaces an existing config, nor what happens on failure or what permissions are needed — key traits for a mutation tool.

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?

Three short sentences, each carrying distinct information: what it does, its verbatim-preservation trait, and the required read-before-write procedure. No filler and the core action is front-loaded.

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

Completeness3/5

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

Covers the essential risk for this tool — accidental reformatting of YAML/properties — and the prerequisite read step. But for a mutating call with no annotations and no output schema, it omits overwrite semantics, return behavior, and failure modes, leaving gaps an agent would want closed.

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 group, dataId, content and namespace are already documented, including defaults from environment variables. The description reinforces the formatting constraint on content but adds no semantics beyond the schema, which is the expected baseline.

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?

States a specific verb+resource combination ('发布配置到 Nacos' / publish a config to Nacos) with no ambiguity. It also implicitly separates itself from the read-side sibling nacos_get_config, which it names as a prerequisite. It does not distinguish from other siblings like nacos_list_configs, but the write-vs-read split is clear.

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

Usage Guidelines4/5

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

Gives an explicit mandatory workflow: call nacos_get_config first, modify the original content, then publish. That is actionable context most definitions lack. It stops short of stating exclusions (e.g., when to use a different publish variant or when not to publish at all), so it is not a full 5.

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