app_configuration_kv_read
Retrieve key-values from Azure App Configuration using optional filters for keys and labels. Enables efficient data access and management within the Azure MCP Server environment.
Instructions
Read key-values from Azure App Configuration
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | No | The key to read (optional, use * for wildcards, e.g. 'app1/*') | |
| label | No | The label filter (optional, use '\0' for no label, '*' for any label) |
Implementation Reference
- mcp_server_azure/azure_server.py:335-363 (handler)Implements the core logic for reading key-value pairs from Azure App Configuration. Retrieves the client, applies optional key and label filters to list_configuration_settings, iterates over results, and formats them into a JSON-serializable structure.if name == "app_configuration_kv_read": # Get key and label from arguments, both optional key = arguments.get("key", None) label = arguments.get("label", None) # List key-values with optional filtering by key and label if key: settings = list(app_config_client.list_configuration_settings( key_filter=key, label_filter=label )) else: settings = list(app_config_client.list_configuration_settings( label_filter=label )) # Format results for display result = [] for setting in settings: result.append({ "key": setting.key, "value": setting.value, "content_type": setting.content_type, "label": setting.label, "last_modified": setting.last_modified.isoformat() if setting.last_modified else None, "read_only": setting.read_only }) response = {"settings": result}
- Defines the tool's metadata, description, and input schema specifying optional 'key' (supports wildcards) and 'label' parameters for filtering.Tool( name="app_configuration_kv_read", description="Read key-values from Azure App Configuration", inputSchema={ "type": "object", "properties": { "key": { "type": "string", "description": "The key to read (optional, use * for wildcards, e.g. 'app1/*')", }, "label": { "type": "string", "description": "The label filter (optional, use '\\0' for no label, '*' for any label)", }, }, "required": [], }, ),
- mcp_server_azure/azure_server.py:171-176 (registration)MCP server tool registration handler that provides the full list of Azure tools (including app_configuration_kv_read via get_azure_tools()) to clients.@server.list_tools() async def list_tools() -> list[Tool]: """List available Azure tools""" logger.debug("Handling list_tools request") return get_azure_tools() # Use get_azure_tools
- mcp_server_azure/azure_server.py:440-443 (handler)Dispatches tool calls matching 'app_configuration_*' (including app_configuration_kv_read) to the dedicated App Configuration operations handler.elif name.startswith("app_configuration_"): return await handle_app_configuration_operations( azure_rm, name, arguments ) # Use app configuration handler