Skip to content

Runtime Mode

Tools for managing runtime mode and inspecting MCP client capabilities.

get_runtime_mode

Check if runtime mode is enabled and what capabilities are available.

Returns

Type: RuntimeModeStatus

Status including enabled state, registered tools, and availability.

Example

status = get_runtime_mode()
# Returns: RuntimeModeStatus(
# enabled=False,
# tools_registered=[],
# docker_available=True,
# oot_available=True
# )

enable_runtime_mode

Enable runtime mode, registering all runtime control tools.

This adds tools for:

  • XML-RPC connection and variable control
  • ControlPort/Thrift for performance monitoring
  • Docker container lifecycle (if Docker available)
  • OOT module installation (if Docker available)

Returns

Type: RuntimeModeStatus

Updated status with newly registered tools.

Example

status = enable_runtime_mode()
# Returns: RuntimeModeStatus(
# enabled=True,
# tools_registered=[
# "launch_flowgraph", "list_containers", "stop_flowgraph",
# "connect", "list_variables", "get_variable", "set_variable",
# ...
# ],
# docker_available=True,
# oot_available=True
# )

Notes

  • Calling when already enabled is a no-op (returns current status)
  • If Docker is unavailable, container-related tools are not registered
  • If Docker is unavailable, OOT tools are not registered

disable_runtime_mode

Disable runtime mode, removing runtime tools to reduce context.

Use this when you’re done with runtime operations and want to reduce the tool list for flowgraph design work.

Returns

Type: RuntimeModeStatus

Updated status showing disabled state.

Example

status = disable_runtime_mode()
# Returns: RuntimeModeStatus(
# enabled=False,
# tools_registered=[],
# docker_available=True,
# oot_available=True
# )

get_client_capabilities

Get the connected MCP client’s capabilities.

Useful for debugging MCP connections and understanding what features the client supports.

Returns

Type: ClientCapabilities

Client information and capability flags.

Example

caps = get_client_capabilities()
# Returns: ClientCapabilities(
# client_name="claude-code",
# client_version="2.1.15",
# protocol_version="2024-11-05",
# roots=RootsCapability(supported=True, list_changed=True),
# sampling=SamplingCapability(supported=True, tools=True, context=False),
# elicitation=ElicitationCapability(supported=False, form=False, url=False),
# raw_capabilities={"roots": {"listChanged": True}, ...},
# experimental={}
# )

Capability Explanations

CapabilityDescription
rootsClient exposes workspace directories
samplingServer can request LLM completions
elicitationServer can prompt user for input

list_client_roots

List the root directories advertised by the MCP client.

Roots represent project directories or workspaces the client wants the server to be aware of.

Returns

Type: list[ClientRoot]

List of root directories.

Example

roots = list_client_roots()
# Returns: [
# ClientRoot(uri="file:///home/user/project", name="project"),
# ClientRoot(uri="file:///home/user/gr-mcp", name="gr-mcp"),
# ]

Notes

  • Returns empty list if roots capability is not supported
  • Typically includes the current working directory