Skip to main content
Glama
nacos-group

Nacos MCP Server

Official
by nacos-group

get_config

Retrieve configuration details from Nacos by specifying group name and data ID to access application settings and parameters.

Instructions

This interface retrieves the details of the specified 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.

Implementation Reference

  • Handler case in call_tool function that executes the get_config tool by fetching the API URL and making an HTTP GET request to Nacos with the input arguments.
    case nacos_tools.NacosToolNames.GET_CONFIG:
        url = nacos_tools.NacosGetConfig().url
        result = nacos.get(name, url, arguments)
        return [types.TextContent(type="text", text=result)]
  • NacosGetConfig class defining the tool schema, input parameters (namespaceId, groupName, dataId), description, and the Nacos API endpoint URL.
    class NacosGetConfig(NacosTool):
        def __init__(self):
            super().__init__(
                name=NacosToolNames.GET_CONFIG,
                description="This interface retrieves the details of the specified 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."}
                    },
                    "required": ["groupName", "dataId"],
                },
                url="/nacos/v3/admin/cs/config"
            )
  • Registration of the get_config tool (NacosGetConfig) in the list_tools handler, returned as part of the available tools list.
    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(),
    ]
  • Enum definition mapping NacosToolNames.GET_CONFIG to the string 'get_config' used for tool identification.
    GET_CONFIG = "get_config",
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'retrieves' implies a read-only operation, it doesn't specify permissions required, rate limits, error conditions, or what format the configuration details are returned in. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 states the core purpose without any wasted words. It's appropriately sized for a simple retrieval tool and front-loaded with the essential information.

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 the complexity of configuration management (implied by multiple sibling tools), no annotations, and no output schema, the description is incomplete. It doesn't explain what 'configuration details' include, how they're structured, or provide context about the configuration system, making it inadequate for an agent to fully understand the tool's role and output.

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 input schema already documents all three parameters thoroughly. The description adds no additional meaning about the parameters beyond what's in the schema, such as explaining the relationship between namespaceId, groupName, and dataId. Baseline 3 is appropriate when the 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 verb ('retrieves') and resource ('details of the specified configuration'), making the purpose understandable. However, it doesn't differentiate this tool from its siblings like 'get_config_history' or 'list_configs', which likely retrieve related but different configuration data.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools like 'get_config_history' and 'list_configs' available, there's no indication of what distinguishes this retrieval operation from those, leaving the agent to guess based on tool names alone.

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