Skip to main content
Glama

Get subnet

get_subnet
Read-onlyIdempotent

Retrieve a subnet by ID to inspect its CIDR, gateway, DHCP settings, allocation pools, DNS servers, and routes. Use it after finding subnet IDs to review network configuration.

Instructions

Get one subnet by ID: CIDR, gateway, DHCP, allocation pools, DNS servers and routes.

Use list_subnets to find IDs, optionally for one network. Returns not_found if the subnet is not visible to the selected project.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "subnet_id": "<subnet_id>"
    },
    "name": "get_subnet"
  }
}

Input Schema

NameRequiredDescriptionDefault
subnet_idYesSubnet ID, as returned by list_subnets.
project_idNoProject ID to work in; omit for the default project. Allowed values are listed by get_scope.

Output Schema

NameRequiredDescriptionDefault
idYes
cidrNo
nameNo
gateway_ipNo
ip_versionNo
network_idNo
project_idNo
descriptionNo
host_routesNo
dns_nameserversNo
is_dhcp_enabledNo
allocation_poolsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.2
    • addedInput schema / properties / subnet_id / description
      Added value: +"Subnet ID, as returned by list_subnets."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely new behavior: project-scoped visibility can produce not_found rather than an access error, which is otherwise non-obvious. It stops short of describing pagination/response shape, but that is less relevant for a single-resource get.

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?

Two sentences, no filler, with the return payload front-loaded and the prerequisite/alternative second. Every clause carries information an agent would otherwise have to infer.

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

Completeness5/5

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

An output schema exists, so return values need not be explained in prose; the description still lists the key fields. For a two-parameter read tool with full annotation coverage, nothing an agent needs in order to call it correctly is missing.

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 coverage is 100%: subnet_id references list_subnets and project_id points to get_scope for allowed values. The description adds no syntax or format guidance beyond that, so the baseline 3 applies.

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?

Specific verb and resource (get one subnet by ID) plus an enumeration of the returned fields (CIDR, gateway, DHCP, pools, DNS, routes). It also names the sibling list_subnets, so an agent can tell single-fetch from enumerate without opening either schema.

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

Usage Guidelines5/5

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

Explicitly routes ID discovery to list_subnets ("optionally for one network"), establishing the when-to-use split between the two tools. It adds a concrete failure condition (not_found if the subnet is not visible to the selected project) that tells the agent how project scoping affects this call.

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