dossier

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2026 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

func Build

func Build(ctx context.Context, root, scannerVersion string) (*Dossier, error)

Build walks root once and assembles the dossier

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

type Server

type Server struct {
	File    string `json:"file"`
	Line    int    `json:"line"`
	Call    string `json:"call"`
	Name    string `json:"name,omitempty"`
	Version string `json:"version,omitempty"`
}

Server is a declared server identity: new McpServer({ name, version }), FastMCP("name")

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL