Documentation
¶
Overview ¶
Package dossier collects everything the static pipeline knows about an MCP server's source tree into one document, for a later reviewer - a person or a model - to read without the tree at hand: languages and manifests, the MCP SDK and its version, declared server identity, and for each tool, prompt and resource its declaration, handler code and reachable behavior. It reports facts only; findings stay in the scan report.
Index ¶
Constants ¶
const SchemaVersion = "1"
SchemaVersion identifies the dossier layout
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capability ¶
type Capability struct {
Kind string `json:"kind"`
Name string `json:"name"`
NameResolved bool `json:"name_resolved"`
URI string `json:"uri,omitempty"`
Description string `json:"description,omitempty"`
DescriptionResolved bool `json:"description_resolved"`
Form string `json:"form,omitempty"`
File string `json:"file"`
Line int `json:"line"`
Handler *Handler `json:"handler,omitempty"`
HandlerText string `json:"handler_text,omitempty"`
Behavior *behavioral.HandlerBehavior `json:"behavior,omitempty"`
Declares map[string]bool `json:"declares,omitempty"`
}
Capability is one tool, prompt or resource with its handler and reachable behavior
type Dossier ¶
type Dossier struct {
SchemaVersion string `json:"schema_version"`
ScannerVersion string `json:"scanner_version,omitempty"`
GeneratedAt time.Time `json:"generated_at"`
Root string `json:"root"`
Repository Repository `json:"repository"`
Servers []Server `json:"servers,omitempty"`
MCPImports []string `json:"mcp_imports,omitempty"`
Capabilities []Capability `json:"capabilities"`
// ReviewHints are places static analysis could not settle, for a later reviewer to revisit;
// see docs/review-hints.md
ReviewHints []Hint `json:"review_hints"`
Coverage model.Coverage `json:"coverage"`
}
Dossier is the whole document
type Handler ¶
type Handler struct {
Symbol string `json:"symbol"`
File string `json:"file"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Params []string `json:"params,omitempty"`
Source string `json:"source,omitempty"`
Truncated bool `json:"source_truncated,omitempty"`
}
Handler is the function that serves a capability
type Hint ¶
type Hint struct {
Code string `json:"code"`
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
Capability string `json:"capability,omitempty"`
Observed string `json:"observed"`
Undecided string `json:"undecided"`
Question string `json:"question"`
HowToCheck string `json:"how_to_check"`
Strength string `json:"strength"`
Related []string `json:"related,omitempty"`
}
Hint is a place where static analysis saw something it could not decide, written so a later reviewer can come back to it with the right question. docs/review-hints.md describes each code.
type Manifest ¶
type Manifest struct {
Path string `json:"path"`
Ecosystem string `json:"ecosystem"`
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
MCPSDK map[string]string `json:"mcp_sdk,omitempty"`
Dependencies map[string]string `json:"dependencies,omitempty"`
}
Manifest is one package manifest and what it declares
type Repository ¶
type Repository struct {
FilesByLanguage map[string]int `json:"files_by_language"`
FilesParsed int `json:"files_parsed"`
Functions int `json:"functions"`
Manifests []Manifest `json:"manifests,omitempty"`
// Readme is the start of the top-level README, as the project describes itself
Readme string `json:"readme,omitempty"`
}
Repository is what the tree is made of