Skip to main content
Glama

list_threat_vectors

Identify and retrieve threat vectors in Kubernetes and cloud environments by specifying clusters, namespaces, or resources. Designed for security insights and risk mitigation within RAD Security.

Instructions

List threat vectors

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clustersIdsNoCluster ids to check for threat vectors
namespacesNoNamespaces to check for threat vectors
pageNoPage number to retrieve
page_sizeNoNumber of items per page
resource_uidNoThreat vector associated with this resource

Implementation Reference

  • The main execution logic for the 'list_threat_vectors' tool. This function constructs query parameters and makes an API request to retrieve threat vector instances from the RAD Security API.
    export async function listThreatVectors( client: RadSecurityClient, clustersIds: string[] | undefined, namespaces: string[] | undefined, resourceUid: string | undefined, page: number = 1, pageSize: number = 20 ): Promise<any> { const params = { associated_with_resource_uid: resourceUid, clusters: clustersIds, namespaces: namespaces, statuses: "Open", page_size: pageSize, page: page, }; const response = await client.makeRequest( `/accounts/${client.getAccountId()}/threat_vector_instances/v2`, params ); // Return the transformed response return response; }
  • Zod input schema defining the parameters for the 'list_threat_vectors' tool, used for validation.
    export const listThreatVectorsSchema = z.object({ clustersIds: z.array(z.string()).optional().describe("Cluster ids to check for threat vectors"), namespaces: z.array(z.string()).optional().describe("Namespaces to check for threat vectors"), resource_uid: z.string().optional().describe("Threat vector associated with this resource"), page: z.number().optional().default(1).describe("Page number to retrieve"), page_size: z.number().optional().default(20).describe("Number of items per page"), });
  • src/index.ts:274-280 (registration)
    Registration of the 'list_threat_vectors' tool in the MCP server's listTools response, conditionally enabled based on toolkit filters.
    ...(isToolkitEnabled("threats", toolkitFilters) ? [ { name: "list_threat_vectors", description: "List threat vectors", inputSchema: zodToJsonSchema(threats.listThreatVectorsSchema), }, ] : []),
  • Dispatch handler in the MCP server's callTool request that parses arguments, invokes the tool handler, and formats the response.
    case "list_threat_vectors": { const args = threats.listThreatVectorsSchema.parse(request.params.arguments); const response = await threats.listThreatVectors(client, args.clustersIds, args.namespaces, args.resource_uid, args.page, args.page_size); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; }

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