get-sdwan-config
Retrieve a specific SD-WAN configuration by its ID.
Instructions
Get a specific SD-WAN configuration by ID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | SD-WAN config ID |
Implementation Reference
- src/index.ts:137-139 (registration)Registration of the 'get-sdwan-config' tool using the MCP tool() function with schema and handler.
tool("get-sdwan-config", "Get a specific SD-WAN configuration by ID", getSdwanConfigSchema.shape, wrapToolHandler(getSdwanConfig)); - src/tools/sdwan.ts:11-13 (schema)Zod schema for get-sdwan-config: requires 'id' (string) describing the SD-WAN config ID.
export const getSdwanConfigSchema = z.object({ id: z.string().describe("SD-WAN config ID"), }); - src/tools/sdwan.ts:15-18 (handler)Handler function getSdwanConfig: makes a GET request to /sd-wan-configs/{id} and returns the data.
export async function getSdwanConfig(params: z.infer<typeof getSdwanConfigSchema>) { const response = await unifiClient.get<{ data: unknown }>(`/sd-wan-configs/${params.id}`); return response.data; } - src/index.ts:25-29 (helper)Import of getSdwanConfigSchema and getSdwanConfig from src/tools/sdwan.ts into the registration file.
import { listSdwanConfigsSchema, listSdwanConfigs, getSdwanConfigSchema, getSdwanConfig, getSdwanConfigStatusSchema, getSdwanConfigStatus, } from "./tools/sdwan.js";