The agent is told to run a CLI command generated from user-supplied intent
Source references: 2The workflow places the user's request in the `extension_cli_generate` intent and then broadly says to run the generated command. It does not require validation that the result is exactly one read-only `az graph query`, or reject shell metacharacters and appended commands.
If the generator misinterprets or is manipulated by a crafted request into returning additional shell content, the agent could perform actions beyond resource lookup with the local Azure CLI session's permissions. The provided text does not show that this has occurred.
The workflow puts the user's request into a command-generation tool and then instructs the agent to run the generated command. The visible instructions do not require checking that the output is only the intended read-only `az graph query`. If extra shell content were generated, it could affect the user's machine or current Azure identity. Users can ask for command-structure validation, argument escaping, and confirmation before execution.
Use `extension_cli_generate` to build the `az graph query` command:```yamlmcp_azure_mcp_extension_cli_generate intent: "query Azure Resource Graph to <user's request>" cli-type: "az"```Show 1 other places
### Step 3: Execute and Format ResultsRun the generated command. Use `--query` (JMESPath) to shape output:```bashaz graph query -q "<KQL>" --query "data[].{name:name, type:type, rg:resourceGroup}" -o table```