opnsense_kea_subnet_get
Retrieve the full configuration of a Kea DHCPv4 subnet using its UUID for detailed inspection and troubleshooting.
Instructions
Get detailed configuration of a specific Kea DHCPv4 subnet by UUID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | Subnet UUID |
Implementation Reference
- src/tools/dhcp.ts:487-490 (handler)The handler case for 'opnsense_kea_subnet_get' in the switch statement. It parses args with a Zod schema requiring a UUID, then calls keaGetSubnet().
case "opnsense_kea_subnet_get": { const { uuid } = z.object({ uuid: UuidSchema }).parse(args); return await keaGetSubnet(client, uuid); } - src/tools/dhcp.ts:292-298 (helper)The keaGetSubnet() helper function that performs the actual API call to OPNsense's Kea endpoint /kea/dhcpv4/get_subnet/{uuid}.
async function keaGetSubnet( client: OPNsenseClient, uuid: string, ): Promise<{ content: Array<{ type: "text"; text: string }> }> { const result = await client.get(`/kea/dhcpv4/get_subnet/${uuid}`); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - src/tools/dhcp.ts:148-158 (registration)Tool definition registration for 'opnsense_kea_subnet_get' in the dhcpToolDefinitions array. Includes name, description, and inputSchema (requiring a UUID string).
{ name: "opnsense_kea_subnet_get", description: "Get detailed configuration of a specific Kea DHCPv4 subnet by UUID.", inputSchema: { type: "object" as const, properties: { uuid: { type: "string", description: "Subnet UUID" }, }, required: ["uuid"], }, }, - src/utils/validation.ts:3-5 (schema)The UuidSchema Zod validation used to validate the uuid argument for the tool.
export const UuidSchema = z .string() .uuid("Invalid UUID format");