Skip to main content
Glama
rad-security

RAD Security

Official
by rad-security

list_widget_templates

Retrieve widget templates for security dashboards with filtering by visualization type and category to customize security insights displays.

Instructions

List widget templates with optional filtering by visualization type and category

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return (default: 10, min: 1)
offsetNoPagination offset (default: 0, min: 0)
visualization_typeNoFilter by visualization type
categoryNoFilter by category

Implementation Reference

  • The core handler function that executes the tool logic by constructing parameters and making an API request to list widget templates.
    export async function listWidgetTemplates(
      client: RadSecurityClient,
      limit: number = 50,
      offset: number = 0,
      visualization_type?: string,
      category?: string
    ): Promise<any> {
      const params: Record<string, any> = { limit, offset };
    
      if (visualization_type) {
        params.visualization_type = visualization_type;
      }
      if (category) {
        params.category = category;
      }
    
      return client.makeRequest(
        `/accounts/${client.getAccountId()}/dashboards/widget_templates`,
        params
      );
    }
  • Zod schema defining the input parameters for the list_widget_templates tool, used for validation.
    // Schema for list_widget_templates
    export const ListWidgetTemplatesSchema = z.object({
      limit: z.number().optional().default(10).describe("Maximum number of results to return (default: 10, min: 1)"),
      offset: z.number().optional().default(0).describe("Pagination offset (default: 0, min: 0)"),
      visualization_type: z.string().optional().describe("Filter by visualization type"),
      category: z.string().optional().describe("Filter by category"),
    });
  • src/index.ts:655-661 (registration)
    Tool registration in the ListTools MCP request handler, advertising the tool's name, description, and input schema.
      name: "list_widget_templates",
      description:
        "List widget templates with optional filtering by visualization type and category",
      inputSchema: zodToJsonSchema(
        dashboards.ListWidgetTemplatesSchema
      ),
    },
  • src/index.ts:1597-1613 (registration)
    Tool call handler in the CallToolRequest MCP handler, which parses arguments and dispatches to the listWidgetTemplates function.
    case "list_widget_templates": {
      const args = dashboards.ListWidgetTemplatesSchema.parse(
        request.params.arguments
      );
      const response = await dashboards.listWidgetTemplates(
        client,
        args.limit,
        args.offset,
        args.visualization_type,
        args.category
      );
      return {
        content: [
          { type: "text", text: JSON.stringify(response, null, 2) },
        ],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'List' implies a read operation, the description doesn't address critical behaviors like pagination (though hinted by parameters), rate limits, authentication requirements, error conditions, or return format. For a tool with 4 parameters and no output schema, this leaves significant gaps in understanding how the tool behaves.

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?

The description is a single, efficient sentence that front-loads the core purpose ('List widget templates') and immediately adds the key filtering capabilities. There's zero wasted language, and every word earns its place by conveying essential information.

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

Completeness2/5

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

Given the tool's complexity (4 parameters, no output schema, no annotations), the description is insufficient. It doesn't explain what a 'widget template' is in this context, how results are structured, whether ordering is applied, or any side effects. For a list operation with filtering and pagination, more context is needed to use it effectively.

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 description coverage is 100%, so the schema fully documents all 4 parameters. The description mentions filtering by visualization type and category, which maps to two parameters, but adds no additional semantic context beyond what the schema provides (e.g., examples of valid types/categories). This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('widget templates'), making the purpose immediately understandable. It also mentions optional filtering by visualization type and category, which adds specificity. However, it doesn't explicitly differentiate this tool from similar sibling tools like 'get_widget_template' or 'list_dashboard_templates', preventing a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'get_widget_template' (likely for retrieving a single template) and 'list_dashboard_templates' (for a different resource type), the agent receives no help in choosing between them. There's no mention of prerequisites, typical use cases, or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rad-security/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server