Skip to main content
Glama

nacos_get_config

Read-onlyIdempotent

Retrieve Nacos configuration content by data ID, group, and namespace, supporting v1/v2/v3 OpenAPI.

Instructions

获取 Nacos 配置内容。

对应 Nacos OpenAPI:

  • v1:GET /nacos/v1/cs/configs(参数 tenant)

  • v2:GET /nacos/v2/cs/config(参数 namespaceId)

  • v3:GET /v3/console/cs/config(Console API,端口 8080)

按 dataId + group + namespace 唯一定位配置,返回配置内容。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
data_idYes配置 ID,如 'application.yaml'、'user-service.yml'
group_nameNo配置分组,默认 DEFAULT_GROUPDEFAULT_GROUP
namespace_idNo命名空间 ID(如 dev/prod);优先级:工具参数 > NACOS_NAMESPACE 环境变量 > 默认 public
response_formatNo输出格式:markdown 或 jsonmarkdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
md5No
typeNo
contentNo
data_idNo
group_nameNo
namespace_idNo
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so safety is covered. The description adds value by mapping to Nacos OpenAPI v1/v2/v3 endpoints with different params, indicating the tool's internal implementation and that it returns config content. No contradictions exist.

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 concise, front-loaded with the primary purpose, and uses each line effectively. It lists API versions and parameters without redundancy, earning every sentence's place.

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

Completeness5/5

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

The tool is a simple retrieval operation with 4 parameters and an output schema (per signal), so the description need not detail return values. It covers the key uniqueness, API version mapping, and parameter precedence, making it complete for an agent to select and invoke correctly.

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%, providing a baseline of 3. The description enriches parameter understanding by explaining the unique key combination and mapping v1 'tenant' to v2 'namespaceId', adding contextual meaning beyond the schema's labels and defaults.

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 retrieves Nacos configuration content, with a specific verb '获取' and resource '配置内容'. It uniquely identifies a config by dataId, group, and namespace, which distinguishes it from sibling tools that list configs or retrieve history.

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 when you want a specific config and know its dataId/group/namespace, but it does not explicitly mention alternatives or exclusions. No guidance is given on when to use this tool over sibling tools like nacos_list_configs or history tools.

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