flist-mcp

v0.17.0
flist-mcp Checked 2 days ago Published 2 months ago

Slang-backed SystemVerilog filelist analysis over MCP

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

analyze_top

Start or incrementally update the single active SystemVerilog top closure. This tool only reads the repository; its mutation is limited to ephemeral in-process session state. It returns status needs_resolution while reachable choices remain. required_definition_conflicts map a duplicated module/package symbol to candidate compilation units; resolve them with conflict_resolutions. required_include_conflicts map an include path to candidate headers and computed roots; resolve them with include_resolutions. A unique repository-local include is selected automatically, but an ambiguous one is never…

ParameterTypeDescription
repository *stringAbsolute path to the repository root. The tool reads files below this directory but does not modify the repository. Changing it replaces the active analysis state.
top_modules *arrayOne or more SystemVerilog module names used as entry points for one combined logical filelist closure. Changing this ordered list replaces the active analysis state.
conflict_resolutionsIncremental choices for required_definition_conflicts. Each key is the conflicting module or package name and each value is one repository-relative candidate source file returned for that symbol. New…
definesIncremental design macro declarations. An empty value emits -DNAME, a non-empty string emits -DNAME=value, and null removes a saved declaration. Undefined design macros are reported in undefined_defin…
include_resolutionsIncremental choices for required_include_conflicts. Each key is the exact include path and each value is one repository-relative header candidate returned for that include. Use this only when multiple…
source_globsRepository-relative globs that restrict compilation-unit discovery before Slang runs. Defaults to ['**/*.sv', '**/*.v']. Headers such as .svh are resolved as includes, not independent compilation unit…

list_root_modules

Discover every SystemVerilog module in the repository that no other repository module instantiates. This stateless, read-only tool uses Slang for parsing and elaboration, searches source_globs (defaulting to ['**/*.sv', '**/*.v']), and automatically adds include roots only for uniquely matched repository headers. root_modules is sorted by name and retains every duplicate provider location. missing_includes makes complete false because declarations or instantiations may be hidden; undefined_defines is advisory. defines maps macro names to values, where an empty value emits -DNAME. It does not a…

ParameterTypeDescription
repository *stringAbsolute path to the repository root. The tool reads files below this directory but does not modify the repository. Changing it replaces the active analysis state.
definesDesign macro declarations used for this discovery. An empty value emits -DNAME and a non-empty value emits -DNAME=value.
source_globsRepository-relative globs that restrict compilation-unit discovery before Slang runs. Defaults to ['**/*.sv', '**/*.v']. Headers such as .svh are resolved as includes, not independent compilation unit…

diagnose_top

Diagnose the saved active top after analyze_top returns ready_for_diagnostics. This tool does not change state and fails if no active top exists or conflicts remain. Warnings are omitted by default; pass include_warnings=true to return them. It returns status analyzed; saved conflict_resolutions, include_resolutions, and defines; topologically sorted package_order and source_order; used include_directories; detailed sources; undefined_defines; missing_includes and blocked_sources; internal_diagnostics and diagnostic_summary. external_gaps groups unresolved modules/packages by symbol and lists…

ParameterTypeDescription
include_warningsbooleanReturn Slang warnings in internal_diagnostics when true. Defaults to false, which returns only error and fatal diagnostics and reports warning_count as zero.

get_dependency_graph

Return one focused dependency graph for the saved active top after analyze_top returns ready_for_diagnostics. view is required: full returns direct file-level package/source/include/external adjacency; rtl returns only elaborated module, interface, and program symbols with structural edges; external returns only unresolved modules/packages and missing includes with every consumer location. Every reachable node has top_depth, and levels indexes node ids by minimum distance from any selected top. Optional max_depth removes deeper nodes and their incoming edges and sets truncated=true. The tool s…

ParameterTypeDescription
view *stringRequired projection: full returns file/package/include adjacency, rtl returns only elaborated module/interface/program hierarchy, and external returns only unresolved symbols and includes with all con…
max_depthOptional maximum zero-based distance from a selected top. Nodes and edges beyond this depth are omitted and truncated becomes true.