Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler wraps the cvemap.Client for faceted vulnerability analysis operations.
func NewHandler ¶
NewHandler constructs a new Handler instance.
func (*Handler) Analyze ¶
func (h *Handler) Analyze(params Params) (cvemap.SearchResponse, error)
Analyze performs a facet-based aggregation over vulnerabilities. Callers must provide at least one term facet via Params.Fields. The function sets Fields to ["doc_id"] and Limit to 1 to minimise response size as we are only interested in the aggregation buckets.
func (*Handler) MCPHandler ¶
func (h *Handler) MCPHandler(client *cvemap.Client) func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error)
MCPHandler returns the MCP handler for this tool.
func (*Handler) MCPToolSpec ¶
MCPToolSpec returns the MCP tool specification for vulnerability analysis
type Params ¶
type Params struct {
// Fields represents the list of facet expressions the caller wishes to
// compute. Each expression can optionally set a custom size using the
// "field=size" syntax (e.g. "severity=5").
Fields []string
// Query is an optional Bleve query expression that filters the documents
// before the facet aggregation is executed.
Query *string
// FacetSize sets the default number of buckets to return for any facet
// expression that does not explicitly override its size via the
// "field=size" form. If nil the server default is used.
FacetSize *int
}
Params groups the parameters for faceted vulnerability analysis
Click to show internal directories.
Click to hide internal directories.