Skip to main content
Glama

app_configuration_kv_write

Write or update key-value pairs in Azure App Configuration to manage application settings and feature flags.

Instructions

Write or update a key-value in Azure App Configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesThe key to write
valueYesThe value to store
labelNoThe label for the key-value (optional)
content_typeNoContent type of the value (optional, e.g. 'application/json')

Implementation Reference

  • Implements the core logic for the app_configuration_kv_write tool: creates a ConfigurationSetting with provided key, value, label, and content_type, then calls set_configuration_setting on the Azure App Configuration client to write or update the key-value.
    elif name == "app_configuration_kv_write":
        from azure.appconfiguration import ConfigurationSetting
        
        # Create a configuration setting
        setting = ConfigurationSetting(
            key=arguments["key"],
            value=arguments["value"],
            label=arguments.get("label", None),
            content_type=arguments.get("content_type", None)
        )
        
        # Set or update the configuration setting
        result = app_config_client.set_configuration_setting(setting)
        
        # Format result for display
        response = {
            "key": result.key,
            "value": result.value,
            "content_type": result.content_type,
            "label": result.label,
            "etag": result.etag,
            "last_modified": result.last_modified.isoformat() if result.last_modified else None
        }
  • Defines the Tool object including inputSchema for app_configuration_kv_write, specifying required key and value, optional label and content_type.
        name="app_configuration_kv_write",
        description="Write or update a key-value in Azure App Configuration",
        inputSchema={
            "type": "object",
            "properties": {
                "key": {
                    "type": "string",
                    "description": "The key to write",
                },
                "value": {
                    "type": "string",
                    "description": "The value to store",
                },
                "label": {
                    "type": "string",
                    "description": "The label for the key-value (optional)",
                },
                "content_type": {
                    "type": "string",
                    "description": "Content type of the value (optional, e.g. 'application/json')",
                },
            },
            "required": ["key", "value"],
        },
    ),
  • MCP server tool registration handler that returns the list of all Azure tools via get_azure_tools(), which includes app_configuration_kv_write.
    async def list_tools() -> list[Tool]:
        """List available Azure tools"""
        logger.debug("Handling list_tools request")
        return get_azure_tools()  # Use get_azure_tools
  • Function that returns the list of App Configuration tools, including the app_configuration_kv_write tool with its schema; called by get_azure_tools().
    def get_app_configuration_tools() -> list[Tool]:
        return [
            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": [],
                },
            ),
            Tool(
                name="app_configuration_kv_write",
                description="Write or update a key-value in Azure App Configuration",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "key": {
                            "type": "string",
                            "description": "The key to write",
                        },
                        "value": {
                            "type": "string",
                            "description": "The value to store",
                        },
                        "label": {
                            "type": "string",
                            "description": "The label for the key-value (optional)",
                        },
                        "content_type": {
                            "type": "string",
                            "description": "Content type of the value (optional, e.g. 'application/json')",
                        },
                    },
                    "required": ["key", "value"],
                },
            ),
            Tool(
                name="app_configuration_kv_delete",
                description="Delete a key-value from Azure App Configuration",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "key": {
                            "type": "string",
                            "description": "The key to delete",
                        },
                        "label": {
                            "type": "string",
                            "description": "The label of the key-value to delete (optional)",
                        },
                    },
                    "required": ["key"],
                },
            ),
        ]
  • Helper method in AzureResourceManager to create and cache the AzureAppConfigurationClient used by the app_configuration tools.
    def get_app_configuration_client(
        self, endpoint: str | None = None
    ) -> AzureAppConfigurationClient:
        """Get an Azure App Configuration client using AzureCliCredential."""
        try:
            logger.info(f"Creating AzureAppConfigurationClient")
            endpoint = endpoint or os.getenv("AZURE_APP_CONFIGURATION_ENDPOINT")
            if not endpoint:
                raise ValueError(
                    "Azure App Configuration endpoint is not specified and not set in the environment."
                )
    
            return AzureAppConfigurationClient(base_url=endpoint, credential=self.credential)
        except Exception as e:
            logger.error(f"Failed to create AzureAppConfigurationClient: {e}")
            raise RuntimeError(f"Failed to create AzureAppConfigurationClient: {e}")
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 'Write or update' implies a mutation, it lacks details on permissions, idempotency, error handling, or side effects. For a write tool with zero annotation coverage, this is a significant gap in transparency.

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 directly states the tool's purpose without unnecessary words. It is front-loaded and wastes no space, making it highly concise and well-structured.

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 tool's complexity as a write operation with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits, return values, and usage context, which are critical for an AI agent to invoke it correctly and safely.

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 schema fully documents all parameters. The description does not add any semantic details beyond what the schema provides, such as examples or constraints. Baseline 3 is appropriate when the schema handles parameter documentation effectively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Write or update') and resource ('a key-value in Azure App Configuration'), distinguishing it from sibling tools like app_configuration_kv_read (read) and app_configuration_kv_delete (delete). It precisely communicates the tool's function without redundancy.

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. It does not mention prerequisites, such as authentication or existing configuration, nor does it differentiate from sibling tools beyond the obvious action contrast. Usage context is implied but not explicitly stated.

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/mashriram/azure_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server