get-sdwan-config-status
Retrieve the current status of an SD-WAN configuration using its ID to verify operational state.
Instructions
Get the status of a specific SD-WAN configuration
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | SD-WAN config ID |
Implementation Reference
- src/tools/sdwan.ts:24-27 (handler)The handler function that executes the tool logic. It accepts an 'id' parameter, calls the UniFi API endpoint /sd-wan-configs/{id}/status, and returns the response data.
export async function getSdwanConfigStatus(params: z.infer<typeof getSdwanConfigStatusSchema>) { const response = await unifiClient.get<{ data: unknown }>(`/sd-wan-configs/${params.id}/status`); return response.data; } - src/tools/sdwan.ts:20-22 (schema)Zod schema for the tool input: requires a single 'id' field (string) describing the SD-WAN config ID.
export const getSdwanConfigStatusSchema = z.object({ id: z.string().describe("SD-WAN config ID"), }); - src/index.ts:141-143 (registration)Registration of the tool with the MCP server using the name 'get-sdwan-config-status', its schema, and wrapped handler.
tool("get-sdwan-config-status", "Get the status of a specific SD-WAN configuration", getSdwanConfigStatusSchema.shape, wrapToolHandler(getSdwanConfigStatus)); - src/index.ts:25-29 (registration)Import of getSdwanConfigStatusSchema and getSdwanConfigStatus from the sdwan tools module.
import { listSdwanConfigsSchema, listSdwanConfigs, getSdwanConfigSchema, getSdwanConfig, getSdwanConfigStatusSchema, getSdwanConfigStatus, } from "./tools/sdwan.js";