Skip to main content
Glama
nacos-group

Nacos MCP Server

Official
by nacos-group

list_config_listeners

Retrieve the list of listeners subscribed to a specific configuration in Nacos MCP Server. Specify namespaceId, groupName, dataId, and aggregation to filter results.

Instructions

This interface retrieves the list of listeners subscribed to a specific configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
aggregationNoWhether aggregation from whole cluster, if `false`, only get listeners from requested node, default `true` if missing
dataIdYesThe dataId of config, Required.
groupNameYesThe groupName of config, Required.
namespaceIdNoThe namespaceId of configs, default is `public` if missing

Implementation Reference

  • Handler logic for the 'list_config_listeners' tool within the call_tool function. It retrieves the tool's URL and executes a GET request to the Nacos API via nacos.get, returning the result as text content.
    case nacos_tools.NacosToolNames.LIST_CONFIG_LISTENERS: url = nacos_tools.NacosListConfigListeners().url result = nacos.get(name, url, arguments) return [types.TextContent(type="text", text=result)]
  • Tool definition class NacosListConfigListeners providing the name, description, input schema (parameters: namespaceId, groupName (required), dataId (required), aggregation), and the Nacos API endpoint URL.
    class NacosListConfigListeners(NacosTool): def __init__(self): super().__init__( name=NacosToolNames.LIST_CONFIG_LISTENERS, description="This interface retrieves the list of listeners subscribed to a specific 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."}, "aggregation": {"type": "bool", "description": "Whether aggregation from whole cluster, if `false`, only get listeners from requested node, default `true` if missing"} }, "required": ["groupName", "dataId"], }, url="/nacos/v3/admin/cs/config/listener" )
  • Registration of the tool via server.list_tools() decorator. The function returns a list of all tool instances, including NacosListConfigListeners at line 84.
    @server.list_tools() async def handle_list_tools() -> list[types.Tool]: """List available tools""" 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 in NacosToolNames for the tool name 'list_config_listeners', used in tool definition and handler matching.
    LIST_CONFIG_LISTENERS = "list_config_listeners",

Other Tools

Related 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