Documentation
¶
Overview ¶
Package mcp serves one scan to AI agents over the Model Context Protocol. The tools are read-only and answer from the facts file and the map derived from it, each fact with its file and line evidence. Nothing here adds structure: an agent reads what the scanner found, never a guess. See https://cernly.dev/how/mcp/.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FindInput ¶
type FindInput struct {
Kind string `json:"kind,omitempty" jsonschema:"fact kind, e.g. service, dependency, env_var, outbound_host, route; empty for all"`
Text string `json:"text,omitempty" jsonschema:"case-insensitive text to find in the key or attributes"`
Path string `json:"path,omitempty" jsonschema:"only facts with evidence in this file or under this directory"`
Limit int `json:"limit,omitempty" jsonschema:"page size, default 50, at most 500"`
Offset int `json:"offset,omitempty" jsonschema:"number of matches to skip"`
}
type FindOutput ¶
type MapInput ¶
type MapInput struct {
Section string `` /* 272-byte string literal not displayed */
Text string `json:"text,omitempty" jsonschema:"case-insensitive text to find in an item"`
Limit int `json:"limit,omitempty" jsonschema:"page size, default 50, at most 500"`
Offset int `json:"offset,omitempty" jsonschema:"number of matches to skip"`
}
type PluginProblem ¶
type SectionCount ¶
type Summary ¶
type Summary struct {
Repo string `json:"repo"`
Commit string `json:"commit"`
CommittedAt string `json:"committed_at"`
Extractor string `json:"extractor"`
RulesVersion string `json:"rules_version"`
Facts int `json:"facts"`
Kinds []KindCount `json:"kinds"`
PluginProblems []PluginProblem `json:"plugin_problems"`
Exclusions []fact.Exclusion `json:"exclusions"`
Stacks []rules.StackRole `json:"stacks"`
Map []SectionCount `json:"map"`
// Surface metrics in total and in production; per service in the
// metrics section.
Total *rules.Surface `json:"total,omitempty"`
Production *rules.Surface `json:"production,omitempty"`
}