Skip to main content
Glama

nsg_rules_for

Read-onlyIdempotent

Retrieve all network security group rules for an Azure VM, NIC, subnet, or IP, showing inbound and outbound layers in evaluation order, sorted by priority.

Instructions

Every NSG layer on a VM, NIC, private endpoint, public IP or subnet, in Azure evaluation order.

Inbound shows subnet NSG then NIC NSG. Outbound shows NIC NSG then subnet NSG. Rules are sorted by priority, default rules included.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.8

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely useful behavioral context beyond that: Azure evaluation order, the subnet-then-NIC vs NIC-then-subnet asymmetry for inbound/outbound, priority sorting, and inclusion of default rules. It does not cover permissions or response size, so not a 5.

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?

Three short sentences, front-loaded with the scope, then the ordering semantics. No filler, and the line breaks map cleanly to distinct facts an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter read tool with no output schema, the description tells the agent what comes back (all NSG layers, sorted by priority, default rules included) and in what evaluation order. The one missing piece is the target identifier format, which is the sole input and is undocumented in both schema and description.

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 0% for the single required 'target' parameter, so the description must compensate. It partially does by enumerating the accepted target kinds (VM, NIC, private endpoint, public IP, subnet), but it gives no syntax for how a target is identified (resource ID vs name vs IP), leaving a real gap.

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

Purpose4/5

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

The description states the resource (every NSG layer attached to a VM, NIC, private endpoint, public IP or subnet) and the scope of the result (all layers, in Azure evaluation order), which is a specific verb+resource. It does not explicitly contrast with the sibling search_nsg_rules, so an agent must infer that this tool is target-scoped rather than a global rule search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the target scoping ('every NSG layer on a VM, NIC, ...'), which suggests this is the tool to call when you know the resource and want its effective NSG rules. However, there is no explicit when-to-use guidance and no mention of the sibling search_nsg_rules as the alternative for cross-resource rule lookup.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.