OpenSysML MCP server

v0.13.0
org.opensysml/sysml-mcp Checked 1 hour ago Published 5 days ago

SysML v2 and KerML for coding agents: workspace diagnostics and edits, execution, REPL sessions.

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

advance

Advance the debuggers' simulation clock (%advance), running every state event, action token, change-condition poll and do behavior that comes due, in due order, and report what ran and where the debuggers stand. No event is skipped however long the step: each runs at its own instant, so one advance of 300 is the same run as three hundred of 1, and lastEventAt in the result is the exact instant of the last event that ran. The clock is the session's: a debugged action and machine both move.

ParameterTypeDescription
time *numbertime units (seconds) to advance the debuggers' clock by, running every event, token and do behavior that comes due; 0 dispatches what is already due
sessionstringsession name; omit for the default session

apply_edits

Apply source-preserving edits to a parsed model and return the edited notation (the ApplyEdits RPC): set a value, rename with every reference, add a member, import, documentation, comment, connection, transition, satisfy or metadata, delete, move. Edits are located from the parsed spans, so comments and layout outside them are kept, and the result is re-parsed and validated before it is answered; a refused batch answers `error` and `failure` naming why, and nothing is applied. Nothing is written to disk: the edited text comes back as `content` (one document) or `documents` for the agent to wri…

