list_configs
Retrieve and filter configuration lists from a Nacos namespace using pagination, search patterns, and criteria like group, data ID, type, tags, or application name.
Instructions
This interface retrieves the list of configurations under a specified namespace.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageNo | Yes | The current page number, default is 1. | |
| pageSize | Yes | The size of configs in each page, default is 100 | |
| namespaceId | No | The namespaceId of configs, default is `public` if missing | |
| groupName | No | The groupName pattern of configs, default null means all group. if not null, server will search all config match groupName. If `search=blur`, this parameter allow use `*` to do blur search, such as `*test` to do prefix and `test*` to do suffix | |
| dataId | No | The dataId pattern of configs, default null means all dataId. if not null, server will search all config match dataId. If `search=blur`, this parameter allow use `*` to do blur search, such as `*test` to do prefix and `test*` to do suffix | |
| type | No | The type of configs, default null means all type, if not null, server will search all config match type. Multiple type using `,` to split, such as `text,json` | |
| configTags | No | The tags of configs, default null means all tags, if not null, server will search all config match tags. Multiple tags using `,` to split, such as `tag1,tag2` | |
| appName | No | The appName of configs, default null means all appName, if not null, server will search all config match appName. | |
| search | No | The search way of list configs, default is `blur` means blur search groupName and dataId. Or using `accurate` means accurate match with groupName and dataId. |
Implementation Reference
- src/mcp_server_nacos/server.py:112-115 (handler)Executes the 'list_configs' tool by fetching the Nacos API URL from the tool class and calling the generic NacosServer.get method with the input arguments.case nacos_tools.NacosToolNames.LIST_CONFIGS: url = nacos_tools.NacosListConfigs().url result = nacos.get(name, url, arguments) return [types.TextContent(type="text", text=result)]
- Defines the input schema, description, name, and Nacos API URL for the 'list_configs' tool in the NacosListConfigs class.def __init__(self): super().__init__( name=NacosToolNames.LIST_CONFIGS, description="This interface retrieves the list of configurations under a specified namespace.", inputSchema={ "type": "object", "properties": { "pageNo": {"type": "int", "description": "The current page number, default is 1."}, "pageSize": {"type": "int", "description": "The size of configs in each page, default is 100"}, "namespaceId": {"type": "string", "description": "The namespaceId of configs, default is `public` if missing"}, "groupName": {"type": "string", "description": "The groupName pattern of configs, default null means all group. if not null, server will search all config match groupName. If `search=blur`, this parameter allow use `*` to do blur search, such as `*test` to do prefix and `test*` to do suffix"}, "dataId": {"type": "string", "description": "The dataId pattern of configs, default null means all dataId. if not null, server will search all config match dataId. If `search=blur`, this parameter allow use `*` to do blur search, such as `*test` to do prefix and `test*` to do suffix"}, "type": {"type": "string", "description": "The type of configs, default null means all type, if not null, server will search all config match type. Multiple type using `,` to split, such as `text,json`"}, "configTags": {"type": "string", "description": "The tags of configs, default null means all tags, if not null, server will search all config match tags. Multiple tags using `,` to split, such as `tag1,tag2`"}, "appName": {"type": "string", "description": "The appName of configs, default null means all appName, if not null, server will search all config match appName."}, "search": { "type": "string", "description": "The search way of list configs, default is `blur` means blur search groupName and dataId. Or using `accurate` means accurate match with groupName and dataId." } }, "required": ["pageNo", "pageSize"], }, url="/nacos/v3/admin/cs/config/list" )
- src/mcp_server_nacos/server.py:74-86 (registration)Registers the 'list_configs' tool (as NacosListConfigs) in the MCP server's list of 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 for the 'list_configs' tool name used in registration and dispatching.LIST_CONFIGS = "list_configs",