Tools & Ecosystem
Everything you need to parse, validate, analyze, and build with STL.
stl_parser
v1.7.0The official Python parser for STL. Parse, validate, serialize, query, diff, and stream STL documents. Production-grade with comprehensive test coverage.
530 tests 3,100 LOC 14 modules
Capabilities
Parse STL text and files into structured results
parse(text), parse_file(path) Syntax and semantic validation
validate_parse_result(result) Convert to JSON, RDF (Turtle/XML/N-Triples/JSON-LD)
to_json(), to_rdf() Django-style filtering and RFC 6901 pointer addressing
find(), find_all(), stl_pointer() Programmatic STL construction with type safety
stl(src, tgt).mod(key=val).build() Semantic diff and patch with round-trip guarantee
stl_diff(a, b), stl_patch(doc, diff) Stream large files with filtering
stream_parse(source, where=) Thread-safe event logging to .stl files
STLEmitter(path, namespace) Three-stage LLM output cleaning pipeline
validate_llm_output(raw_text) Confidence decay over time (half-life model)
effective_confidence(stmt), decay_report() Domain constraint validation against .stl.schema files
load_schema(), validate_against_schema() Build NetworkX directed graphs for path and centrality analysis
STLGraph(result) pip install stl-parser
View on GitHub →
STL CLI
Command-line interface for STL operations. Validate, convert, analyze, build, query, diff, and clean STL files from the terminal.
Commands
stl validate input.stl — Syntax and semantic validation stl convert input.stl --to json — Convert to JSON, Turtle, JSON-LD stl analyze input.stl — Graph analysis report stl build \"[A]\" \"[B]\" --mod \"confidence=0.9\" — Build statements from CLI stl query input.stl --where \"confidence__gt=0.8\" — Filter statements stl diff a.stl b.stl — Semantic diff stl clean llm_output.txt — Clean LLM output pip install stl-parser (includes CLI)
View on GitHub →
MCP Server Tools
STL tools exposed as MCP (Model Context Protocol) server tools. Enables AI agents to validate, parse, and analyze STL directly.
MCP Tools
Validate STL text syntax and semantics
Parse STL text into structured JSON
Graph statistics: nodes, edges, centrality, cycles
Validate STL file by path
Domain Schemas
Six domain-specific validation schemas for constraining STL to specific fields. Each schema defines required anchors, modifiers, and value ranges.
Domain Schemas
Traditional Chinese MedicineScientific ResearchCausal ReasoningHistorical EventsMedical/ClinicalLegal Documents