ParameterTypeDescription
acceptDocumentsbooleanread the edited documents from the documents field, which a model of several documents needs; without it such a model is refused
documentstringthe document whose declarations the operations target, named as the parse named it; empty is the model's first document
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
operationsnull | arrayedits to apply, all or none, each a protojson EditOperation with one arm: {"setValue":{"target":qualified name,"value":expression text}}, {"rename":{"target":..,"newName":..}}, {"addMember":{"owner":.…
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

apply_model_edit

Edit a model by operations on its elements rather than by text: setValue, rename, addMember, addConnection, addSequence (action-body items), delete, move, and the diagram-layout annotations setLayout, setRoute, setCanvas, setStyle, setNote, setPicture. Targets and owners are qualified names as render_view reports them in nodes[].fqn. Returns the text edits the operations amount to, per document, and the operations refused with why; writes the files only with apply=true.

ParameterTypeDescription
operations *the operations, applied in order against the document's current text
path *stringthe document the operations address, absolute or relative to the workspace root
applybooleanwrite every affected file, all or none, each replaced atomically (its mode is kept, other inode metadata is not); false (the default) only returns the edits

check

Ask an SMT solver whether a constraint, requirement or satisfaction can be satisfied at all (%check, experimental), with a satisfying assignment when it can. Needs z3 or cvc5 installed; the status is unavailable otherwise.

ParameterTypeDescription
name *stringqualified name of the constraint, requirement, satisfaction, part or analysis case
sessionstringsession name; omit for the default session

check_behavior

Search every schedule of an action or state machine (the CheckBehavior RPC, the REPL's %check-property/%check-diverge settings about %action/%state): a property false at a stable state, a deadlock, a failure or a feature whose final value the schedule decides is witnessed and replayed. `verdict` is holds, fails or undecided; `violations`, `divergences` and `finals` carry each witness as its replay schedule, draws and choices, and the witness file when asked for. With checkInput or checkAssume the symbolic engine answers with `claim`, the inputs it ranged over and its witnesses. Bounded by chec…

ParameterTypeDescription
actionSymbolIdstringqualified name of the action definition or usage to check; give this or stateMachineSymbolId
checkAssumenull | arrayconstraints or requirements the symbolic engine assumes (-check-assume)
checkDepthintegermoves one schedule may make; 0 is the engine's default (-check-depth)
checkDivergenull | arrayfeatures whose final value the schedule may decide (-check-diverge); the action's own bare, a node's as node.pin, the performer's as this.<name>
checkInputnull | arrayinputs left free for the symbolic engine to range over (-check-input)
checkPropertynull | arrayconstraints or requirements evaluated at every stable state; one false at a state is a violation (-check-property)
checkStatesintegerdistinct states the search may visit; 0 is the engine's default (-check-states)
checkTimeoutnumberseconds the search and each solver query may take; 0 is none (-check-timeout)
checkUnrollintegerloop iterations the symbolic engine unrolls; 0 is its default (-check-unroll)
checkWitnessbooleancarry each violation's and divergent value's witness file in the answer, for a replay schedule to follow (-check-witness)
enginestringthe engine asked: check (the default), smt, or one list_engines names
inputsobjectinput parameter name to value, each a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
performerSymbolIdstringqualified name of a part/usage, or a path from one, whose object performs the behavior; empty performs it outside any object
sourcesnull | arraydocuments given inline, parsed with paths as one model
stateMachineSymbolIdstringqualified name of the state definition or usage to check; give this or actionSymbolId
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

close_document

Release a document held open by open_document: the server goes back to the file on disk (or forgets the document when there is no file). Nothing is written.

ParameterTypeDescription
path *stringan open document, absolute or relative to the workspace root

code_actions

List the quick fixes and refactorings available for a range of a document, each with the edits it would make. Nothing is applied; write the edits with your own file tools or use the rename/format/apply_model_edit tools with apply=true.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root
rangenull | objectthe lines of interest (1-based); omitted, the whole document

compare_results

Run every configuration a SysML v1 tool's results sidecar indexes against the migrated model (the CompareResults RPC, the CLI's -compare-results with -action, -runs, -seed, -draws, -clock-step and -observe): each on its target, for its recorded run count under its duration mode, or the runs and draws given, and table the tool's and OpenSysML's min, mean, p50, p90 and max of each observable with their relative difference. `configurations` carry each one's status (holds, fails, unresolved), its rows, the distributions compared, the errors and notes, and the lines the CLI prints. The result is th…

ParameterTypeDescription
results *stringthe results sidecar as JSON, as sysml -migration-results writes it
actionsnull | arraythe configurations compared, by qualified or simple name (the CLI's -action); every indexed configuration when empty
clockStepnull | numberthe clock step replacing every configuration's, in seconds; 0 is a continuous clock (the CLI's -clock-step)
drawsstringthe draw policy replacing every configuration's durationSimulationMode: random, min, max or average (the CLI's -draws)
enginestringthe engine selection, as list_engines names them
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
observenull | arraythe stored observables compared, each with the feature of the run that answers it (the CLI's -observe)
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
runsintegerthe runs made of every configuration when positive (the CLI's -runs); else each configuration's own numberOfRuns, or one
seednull | integerthe seed the runs derive theirs from (the CLI's -seed); without one, runs that draw at random are refused unless draws fixes them
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

completion

Propose completions at a position: keywords, names in scope and members of the type being accessed.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root; a sysml://stdlib/<file> URI for a standard library document
position *objectthe position (1-based line and character column)

configure

Ask an SMT solver which variants an element's conditions permit (%configure, experimental): a consistent selection, the check of the selections given, or every consistent selection up to a limit. A part or definition is configured over every assertion about its objects. Read-only: no variant is bound.

ParameterTypeDescription
name *stringqualified name of the constraint, requirement, satisfaction, part or definition whose variations are configured
allbooleanenumerate every consistent selection instead of one. Not with selections
limitintegerwith all: at most this many selections
selectionsnull | arrayvariants to fix, written variation=variant; the selection is checked and a conflict named. Not with all
sessionstringsession name; omit for the default session

convert

Convert a SysML v2 model between the representations OpenSysML writes — textual notation, RDF Turtle, the API's JSON element form — (the Convert RPC, the CLI's -convert). Name the model by modelHash, paths or sources (the source the parse read is converted), or by filePath or inline content read afresh. Nothing is written to disk: the converted document comes back as `content` for the agent to write. A SysML v1 model is refused with INVALID_ARGUMENT: use migrate. The result is the ConvertResponse as protojson writes it.

ParameterTypeDescription
toFormat *stringformat to write: sysml, kerml, text, ttl, turtle, rdf, api-json or json
compactbooleanfor api-json from notation: write the compact document (api-json-compact/1) instead of the element array
contentnull | stringthe document to convert, inline (an empty string is an empty document); fromFormat must then say what it is
documentsnull | arrayfor a parsed model, the documents whose elements are written, named as the parse named them; empty writes every document
filePathstringa file to convert, read afresh in the format its extension names (or fromFormat), absolute or relative to the workspace root; instead of modelHash, paths or sources
fromFormatstringsysml, kerml, text, ttl, turtle, rdf, api-json or json; empty infers from filePath's extension and is notation for a parsed model
idFormstringhow derived element ids are spelled when notation is written as a graph (ttl or api-json): qualified (the default) or uuid
includeCheckDiagnosticsbooleannotation sources: report the semantic check's diagnostics alongside the output, each with its severity and code as parse reports them; off, only syntax errors are reported
includeLibraryStubsbooleanfor api-json: include ownerless standard-library stubs for legacy readers; off by default
inheritedMembersbooleanfor api-json: also write the derived lists that repeat each Namespace's and Type's inherited and imported members (membership, member, inheritedMembership, importedMembership, featureMembership, featu…
keepDerivednull | arraywith omitDerived: the derived properties still written, as owner or qualifiedName
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
omitDerivedbooleanwith compact: leave out every derived property of the metamodel except keepDerived
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
tolerateSyntaxErrorsbooleannotation to notation only: write the notation back out even when the parser could not read all of it, reporting syntax errors as diagnostics

debug_breakpoints

Set breakpoints at nodes of the debugged action (%break), optionally clearing the earlier ones, and report the breakpoints it then has; with nothing to set, lists them. A node the action has none of fails, naming its nodes.

ParameterTypeDescription
clearbooleanremove the breakpoints set before, before setting the new ones
sessionstringsession name; omit for the default session
setnull | arraynode names to break at; debug_continue then stops when a token reaches one

debug_continue

Run the debugged action to completion, or to the first breakpoint a token reaches (%continue), and report its results.

ParameterTypeDescription
sessionstringsession name; omit for the default session

debug_current

Report where the debugging session stands without changing it: the action's execution state, tokens, breakpoints and feature values (%tokens), or the machine's current state, clock, event queue, signals in flight and state data (%current, %events).

ParameterTypeDescription
sessionstringsession name; omit for the default session

debug_start

Start a debugging session on an action (%action) or a state machine (%state), performed by an object when one is named. The action is not stepped: debug_step advances one token step, debug_continue runs to completion or a breakpoint. A machine takes its entry; debug_step, advance and send drive it. Starting again replaces the session.

ParameterTypeDescription
kind *stringaction, or state for a state machine
name *stringqualified name of the action or machine; for state, also an object the session holds whose exhibited machine to attach to
objectstringan object the session holds (name, #id or path) performing the behavior
sessionstringsession name; omit for the default session

debug_step

Advance the debugged action one token step, or the debugged state machine one step (%step): one event dispatched, one change event, one round of do actions. A token waiting only on the clock is not stepped; advance moves the clock.

ParameterTypeDescription
sessionstringsession name; omit for the default session

debug_stop

End the debugging session (%stop), letting go of its run; objects the session holds stay.

ParameterTypeDescription
sessionstringsession name; omit for the default session

definition

Find where the name at a position is declared. Standard library declarations are reported as sysml://stdlib/<file> resources.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root; a sysml://stdlib/<file> URI for a standard library document
position *objectthe position (1-based line and character column)

diagnostics

Report every diagnostic of a parsed model (the GetDiagnostics RPC), as `sysml -validate` does: each with its severity, code, message and position. Parse with `strictConformance` for the strict mode of `sysml -validate -strict`; `disableLint` and `enableLint` select the lints as `sysml -disable-lint`/`-enable-lint` do. The result is the DiagnosticsResponse as protojson writes it.

ParameterTypeDescription
disableLintnull | arraylints left out of the diagnostics, by code (sysml -disable-lint): undeclared-signal, deferred-keeper-unmarked or rounded-real-literal
enableLintnull | arrayopt-in lints kept in the diagnostics, by code (sysml -enable-lint): rounded-real-literal; off unless named, disableLint wins
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

document_symbols

Outline a document: the elements it declares, nested as they are owned, with their kinds and ranges.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root; a sysml://stdlib/<file> URI for a standard library document

documents

List the document definitions (doc def) declared across the workspace, which render_document renders to Markdown.

element_properties

Read the metamodel properties of one element of a parsed model by their KerML/SysML specification names — inheritedFeature, connectorEnd, relatedFeature, directedFeature, isComposite, a feature's value… — as the model's API element form (convert to api-json) spells them (the GetElementProperties RPC). The element is named by qualified name, by the positional id of an unnamed member (Owner::@2) or by the id an earlier answer's element value carried, which walks the model and into the standard library; empty properties reads every property the element carries. A property the metaclass does…

ParameterTypeDescription
elementId *stringthe element: a qualified name (Demo::Vehicle::mass), the positional id of an unnamed member (Demo::Vehicle::@2), or the id an earlier answer's element value carried, a standard-library element's inclu…
lookupstringwhat elementId is, stated rather than guessed: LOOKUP_KIND_QUALIFIED_NAME reads it only as a qualified name, LOOKUP_KIND_ELEMENT_ID only as an id an answer reported (a childIds or members entry, a pos…
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
propertiesnull | arraythe properties to read by their KerML/SysML specification names, as inheritedFeature, connectorEnd, isComposite; empty reads every property the element carries
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

evaluate

Evaluate a SysML expression against a parsed model (the Evaluate RPC, the REPL's %eval): arithmetic, feature reads, quantities with units, collection operators. The result is the EvaluateResponse as protojson writes it: `result` is a Value (64-bit integers are JSON strings, as the proto3 JSON mapping writes them), `error` is set when the expression could not be evaluated. The text spells the value as the REPL prints it.

ParameterTypeDescription
expression *stringthe SysML expression, as 2 + 2 or Demo::sedan.mass
contextSymbolIdstringqualified name of the namespace the expression's names resolve in; empty is the model root
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
subjectSymbolIdstringqualified name of a part/usage to instantiate and evaluate against, so a feature reads that object's value rather than its declared default

evaluate_calc

Invoke a calculation (the EvaluateCalc RPC, the REPL's %calc): a calc definition with positional arguments answers its `result`; a calc usage named with no arguments binds its inputs from its own members and answers every output feature in `outputs`. The result is the EvaluateCalcResponse as protojson writes it.

ParameterTypeDescription
symbolId *stringqualified name of the calc definition or usage
argumentsnull | arraypositional arguments, each a protojson Value; a calc usage given none binds its inputs from its own members and answers every output. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":tr…
enginestringthe analysis engine asked; empty is auto
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

execute_action

Run an action definition or usage to completion and report its output parameters (the ExecuteAction RPC, the REPL's %run). Inputs are bound by parameter name. Under an explore schedule every linearization the model admits is run and the answer is the set of distinct `outcomes` with how the exploration ended, instead of one run's outputs. The run is bounded by the service's OPENSYSML_MAX_* budgets; a budget hit is reported in `error`. `advance`, `seed`, `draws` and `clockStep` are the run options of `sysml -advance`, `-seed`, `-draws` and `-clock-step`. With `trace` the answer also carries ever…

ParameterTypeDescription
actionSymbolId *stringqualified name of the action definition or usage to run
advancenull | numbersimulated time in seconds to run for (sysml -advance): the behavior is started and its clock moved by this much; an action not completed by then reports that in error. Unset runs to completion
clockStepnumberthe step in seconds the run's clock ticks by (sysml -clock-step); 0 is a continuous clock
drawsstringhow the run resolves RandomFunctions draws (sysml -draws): random (default, from seed), min, max or average
eventsnull | arraysignals or items to post to the performer in order, each once every token of the run waits (the REPL's %send); needs performerSymbolId
inputsobjectinput parameter name to value; each value is a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}, {"quantity":{"realMagnitude":5.0,"unit":"m"}…
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
performerSymbolIdstringqualified name of a part/usage, or a path from one as Mission::mission.vehicle, whose object the action is performed on; empty performs it outside any object
schedulestringscheduling policy for choice points: declared, reverse (the default), seed:<n>, or explore[:runs=<n>,depth=<d>] which runs every linearization and answers with outcomes
seednull | integerseed the model's own draws (weighted decisions, random functions) are taken from (sysml -seed); the same seed draws the same run
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
tracebooleanalso answer the run's typed trace (token steps, waits, accepts, decisions, assignments, completion), up to a failure; unavailable under explore

execute_state

Run a state machine over a sequence of events and report the states visited, the final context and the simulation clock (the ExecuteState RPC, the REPL's %run on a state). With trace the answer also carries every record the run made (entry, exit, transition, accept, send, choice), up to a failure. Under an explore schedule every linearization is run and the answer is the set of distinct `outcomes`. With `advance` the events are sent and the clock then moved by that much, as `sysml -state X -advance T` does; without it the machine runs to quiescence. The run is bounded by the service's OPENSYSM…

ParameterTypeDescription
stateMachineSymbolId *stringqualified name of the state definition or usage to run
advancenull | numbersimulated time in seconds to run for (sysml -advance): the behavior is started and its clock moved by this much; an action not completed by then reports that in error. Unset runs to completion
clockStepnumberthe step in seconds the run's clock ticks by (sysml -clock-step); 0 is a continuous clock
drawsstringhow the run resolves RandomFunctions draws (sysml -draws): random (default, from seed), min, max or average
eventsnull | arrayevent names to send, in order
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
performerSymbolIdstringqualified name of a part/usage, or a path from one, whose object exhibits the machine; empty runs it outside any object
schedulestringscheduling policy for choice points: declared, reverse (the default), seed:<n>, or explore[:runs=<n>,depth=<d>]
seednull | integerseed the model's own draws (weighted decisions, random functions) are taken from (sysml -seed); the same seed draws the same run
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
tracebooleanalso answer the run's typed trace (entries, exits, transitions, accepts), up to a failure; unavailable under explore

explain

Ask an SMT solver which conditions of an unsatisfiable element conflict (%explain, experimental): a minimal set of conditions, each with the element declaring it and its location.

ParameterTypeDescription
name *stringqualified name of the constraint, requirement, satisfaction, part or analysis case
sessionstringsession name; omit for the default session

explain_diagnostic

Explain a diagnostic code (as the CLI's -explain does): what it means, how to resolve it and the specification clause or validation constraint behind it. Every diagnostic the `parse`, `diagnostics` and `workspace_diagnostics` tools report carries one of these codes. With no code, list every code with its one-line summary.

ParameterTypeDescription
codestringthe diagnostic code, as a diagnostic's code field or a text line's error[code] carries it; empty lists every code with its one-line summary

export_graphs

Export the lowered graph of an action or state machine — the subject's and every behavior it performs — as the canonical graphs:<version> JSON external analysis engines read (the ExportGraphs RPC). The result is the ExportGraphsResponse as protojson writes it, the JSON in `content`; the text names the subject and version on its first line and carries the JSON after it.

ParameterTypeDescription
subject *stringqualified name of an action or state machine, definition or usage
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

features

Show an object's feature values and what its behaviors are doing (%features): the values its attributes hold, the objects its parts and ports hold, its connectors, and the state of each machine it exhibits and action it performs. Objects come from repl_command `%instantiate <name>` or from runs.

ParameterTypeDescription
object *stringan object the session holds: its name, #id, or a path such as car.fl or #1.wheels[2]
allbooleanexpand every nested object; overrides depth
depthnull | integerexpand nested objects to this depth without a size bound; omit for the prompt's bounded listing
sessionstringsession name; omit for the default session

format

Format a SysML v2 / KerML document, or only the lines of a range, in the canonical style. Returns the edits and the resulting text; writes the file only with apply=true. A document that does not parse is left unchanged.

ParameterTypeDescription
path *stringthe document to format, absolute or relative to the workspace root
applybooleanwrite the formatted text to the file, replacing it atomically (its mode is kept, other inode metadata is not); false (the default) only returns the edits
rangenull | objectformat only the lines this range touches; omitted, the whole document

hover

Explain the element at a position: its kind, qualified name, type, value and documentation, as Markdown.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root; a sysml://stdlib/<file> URI for a standard library document
position *objectthe position (1-based line and character column)

import_data

Set the feature values a CSV, TSV, JSON or JSON Lines file assigns, one row per element (the ImportData RPC, the CLI's -import with -import-as, -import-map, -import-format and -import-dry-run): a feature the element declares has its value set, one it inherits is redefined in the element's body with the value, as one edit per file; a value the model refuses leaves every row unapplied and answers `error`. `files` carry each assignment with the element, feature, value and the inherited feature it redefines; the edited text comes back as `content` (one document) or `documents` with the `modelHash`…

ParameterTypeDescription
imports *null | arraythe data files, applied in order as one edit each
acceptDocumentsbooleanaccept every edited document in documents when the model has several
importAsstringwhat each row is made into (the CLI's -import-as): values, the default, sets the features of the element the row names
importDryRunbooleanreport the values the imports would set, changing nothing (the CLI's -import-dry-run)
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

import_diagram

Import a draw.io (diagrams.net) file that render_view wrote with form drawio and a user edited in draw.io: what moved, resized, folded, re-routed or recoloured, the page size, a note's text and a picture's file become DiagramLayout annotations (Layout, Route, Style, Canvas, Note, Picture) in the view's body, and a name retyped in a node, port or edge label becomes a rename of the element, declaration and references alike, applied as apply_model_edit applies its operations. Cells the rendering lacks, cells naming no element, deleted cells, a label edited beyond its name, an invalid or taken nam…

ParameterTypeDescription
path *stringthe document declaring the view, absolute or relative to the workspace root
applybooleanwrite the edits to disk; omitted, a dry run answering the edits and the text changes they amount to
contentstringthe draw.io file's text, as render_view form drawio wrote it and draw.io saved it, compressed or not; alternative to file
filestringthe draw.io file to import, absolute or relative to the workspace root; alternative to content
inlinebooleanwrite the annotations beside the elements rather than in the view's body
viewstringthe view to import when the file has several pages; omitted, the one page's view

inlay_hints

List the inferred types and values the editor would show inline for the features of a document or range.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root
rangenull | objectthe lines of interest (1-based); omitted, the whole document

instance_paths

List every root-relative usage path that reaches one object the model's population holds (the InstancePaths RPC): from each object instantiate created, the features walked to reach it, aliases through connector ends and reference usages included, in traversal order. The result is the InstancePathsResponse as protojson writes it.

ParameterTypeDescription
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
objectobjectthe object as a protojson DocumentObject: {"instanceId":"2"} with the id instantiate answered, or {"path":"Garage::car.wheels[2]"} with the qualified name it was instantiated as, its id (#2), or a pat…
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

instances

List the objects a session holds (%instances): each with its id, type and lifetime, the ones a later instantiation displaced included.

ParameterTypeDescription
sessionstringsession name; omit for the default session

instantiate

Build an object of a part definition or usage and report its feature values (the Instantiate RPC, the REPL's %instantiate): every attribute's value or default, nested parts as instance ids, with every reachable instance in `instances`. The service keeps the object for the model: run_document_query on the same modelHash can bind it. The result is the InstantiateResponse as protojson writes it.

ParameterTypeDescription
symbolId *stringqualified name of the part definition or usage to instantiate
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

list_engines

List the analysis engines this build registers (the ListEngines RPC, as the CLI's -engines does): each with the questions it answers (evaluate, outcomes, holds, sensitive, satisfiable, sweep, compute), the strongest evidence it can produce, the bounds it takes, and whether it can run here. The names are what the verification tools' `engine` argument takes; empty there means auto. With `probe` each external engine is started once and checked against its manifest, as `sysml -engines -probe` does. The result is the ListEnginesResponse as protojson writes it.

ParameterTypeDescription
probebooleanstart each external engine's process once and check its handshake against its manifest, reporting the outcome as its status (sysml -engines -probe); false starts nothing

migrate

Migrate a SysML v1 model — UML XMI with the SysML profile, an Eclipse UML2 .uml file or a Cameo/MagicDraw .mdzip archive — to SysML v2 in one of the representations convert writes (the Migrate RPC, the CLI's -migrate). Migration is not lossless: every v1 element is mapped, approximated, left unmapped or skipped, and `report` accounts for each. Nothing is written to disk: the migrated model comes back as `content`, with any image files it refers to in `files`. The result is the MigrateResponse as protojson writes it.

ParameterTypeDescription
toFormat *stringformat to write: sysml, kerml, text, ttl, turtle, rdf, api-json or json
contentnull | stringthe v1 document inline, base64-encoded (an .mdzip archive is binary); fromFormat must then say what it is
filePathstringthe v1 model file to migrate (.xmi, .uml or .mdzip), absolute or relative to the workspace root
fromFormatstringxmi (UML XMI 2.5.1 with the SysML profile), uml (Eclipse UML2) or mdzip (Cameo/MagicDraw); empty infers from filePath's extension
imageBaseUrlstringabsolute http(s) URL a server-relative image reference in a v1 comment is resolved against
layoutContentstringthe MTIP export inline, instead of layoutPath
layoutPathstringan MTIP export of the model's diagrams (Model_mtip.xml) laying the migrated views out, absolute or relative to the workspace root
reportbooleancarry every element's verdict (mapped, approximated, unmapped, skipped) and the report text; the summary and counts come regardless
resultsbooleancarry the result snapshots the v1 tool stored with the model, as sysml -compare-results reads them
strictbooleanwrite only notation a pinned SysML v2 production admits; a construct whose only v2 form is an OpenSysML extension is reported unmapped instead

open_document

Hold a document open with the given text, as an editor buffer the server analyzes instead of the file on disk, so text can be checked (diagnostics, hover, render) before it is written. Nothing is written to disk; close_document reverts to the file. format, rename and apply_model_edit with apply=true write the buffer, unless the file changed on disk since it was opened. Returns the diagnostics of the text.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root; it need not exist on disk yet
text *stringthe full text to hold as the document's content

optimize

Ask an SMT solver for the best values an analysis case's objectives admit (%optimize, experimental), each objective improved as its trade-study definition says, within the case's conditions.

ParameterTypeDescription
name *stringqualified name of the constraint, requirement, satisfaction, part or analysis case
sessionstringsession name; omit for the default session

parse

Parse SysML v2 / KerML documents as one model and return its modelHash, the root namespace of each document and every diagnostic (the ParseSources RPC). Parsing is content-addressed: the same documents give the same modelHash, and the hash is what every other runtime tool takes as modelHash, so parse once and pass the hash, or give those tools the same paths/sources and they parse implicitly. A model is only readable when no diagnostic has severity error. The result is the ParseSourcesResponse as protojson writes it; the text lists each root and the diagnostics as the CLI prints them.

ParameterTypeDescription
baseModelHashstringthe modelHash of an earlier parse of these documents; the answer's affected then lists the documents whose results may differ from it
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root; a name declared in one resolves in the others
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

query

Select elements of a parsed model with a SysML v2 API & Services Query — scope, select, where, orderBy — or OSLC query text (the Query RPC), run as a document-query plan over the model's elements, or over the objects instantiate created when @type names an element (rdf:type=elmt:<id>). Each matched element answers its qualified name, metamodel type and the properties select asked for; an object answers its path too. A query the service cannot evaluate fails with INVALID_ARGUMENT and a QueryOutcome detail rather than answering empty. asView also writes the answer as a QVTS::QueryResult view…

ParameterTypeDescription
asViewbooleanalso write the answer as a QVTS::QueryResult view, in resultView; needs the query_result_view capability
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
oslcQuerystringOSLC Query 3.0 parameter text, instead of query
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
queryobjectthe standard's Query as protojson writes it: {"scope":[qualified names],"select":[properties],"where":{"primitive":{"property":"@type","operator":"PRIMITIVE_OPERATOR_EQUAL","value":["PartUsage"]}},"or…
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

record_run

Run an analysis case — once, over the rows of a sweep (`ranges`), or as a Monte Carlo sample (`runs`) — and record the runs into the model as AnalysisRecords declarations (the RecordRun RPC, the CLI's -record-run/-record-into, the REPL's %record). `run`, `sweep` or `sample` is the runs' own report; `package`, `definition` and `records` name what the model gained and `source` is the declarations generated; `documents` (and `content` for a single document) is the notation of the document the records merged into, or the records as a document of their own, and `modelHash` names the recorded mo…

ParameterTypeDescription
analysisSymbolId *stringqualified name of the analysis case definition or usage to run and record
acceptDocumentsbooleanread the recorded notation from documents rather than content; required for a model of several documents
argumentsnull | arraypositional values for the case's in parameters, each a protojson Value
enginestringthe analysis engine asked, as list_engines names them; empty is auto
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
namedArgumentsobjectvalues for the case's in parameters by name, each a protojson Value
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
rangesnull | arrayranges of the case's parameters to run it over as run_sweep does, recording each completed row; each a protojson SweepRange
recordIntostringpackage the records go into (-record-into); empty is a Records package beside the package enclosing the case's own
runsintegerrun the Simulation::MonteCarlo case this many times as run_runs does and record each completed run and the sample's conclusion (-runs)
seednull | integerseed of the sample's draws; required with runs
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
subjectSymbolIdstringqualified name of a part/usage to instantiate as the subject, or a path from one to a nested object

references

Find every place in the workspace that refers to the element at a position.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root; a sysml://stdlib/<file> URI for a standard library document
position *objectthe position (1-based line and character column)
includeDeclarationbooleanalso list the declaration itself

rename

Rename the element declared or referenced at a position, everywhere in the workspace. Returns the edits per document; writes the files only with apply=true.

ParameterTypeDescription
newName *stringthe new name
path *stringthe document, absolute or relative to the workspace root
position *objecta position on the name to rename (1-based line and column)
applybooleanwrite every affected file, all or none, each replaced atomically (its mode is kept, other inode metadata is not); false (the default) only returns the edits

render_document

Render a document definition (doc def) to Markdown, its queries evaluated over the workspace and its diagrams embedded.

ParameterTypeDescription
name *stringthe qualified name of a document definition (doc def), as documents lists
diagramFormstringthe notation of every graph-shaped diagram block: mermaid, dot, plantuml or d2; omitted, chosen per diagram as the CLI chooses it
linkTemplatestringa template for source links on elements, with {file}, {line}, {col}, {qname} and {id} placeholders
shownull | arrayoptional notation elements every diagram draws besides those its view and diagram block show: parameter-symbols, port-symbols, compartments, edge-labels, keywords, multiplicities, typings, qualifiers,…

render_model_document

Render a named document of a model given by modelHash, paths or sources (the workspace group's render_document renders by name over the root) — a part def specializing DocumentQueries::Document — to Markdown, HTML or AsciiDoc (the RenderDocument RPC, the CLI's -render-document), byte for byte what the CLI writes. The text is the rendered document; the result is the RenderDocumentResponse as protojson writes it.

ParameterTypeDescription
documentId *stringqualified name of the document, a part def specializing DocumentQueries::Document
formstringmarkdown (the default), html or asciidoc
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

render_model_view

Render a declared view or a targeted pseudo-view of a model given by modelHash, paths or sources as diagram data (the RenderView RPC; the workspace group's render_view renders by name over the root): nodes flattened parents first, edges with their ports, table columns and rows, canvas, notes and notices. With `form` the rendering is also written as text, Mermaid, Markdown, Graphviz dot, PlantUML, D2, draw.io, CSV or TSV, exactly as `sysml -render` writes it; a QVTS::QueryResult view is written as a document of its header and rows in Markdown, HTML or AsciiDoc. The result is the RenderViewRespo…

ParameterTypeDescription
view *stringa qualified view name, or a #<kind>:<qualified name> pseudo-view targeting an element (#interconnection:Demo::Vehicle, #tree:Demo, #state:Demo::Lamp, #action:Demo::Descend, #sequence:..., #case:..., #…
compartmentsstringhow a tree rendering folds a node's owned members into compartment rows of its parent: positioned (the default), most or ports, as sysml -render-compartments takes them
depthintegerhow many levels of nested elements to draw below each exposed element, overriding the view's own depth; 0 or absent draws every level
directionstringflow direction of a graph-shaped form: TB, LR, RL or BT; absent leaves each kind's default
formstringform to write the rendering in besides its data, as sysml -render-form takes them: text, mermaid, markdown, dot, plantuml, d2, drawio, csv or tsv, and for a QVTS::QueryResult view markdown, html or as…
linesstringedge routing of the dot or plantuml form, as sysml -render-lines takes them: splines (the default), ortho or polyline
linkstringsource link template each node and edge of the written form carries, as sysml -render-link takes it, with placeholders {file}, {line}, {col}, {qname} and {id}
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
palettestringpalette the written form fills nodes from, as sysml -render-palette takes them; absent draws in black and white
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
portsstringminimal (the default) or full: how many of a part's ports are drawn
shownull | arrayoptional notation elements to draw besides those the view's rendering shows, as sysml -render-show takes them: parameter-symbols, port-symbols, compartments, edge-labels, keywords, multiplicities, typ…
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
stylestringdrawing style of the dot or mermaid form, as sysml -render-style takes them: pilot (the default) or cameo
unplacedstringwhere a graph form of a positioned view puts the nodes no layout places, as sysml -render-unplaced takes them: omit (the default) or strip

render_run

Render the run a session recorded as a state timeline or a message sequence (%render-run), in a text, diagram or SVG form. Recording must be on before the run: repl_command `%trace record` keeps the trace for this tool without echoing it into every later result (`%trace on` records and echoes it). At most limit spans or messages are drawn, 200 when omitted.

ParameterTypeDescription
kind *stringtimeline (state occupancy per object machine over clock time) or sequence (the messages sent)
formstringtext (default), mermaid, plantuml, svg (a self-contained SVG drawing) or svg-animated (the SVG replaying the run with SMIL)
limitintegerthe most spans or messages drawn, 200 when omitted; a rendering cut short says so in a notice and names the instants not drawn
sessionstringsession name; omit for the default session

render_view

Render a diagram or table of a document: a declared view or a pseudo-view, as Mermaid, Graphviz dot, PlantUML, D2, draw.io (diagrams.net XML), text, Markdown, CSV or TSV. The result also lists the nodes and edges drawn with their qualified names (for apply_model_edit) and their declaration ranges in LSP form (0-based).

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root
compartmentsstringhow a tree rendering folds a node's owned members into compartment rows of its box: positioned (the default, only the layout-less members of a tree some Layout positions), most (every owned usage no L…
depthintegerhow many levels of nested elements a tree or interconnection rendering draws below each exposed element, overriding the view's depth attribute; omitted or 0 keeps the view's own depth
formstringthe artifact's notation: mermaid, dot (Graphviz), plantuml, d2, drawio (an uncompressed diagrams.net file), text, markdown, csv or tsv; omitted, markdown for a table or matrix and mermaid otherwise
linesstringhow dot and plantuml route edges: splines (the default), ortho or polyline
linkTemplatestringa template for source links on elements, with {file}, {line}, {col}, {qname} and {id} placeholders
overlaystringverdicts, on a requirement rendering: runs the verification cases and colors each requirement by its verdict; omitted runs nothing
palettestringfill colors by keyword family for dot/mermaid/plantuml/d2/drawio: okabe-ito, tol-bright, tol-muted, tol-light, brewer-set2, brewer-dark2, viridis or cividis; omitted draws black and white
portsstringports drawn on an interconnection or mixed rendering: minimal (the default, only connected ports) or full (every port, labelled name : Type)
shownull | arrayoptional notation elements drawn besides the ones the view's rendering shows: parameter-symbols, port-symbols, compartments, edge-labels, keywords, multiplicities, typings, qualifiers, or all; port sy…
stylestringthe drawing style of dot/mermaid: pilot (the default, the Pilot visualizer's look) or cameo (Cameo Systems Modeler's)
viewstringthe qualified name of a view the document declares, a pseudo-view such as #tree, #interconnection, #state, #action, #sequence or #tree:Pkg::Part (see the views tool), or omitted for the one view the d…

repl_command

Run one sysml prompt command (a % line) in a session and return what it printed. Prefer the typed tools, which return the same data structured: session_load/session_submit/session_eval/session_print/session_save/session_clear, session_run, debug_*, send, advance, features, instances, check/explain/solve/configure/optimize, sweep, runs, render_run. This tool reaches everything else the prompt can do — %instantiate, %invoke, %constraint, %requirement, %satisfy, %validate, %calc, %analysis, %record, %import, %run-query, %render, %viz, %render-document, %trace, %schedule, %seed, %engine, %jobs,…

ParameterTypeDescription
line *stringone meta command line as typed at the sysml prompt, starting with %, e.g. %list, %help, %instantiate Demo::car, %features car all
sessionstringsession name; omit for the default session

run_analysis

Run an analysis case (the RunAnalysis RPC, the REPL's %analysis): its subject and inputs bound from the arguments and its own declarations, its body run, every declared output answered with the verdict of its objective and of each assertion in its body; a verification case also answers its own verdict. A trade study's evaluations of each alternative are in `evaluations`. Under an explore schedule the answer is the set of distinct `outcomes`. Bounded by the service's OPENSYSML_MAX_* budgets. The result is the RunAnalysisResponse as protojson writes it.

ParameterTypeDescription
symbolId *stringqualified name of the analysis case definition or usage
argumentsnull | arraypositional values for the case's input parameters, each a protojson Value; the subject is never among them. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"},…
enginestringthe analysis engine asked; empty is auto
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
namedArgumentsobjectvalues for input parameters by name, each a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}, {"quantity":{"realMagnitude":5.0,"unit":"m"}},…
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
schedulestringscheduling policy for choice points: declared, reverse (the default), seed:<n>, or explore[:runs=<n>,depth=<d>]
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
subjectSymbolIdstringqualified name of a part/usage to instantiate as the case's subject, or a path from one; empty leaves the case's own subject binding to supply it
toolDryRunbooleanrun the case only to the first external tool call its ToolExecution names and answer what the tool would be given in toolDryRun, without starting it (sysml -tool-dry-run); refused under explore

run_document_query

Run a named document query, or a query expression written in inlineQuery in place of a name, with parameter bindings and answer its typed rows (the RunDocumentQuery RPC, the REPL's %run-query); asView also writes the answer as a QVTS::QueryResult view, in resultView, and a failed query's error carries its view after resultView:. The query runs over the model and over the objects instantiate created for the same modelHash, which a binding may name. The result is the RunDocumentQueryResponse as protojson writes it; the text is the table.

ParameterTypeDescription
asViewbooleanalso write the answer as a QVTS::QueryResult view, in resultView; needs the query_result_view capability
bindingsnull | arrayentry-parameter bindings, each a protojson DocumentQueryBinding {"parameter":name,"values":[DocumentValue]} where a DocumentValue is {"elementId":qualified name}, {"stringValue":..}, {"intValue":".."}…
inlineQuerystringa query expression run in place of a named query — the body of such a calc def, e.g. Project(WhereType(Descendants(Named("Vehicles")), "PartUsage"), ("name", "mass")) — with the DocumentQueries li…
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
queryIdstringqualified name of the document query, a calc def specializing DocumentQueries::Query; one of queryId and inlineQuery
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

run_runs

Run an action, or a Simulation::MonteCarlo analysis case, a number of times (the RunRuns RPC, the CLI's -runs/-observe, the REPL's %runs): every run is an ordinary run in a context of its own, drawing its modeled randomness from a seed derived from `seed`. `rows` is the table, one row per run with the run number as its input and what it observed as its outputs; `distributions` summarises each observable over the completed runs (extremes, mean, deviation, percentiles, histogram, or the count of each distinct value); for a case `outputs` and `verdicts` are its conclusion over the sample and `unc…

ParameterTypeDescription
runs *integerhow many runs to make (-runs); positive
actionSymbolIdstringqualified name of the action to run; give this or analysisSymbolId
analysisSymbolIdstringqualified name of the Simulation::MonteCarlo analysis case, definition or usage; give this or actionSymbolId
argumentsnull | arraypositional values for the case's in parameters, each a protojson Value
clockStepnumberclock step of each run; 0 keeps the default (-clock-step)
drawsstringdraw policy for the model's distributions: random (the default), min, max or average (-draws)
enginestringthe analysis engine asked, as list_engines names them; empty is auto
inputsobjectthe action's input parameter name to value, each a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
namedArgumentsobjectvalues for the case's in parameters by name, each a protojson Value
observenull | arrayfeatures of the action each run reports, clock for the time it completed at; empty reports every feature and the clock (-observe). Not for a case, which observes what it declares
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
performerSymbolIdstringqualified name of a part/usage, or a path from one, whose object performs the action; empty performs it outside any object
seednull | integerseed the runs draw their modeled randomness from, one derived seed per run; required unless draws is min, max or average
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
subjectSymbolIdstringqualified name of a part/usage to instantiate as the case's subject, or a path from one to a nested object

run_sweep

Run an analysis case or calc once per row of a parameter sweep (the RunSweep RPC, the CLI's -sweep): each row an ordinary run with the swept parameters bound to that row's values, stepped through the ranges' cartesian product or drawn with samples and seed. A failed row is a row with `error`, not a failed table. Bounded by the service's OPENSYSML_MAX_* budgets. The result is the RunSweepResponse as protojson writes it; the text is the table.

ParameterTypeDescription
symbolId *stringqualified name of the analysis case or calc, definition or usage
argumentsnull | arraypositional values every row binds, each a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}, {"quantity":{"realMagnitude":5.0,"unit":"m"}}, {"…
enginestringthe analysis engine asked; empty is auto
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
namedArgumentsobjectvalues every row binds by name, each a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}, {"quantity":{"realMagnitude":5.0,"unit":"m"}}, {"enu…
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
rangesnull | arraythe ranges swept, each a protojson SweepRange {"parameter":name,"start":Value,"end":Value,"step":Value}; several make one row per point of their cartesian product
samplesintegerrows to draw uniformly from each range instead of stepping through it; 0 steps, above 0 needs seed and refuses a range with a step
seedintegerseed the draws are taken from; required with samples
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
subjectSymbolIdstringqualified name of a part/usage to instantiate as an analysis case's subject, or a path from one

runs

Run an action count times, each run's modeled randomness seeded on its own, and return the table of the observables with each one's distribution (%runs); or run a Simulation::MonteCarlo analysis case count times on fresh subjects and conclude it.

ParameterTypeDescription
count *integerhow many runs
name *stringqualified name of the action or case
argumentsnull | arrayfor case: argument expressions
kindstringaction (default): run an action count times and table the observables; case: a Simulation::MonteCarlo analysis case, run count times on fresh subjects and concluded
objectstringfor action: the object performing it; for case: its subject
observablesnull | arrayfor action: the features to table with their distributions; every feature the action holds and the clock when omitted
seednull | integerseed each run's modeled randomness derives from; omit for the session's
sessionstringsession name; omit for the default session

self_check

Apply the SysMLValidation constraints, and those of any rule packages named, reflectively to every element of a model (the SelfCheck RPC, the CLI's -self-check and -self-check-package): each element is handed to every constraint whose input its metaclass conforms to. `status` is holds, fails or unresolved; `findings` carry each violation, evaluation the runtime could not make, error and skipped rule constraint with the element's location and the line the CLI prints; the counts and `applications` say how much was checked. The result is the SelfCheckResponse as protojson writes it.

ParameterTypeDescription
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
selfCheckPackagenull | arrayqualified names of packages whose constraint definitions apply after the bundled SysMLValidation ones (-self-check-package); each must be a package the model or its libraries declare
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

send

Send a signal to an object through the runtime's message bus (%send), for the state machine it exhibits or the action parked at a matching accept to take; by default to the object whose behavior is being debugged. The signal is refused when no behavior of the object accepts it now. It is dispatched by the next debug_step or advance.

ParameterTypeDescription
signal *stringthe signal's definition, qualified if needed
argumentsnull | arraythe signal's feature values, written parameter=expression
sessionstringsession name; omit for the default session
tostringthe receiving object (name, #id or path); omit for the object whose behavior is being debugged

server_info

Report the OpenSysML runtime's version and the named capabilities this build supports.

session_clear

Reset a session, as %clear does: every declaration, object and debugging session goes; the session stays open and empty.

ParameterTypeDescription
sessionstringsession name; omit for the default session

session_close

Close a REPL session of your own, discarding its model, instances and any run in progress; with owner, another principal's session, which takes the sysml:admin scope.

ParameterTypeDescription
ownerstringthe principal whose session to close, as session_list's all names it; needs the sysml:admin scope; omit for one of your own
sessionstringsession name; omit for the default session

session_eval

Evaluate an expression in a session, as %eval does: a literal, a declared feature or qualified name, an enumeration literal, a unit, or a compound expression over the session's declarations. Returns the value as data and as the prompt prints it.

ParameterTypeDescription
expression *stringa SysML expression: a literal, a feature or qualified name, or a compound expression over the session's declarations
sessionstringsession name; omit for the default session

session_list

List your open REPL sessions; with the sysml:admin scope, every principal's as well, each with its owner.

session_load

Load model files into a session, as %load does: files, directories or globs, resolved against the workspace root and refused outside it. Every file is accepted before the model is analyzed, so load order does not matter, and files beside the paths that declare a namespace they import load too. Returns what loaded and the diagnostics.

ParameterTypeDescription
paths *null | arrayfiles, directories (walked for .sysml/.kerml/.ipynb) or glob patterns, relative to the workspace root or absolute; a path outside the root is refused
sessionstringsession name; omit for the default session

session_open

Open a named REPL session: an empty model that declarations, instances and runs accumulate into across calls. The default session opens itself on first use, so this is only needed for a second, independent session, or for one with a root: a directory under the workspace root whose model files load on demand, as %load would load them, when a submission imports or qualifies a root namespace that neither the session nor the library declares.

ParameterTypeDescription
rootstringdirectory under the workspace root, relative to it or absolute, whose model files load when a submission imports or qualifies a root namespace nothing in the session declares; omit to resolve against…
sessionstringsession name; omit for the default session

session_print

Print a session's model as SysML notation, or one named element with its body, as %print does. Comments are kept, and what is printed can be submitted back.

ParameterTypeDescription
namestringqualified name of one element to print with its body; omit for the whole model
sessionstringsession name; omit for the default session

session_run

Run a behavior in a session to completion and report what it produced: an action (%action then %continue), a state machine (%state, then %advance when a duration is given), a calc (%calc) or an analysis case (%analysis). Objects the run creates stay in the session, and the run's executor stays inspectable with debug_current until the next run or debug_stop. Under %engine check the behavior is checked over every schedule instead.

ParameterTypeDescription
kind *stringwhat to run: action, state (a state machine), calc or analysis (an analysis, verification or trade-study case)
name *stringqualified name of the behavior
argumentsnull | arrayargument expressions: positional for a calc; positional, in parameter order, or written parameter=expression for an action's inputs or an analysis case
durationnull | numberfor state: advance the machine's clock by this many time units after its initial transition; omit to take the initial transition alone
objectstringan object the session holds (name, #id or path such as car.fl): the performer of an action or state machine, the subject of a case
schedulestringscheduling policy for this run alone: declared, reverse, seed:<n> or explore[:runs=N,depth=D]; omit for the session's
sessionstringsession name; omit for the default session

session_save

Write a session's model to a file under the workspace root, as %save does: .sysml notation with comments preserved, or .ttl/.json RDF (experimental). A path outside the root is refused. Without apply nothing is written and the file's content, in the format the extension names, is returned as content.

ParameterTypeDescription
path *stringfile to write, relative to the workspace root or absolute but under it: .sysml notation, or .ttl/.json RDF (experimental)
applybooleanwrite the file; without it the bytes the file would hold (notation, Turtle or JSON by extension) are returned as content and nothing is touched
sessionstringsession name; omit for the default session

session_submit

Submit SysML declarations to a session, as typing them at the prompt does: the text joins the model, the whole model is re-analyzed, and what it declared and the diagnostics about it come back. Submitting a name again replaces its earlier declaration. For an expression use session_eval; for a % command use repl_command.

ParameterTypeDescription
text *stringSysML v2 (or KerML) declarations, as typed at the prompt; a redeclaration of a name replaces the earlier one
sessionstringsession name; omit for the default session

signature_help

Describe the invocation enclosing a position: the callable's parameters and which one the position is at.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root; a sysml://stdlib/<file> URI for a standard library document
position *objectthe position (1-based line and character column)

solve

Ask an SMT solver for values satisfying an element's conditions (%solve, experimental), keeping the values the model already fixes; reports the conflict when the fixed values admit none.

ParameterTypeDescription
name *stringqualified name of the constraint, requirement, satisfaction, part or analysis case
sessionstringsession name; omit for the default session

sweep

Run a calc or analysis case once per row of the ranges given (%sweep), or over rows drawn from them (%samples), and return the table: each row's inputs, outputs, verdicts and timing. The verdict holds when every run completed and every objective was satisfied.

ParameterTypeDescription
name *stringqualified name of the calc or analysis case
ranges *null | arrayone per swept parameter, written parameter=from..to[:step]; the rows are the cartesian product
argumentsnull | arrayargument expressions fixed for every row, positional or parameter=expression
objectstringthe case's subject, an object the session holds
samplesnull | objectdraw rows uniformly from the ranges instead of stepping them
sessionstringsession name; omit for the default session

symbol

Describe one element of a parsed model by qualified name or, with lookup, by a reported id (the GetSymbol RPC): its kind, metadata, children, members (own, then inherited with the type each comes from; standard-library ones withheld unless asked for), attributes with their declared values, static type facts, multiplicity and specializations. An unknown name answers with `error` set rather than failing. The result is the SymbolResponse as protojson writes it.

ParameterTypeDescription
symbolId *stringthe element's qualified name, as Demo::Vehicle::mass
includeLibraryMembersbooleanlist the members inherited from standard-library content too, which are otherwise withheld and counted
lookupstringwhat symbolId is, stated rather than guessed: LOOKUP_KIND_QUALIFIED_NAME reads it only as a qualified name, LOOKUP_KIND_ELEMENT_ID only as an id an answer reported (a childIds or members entry, a posi…
memberOfstringthe type the element is read as a feature of, as Demo::Vehicle::fuelPort: the direction reported is then the one relative to that type, which a conjugated port typing reverses
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
resolveNamebooleanresolve symbolId as a qualified name from the root namespace as the notation does: through imports, an alias answered by the element it names, a member not visible from outside its namespace not found…
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

tool_catalog

List the tools this server serves: each tool's name, group, the scope a caller needs to call it, the sysml-grpc RPC or `sysml` CLI flag it stands for, and a one-line summary. Pass `group` (lsp, runtime, session) to narrow the list. The same catalog generates the Tools section of the sysml-mcp manual page.

ParameterTypeDescription
groupstringanswer only this group's tools: lsp, runtime or session

update_document

Replace the text of a document held open by open_document and re-analyze it. Nothing is written to disk. Returns the diagnostics of the new text.

ParameterTypeDescription
path *stringan open document, absolute or relative to the workspace root
text *stringthe full new text of the document

validate_instance

Validate an object of a part as a whole (the ValidateInstance RPC, the REPL's %validate): every assertion about an object of symbolId and about the objects it holds — asserted constraints of their types, the requirements they carry, the satisfactions they are the subject of — each answered on the concrete object, with a `summary` verdict about the object as a whole. The result is the ValidateInstanceResponse as protojson writes it.

ParameterTypeDescription
symbolId *stringqualified name of the part or usage an object of which is validated
enginestringthe analysis engine asked; empty is auto
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning

verify_constraint

Ask whether a constraint holds (the VerifyConstraint RPC, the REPL's %constraint): against its declared values, or against an object of subjectSymbolId built for the call. The answer is a Verdict: `holds`, the violated `condition`, or an `error` when nothing was decided, with the engine and strength of evidence. The question holds or satisfiable puts it to a solver over the free variables and answers with a witness assignment. The result is the VerifyConstraintResponse as protojson writes it.

ParameterTypeDescription
symbolId *stringqualified name of the constraint or requirement, definition or usage
argumentsnull | arraypositional values for the element's in parameters, each a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}, {"quantity":{"realMagnitude":5.0,…
enginestringthe analysis engine asked, as list_engines names them; empty is auto
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
namedArgumentsobjectvalues for the element's in parameters by name, each a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}, {"quantity":{"realMagnitude":5.0,"un…
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
questionstringevaluate (the default: one evaluation), holds (prove over every free assignment) or satisfiable (find one satisfying assignment)
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
subjectSymbolIdstringqualified name of a part/usage to instantiate and evaluate against, or a path from one to a nested object; empty evaluates declared values

verify_requirement

Ask whether a requirement is satisfied (the VerifyRequirement RPC, the REPL's %requirement): its require constraints evaluated against declared values or against an object of subjectSymbolId. Beside the Verdict the answer carries what every verification case verifying the requirement concluded (pass, fail, inconclusive, error). The result is the VerifyRequirementResponse as protojson writes it.

ParameterTypeDescription
symbolId *stringqualified name of the constraint or requirement, definition or usage
argumentsnull | arraypositional values for the element's in parameters, each a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}, {"quantity":{"realMagnitude":5.0,…
enginestringthe analysis engine asked, as list_engines names them; empty is auto
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
namedArgumentsobjectvalues for the element's in parameters by name, each a protojson Value. Example arms: {"intValue":"7"}, {"realValue":1.5}, {"boolValue":true}, {"stringValue":"x"}, {"quantity":{"realMagnitude":5.0,"un…
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
questionstringevaluate (the default: one evaluation), holds (prove over every free assignment) or satisfiable (find one satisfying assignment)
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
subjectSymbolIdstringqualified name of a part/usage to instantiate and evaluate against, or a path from one to a nested object; empty evaluates declared values

verify_satisfaction

Evaluate the satisfy assertions a model states (the VerifySatisfaction RPC, the REPL's %satisfy): each against an object of its subject built for the call, answering one Verdict per assertion in declaration order. A model stating no assertion answers an empty list, not an error. The result is the VerifySatisfactionResponse as protojson writes it.

ParameterTypeDescription
enginestringthe analysis engine asked; empty is auto
modelHashstringthe model_hash a parse answered; give this, or paths and/or sources to parse first
pathsnull | arraymodel files to parse as one model, absolute or relative to the workspace root
questionstringevaluate (the default), holds or satisfiable
sourcesnull | arraydocuments given inline, parsed with paths as one model
strictConformancebooleanjudge the documents as conforming SysML v2: notation no pinned production admits is an error rather than a warning
symbolIdstringqualified name limiting the assertions evaluated: those stated within it, or itself when it is a named satisfy; empty evaluates every assertion the model states

views

List the views a document declares and the pseudo-views (#tree, #interconnection, ...) render_view can draw of it.

ParameterTypeDescription
path *stringthe document, absolute or relative to the workspace root; a sysml://stdlib/<file> URI for a standard library document

workspace_diagnostics

Analyze a SysML v2 / KerML document, or the whole workspace, and list the errors, warnings and hints: syntax, unresolved names, type and constraint violations. Positions are 1-based lines and columns.

ParameterTypeDescription
pathstringone document, absolute or relative to the workspace root; omitted, every document of the workspace

workspace_info

Describe the SysML v2 workspace the server has indexed: its root folder and the model documents found under it.

workspace_symbols

Search the workspace's declared elements by name substring.

ParameterTypeDescription
limitintegerat most this many matches; default 200
querystringcase-insensitive substring of the name; empty lists every named element