get_widget_template
Retrieve detailed widget template information for security dashboards in Kubernetes and cloud environments using the RAD Security MCP server.
Instructions
Get detailed information about a specific widget template
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| widget_template_id | Yes | ID of the widget template |
Implementation Reference
- src/operations/dashboards.ts:67-75 (handler)Handler function that executes the tool logic: fetches widget template details via API using the provided ID.*/ export async function getWidgetTemplate( client: RadSecurityClient, widget_template_id: string ): Promise<any> { return client.makeRequest( `/accounts/${client.getAccountId()}/dashboards/widget_templates/${widget_template_id}` ); }
- src/operations/dashboards.ts:12-15 (schema)Zod schema for input validation: requires widget_template_id string.// Schema for get_widget_template export const GetWidgetTemplateSchema = z.object({ widget_template_id: z.string().describe("ID of the widget template"), });
- src/index.ts:663-668 (registration)Tool registration in listTools response: defines name, description, and converts schema to JSON schema for MCP.name: "get_widget_template", description: "Get detailed information about a specific widget template", inputSchema: zodToJsonSchema(dashboards.GetWidgetTemplateSchema), }, {
- src/index.ts:1614-1627 (registration)Tool invocation handler in CallToolRequest switch: parses input with schema, calls the handler, returns JSON response.case "get_widget_template": { const args = dashboards.GetWidgetTemplateSchema.parse( request.params.arguments ); const response = await dashboards.getWidgetTemplate( client, args.widget_template_id ); return { content: [ { type: "text", text: JSON.stringify(response, null, 2) }, ], }; }