Sentinel-IR

v0.5.24
io.github.jakcmencz/sentinel-ir-mcp Checked 11 hours ago Published 1 day ago

Structural IR of JS/TS/Python/Rust files for AI agents: risk and signals instead of raw source.

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

analyze_code Analyze JavaScript, TypeScript, Python or Rust source

Analyze JavaScript, TypeScript, Python or Rust source text passed in code and return its compact structural IR. Returns: {analysisStatus, language, mission, world.risk, constraints, forbidden, summary, facts}; analysisStatus "incomplete" means it did not parse cleanly, so a low risk is not evidence of safety. Risk: critical = runs code it did not ship (eval, process spawning, unsafe deserialization, native code); high = deletes files, or loads a module or name chosen at run time (dynamic_import, dynamic_reference); medium = writes files, network, crypto (normal in backend code), suspicious_tex…

ParameterTypeDescription
code *stringJavaScript, TypeScript, Python or Rust source
languagestringOverrides the language picked from target (default javascript)
targetstringOptional file name shown as mission.target; its extension (.ts, .tsx, .py, .rs, ...) selects the language

analyze_file Analyze a source file or script

Read one .js/.mjs/.cjs/.jsx/.ts/.mts/.cts/.tsx/.py/.pyi/.rs file inside the allowed folders and return its compact structural IR; the language comes from the extension. Scripts (.sh, .bash, .zsh, .ps1, .bat, .cmd, .rb, .pl, .php, .mk, ...) and Makefile, configure, install, setup, bootstrap, build, Dockerfile, Justfile, Rakefile are read too: language "unknown", analysisStatus "incomplete", risk from text patterns (critical for curl | sh, reverse shells, sending env or tokens; listed in forbidden), never low. Returns: {analysisStatus, language, mission, world.risk, constraints, forbidden, summa…

ParameterTypeDescription
path *stringFile path, absolute or relative to an allowed folder; with several folders pass the full path from analyze_directory

analyze_directory Analyze a folder of source files and scripts

Scan a folder inside the allowed folders: one short entry per JavaScript, TypeScript, Python or Rust file and per script or build file (.sh, .ps1, .bat, .rb, .pl, .php, Makefile, configure, install, Dockerfile, ...; language "unknown", listed in incomplete, with forbidden), highest risk first, plus riskCounts and statusCounts. With several allowed folders every path in the answer is a full path and allowedFolders lists the folders. Parameters: path defaults to the first allowed folder (otherFolders lists any others, not scanned); recursive defaults to true, false scans only the top level; max_…

ParameterTypeDescription
detailstring"summary" (default): short entries; "full": all facts per file, much larger
max_filesintegerMaximum number of files to analyze (default 50, max 500)
pathstringFolder path, absolute or relative to an allowed folder (default: the first allowed folder; with several, the answer lists the others in otherFolders)
recursivebooleanInclude subfolders (default true); false scans only the top level