list_listened_configs
Retrieve configurations subscribed to by a specific client IP address in Nacos MCP Server. Specify namespace and aggregation settings to filter results.
Instructions
This interface lists the configurations subscribed to by a specific client IP address.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aggregation | No | Whether aggregation from whole cluster, if `false`, only get listeners from requested node, default `true` if missing | |
| ip | Yes | The client ip of config listeners, Required. | |
| namespaceId | No | The namespaceId of configs, default is `public` if missing |
Implementation Reference
- The NacosListListenedConfigs class defines the core implementation of the 'list_listened_configs' tool, including its name, description, input schema, and the target Nacos API URL. It inherits from NacosTool which handles the generic execution logic.class NacosListListenedConfigs(NacosTool): def __init__(self): super().__init__( name=NacosToolNames.LIST_LISTENED_CONFIGS, description="This interface lists the configurations subscribed to by a specific client IP address.", inputSchema={ "type": "object", "properties": { "namespaceId": {"type": "string", "description": "The namespaceId of configs, default is `public` if missing"}, "ip": {"type": "string", "description": "The client ip of config listeners, Required."}, "aggregation": {"type": "bool", "description": "Whether aggregation from whole cluster, if `false`, only get listeners from requested node, default `true` if missing"} }, "required": ["ip"], }, url="/nacos/v3/admin/cs/listener" )
- Input schema for the tool, defining parameters: namespaceId (optional string), ip (required string), aggregation (optional bool).inputSchema={ "type": "object", "properties": { "namespaceId": {"type": "string", "description": "The namespaceId of configs, default is `public` if missing"}, "ip": {"type": "string", "description": "The client ip of config listeners, Required."}, "aggregation": {"type": "bool", "description": "Whether aggregation from whole cluster, if `false`, only get listeners from requested node, default `true` if missing"} }, "required": ["ip"], },
- src/mcp_server_nacos/server.py:74-86 (registration)Registration of all tools including 'list_listened_configs' (line 85) in the MCP server's list_tools() method.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(), ]
- src/mcp_server_nacos/server.py:132-135 (handler)Execution handler in call_tool(): matches the tool name, retrieves the URL, performs the HTTP GET request to Nacos, and returns the result as text.case nacos_tools.NacosToolNames.LIST_LISTENED_CONFIGS: url = nacos_tools.NacosListListenedConfigs().url result = nacos.get(name, url, arguments) return [types.TextContent(type="text", text=result)]
- Enum value defining the exact string name 'list_listened_configs' used for tool identification.LIST_LISTENED_CONFIGS = "list_listened_configs",