Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LOOMMUX_MONITOR_URLNoOverride the monitor event-ingest URL.
LOOMMUX_MONITOR_DISABLEDNoSet to 1 to disable monitor publishing.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
run_cellA

向持久 IPython kernel 提交一个原始 IPython cell。

请你使用 IPython 的思想来优雅使用本系列工具。

输入

接受一段 loommux IPython cell 源码。普通 Python 文本使用默认策略;若作者 需要声明本次 cell 的观察策略,使用位于物理行首的 # loommux: 控制 注释。Loommux 在提交前验证并完全消费有效控制注释,因此它们不会进入 IPython history 或下游 cell-magic body。变量、导入和其他 namespace 状态会 与当前持久 IPython 会话中的后续 cell 共享。

等待上限

本次调用默认最多等待 10 秒。# loommux:--wait 正有限十进制 值只覆盖本次调用的等待上限::

# loommux: --wait 120
build_report()

# loommux: --wait 120# loommux: --full-output 可写在同一条 或不同的控制注释中。重复选项、未知选项、缺少值或非正值会返回 invalid_loommux_directive,不会分配 execution 或提交 kernel。等待 到期不会中断仍在运行的 cell;directive 不改变 Python runtime 或后续 调用的等待上限。

完整输出

若任一有效 # loommux: 控制注释包含 --full-output,该 execution 在终态时直接交付完整 combined 正文,不受默认 5,000-token 交付阈值限制::

# loommux: --full-output
print("\n".join(generate_manifest()))

--wait--full-output 可以组合为 # loommux: --wait 120 --full-output。这些选项只作用于本次 execution。有效控制注释在提交前被 Loommux 完全消费,不会进入 IPython history、cell magic body 或 execution 响应。在明确需要完整阅读某些信息, 例如阅读某些文件、资料时,使用该选项避免无意义的反复阅读开销。

图像展示

IPython display() 产生的 PNG、JPEG、WEBP 或单帧 GIF 图像会按输出 顺序直接交付给agent。普通 display(image) 使用高视觉细节;本次展示 需要整体确认或密集文字时,分别书写 display(image, metadata={"detail": "low"})display(image, metadata={"detail": "original"})detail 只作用于这一处 display() 调用。

执行编号与后续操作

每个已接受的提交都会获得一个连续递增的正整数 execution。后续工具 使用它定位当前持久 IPython 会话中的这次执行。若执行仍在运行,或未标记 --full-output 的 combined 输出超过 5,000 token,响应不携带完整输出 正文;行数、Unicode code point 字符数和 UTF-8 字节数描述同一份 normalized combined 文本。使用 wait 等待,使用 execution_status 查看状态,使用 read_outputsearch_output 读取或搜索保留的输出。

statusB

返回 workspace、kernel 与最近执行记录的观察状态。

状态范围

返回当前 IPython 工作台启动时解析的 workspace、其 workspace_resolution 来源 类别、Python 解释器、kernel PID、kernel 是否已启动,以及 kernel 是否 正忙。workspace_resolution 只能是 launch_cwdexplicit_config;它不公开 resolver 的路径或内容,也不公开 kernel session 的 private runtime root。忙碌时 current_execution 是正在 运行的正整数执行编号;空闲时 recent_execution 是最近一次被接受的 执行编号。kernel-local execution count 只用于诊断,不能用来选择 loommux execution。

.. code-block:: text

可见标签 In [N]
        =
loommux execution N
        !=
IPython kernel-local execution_count

IPython 通过原生 ZMQ 协议连接,拥有完整能力。

Returns: 当前 IPython 工作台与 kernel 的状态快照。

execution_statusA

返回一个 execution 的状态与元数据,不返回完整输出正文。

选择规则

提供 execution 时,只选择该正整数记录。省略时,先选择当前 running 记录;不存在 running 记录时,选择最近一次被接受的记录; 两者都不存在时返回 execution_not_found

read_outputB

读取一个 execution 的指定输出流。

选择与流

execution 的选择规则与 execution_status 相同。stream 只能为 combinedstdoutstderrresulttraceback

行坐标

line_range 使用 start:stop。正数端点是从 1 开始的流行号, stop 包含在范围内;端点可省略,负数端点从所选流尾部计数。:10 读取前十行,-10: 读取后十行,3:3 只读取第三行。

完整读取

调用者已确定需要完整消费所选流时,省略 line_range。工具会在一次响应 中返回全部行,无需把阅读拆成连续小范围。

search_outputA

在一个 execution 的指定输出流中搜索文本或正则表达式。

选择与匹配

execution 的选择规则与 execution_status 相同;可选的 stream 值与 read_output 相同。query_mode="literal" 按字面文本匹配,query_mode="regex" 要求 query 是有效正则, query_mode="auto" 先按正则解释,仅在编译失败时回退到字面匹配。

命中上下文

每条命中保留原始所选流行号,并以 M 标记;前后上下文行以 C 标记。

waitA

等待一个 execution 结束,或在指定时限到达时返回其当前状态。

选择与等待

execution 的选择规则与 execution_status 相同。等待 到期只结束本次工具调用,不中断 Python cell。后续可再次调用本工具, 或用 read_output 查看已到达的输出。

完整输出交付

当所选 execution 的原始 run_cell 请求含有效 --full-output 且已达到 终态时,本工具直接返回完整 combined 正文,不应用默认 5,000-token 省略。该策略仅保留为 private runtime state;仍在运行的 execution 继续 返回 running,而非不完整正文。

interruptA

向当前正在运行的 execution 发送 kernel 中断信号。

中断语义

该工具只作用于当前 running 记录。信号已发送不等同于记录已终态: kernel 到达 IOPub idle 后,记录才会报告 interruptederror 或其他最终状态。kernel 空闲时返回 idle。

Returns: 已发送信号时返回目标 execution;kernel 空闲时返回 idle。

restartA

重启 IPython kernel,并保留当前持久 IPython 会话的 execution 历史。

重置边界

若存在 running execution,它会先标记为 killed;随后旧 kernel 停止并创建替代 kernel。已存在的记录及其输出流仍可按原整数 execution 读取,下一次接受的 cell 使用连续的下一个编号。

Returns: 新 kernel 的状态与 PID;重启失败时返回 workspace 或 kernel 启动错误。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 8 tools

Disambiguation4/5

Each tool has a distinct role in the IPython execution lifecycle: submit, wait, interrupt, restart, global status, per-execution status, read, and search. The only real ambiguity is between status and execution_status, which are easy to confuse by name even though one is a workspace/kernel snapshot and the other is per-execution.

Naming Consistency4/5

Names are all lowercase snake_case and group logically: action tools are imperative verbs (run_cell, wait, interrupt, restart) and retrieval/query tools are noun or verb_noun forms (status, execution_status, read_output, search_output). The mix of bare verbs and noun-only status names is a minor deviation from a strict verb_noun pattern but remains predictable.

Tool Count5/5

Eight tools is well-scoped for a persistent IPython kernel server: submission, lifecycle control, and output retrieval each have dedicated tools without redundancy. No tool feels superfluous.

Completeness4/5

The core lifecycle is covered: run, wait, interrupt, restart, status, and output reading/searching. A minor gap is the lack of a way to list or enumerate past executions beyond the most recent one, which agents must track themselves.

Maintenance

ActivityActive
ResponsivenessNo issues