Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FILAXIS_SSH_STDIO_MODENo运行环境限制匿名管道时,可在启动 CLI 或 MCP 服务前设置 FILAXIS_SSH_STDIO_MODE=inherit。该模式通过临时文件为 SSH 提供标准输入和双流输出。

Instructions

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

【先看这行】多文件读取/多命令巡检/定位排查 → 优先 run_batch(一次调用并行打包,不要逐个工具循环);读工具 schema 时同轮并发读取(逐个读每步一趟 LLM); 持续查看日志 → observe_stream 开窗、read_stream 回看或续读、close_stream 关闭;等就绪或错误模式 → spawn_and_observe; edit_file 支持 write_mode:'inplace'(bind mount 保 inode 免重启); 在 MCP 服务主机与目标层之间传输文件用 put_file 和 get_file。 契约:退出码是数据(非零不是异常);终态三态 exited/stopped/unknown;unknown 后用 stop_and_verify 核实。

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
run_batchA

批次组合:一次调用描述多个文件或命令操作(exec/edit/read/put/get),按依赖边(after)拓扑执行——步骤 layer 可覆盖批次 layer;after 可跨层引用步骤 id。无依赖步骤并行,顺序链靠 after 显式保序;默认任一步失败即停(未启动步骤标 skipped)。返回逐步骤状态与证据(退出码/输出/编辑明细)。不做自动回滚(配置恢复≠运行状态回滚——重载可能已产生外部副作用),失败现场交回调用方决策。

run_commandA

执行会自行结束的一次性命令(多条命令/多文件操作请改用 run_batch 一次并行打包;持续盯实时输出且不关心退出码的命令如 tail -f 请改用 observe_stream 直接启动并流式读取;需后台起停服务、等就绪标记并核实进程退出码的任务请改用 spawn_and_observe)。退出码如实返回(非零不是异常——是数据,供条件分支);只有无法执行(超时/中断/连接死)才报错。stdout 与 stderr 分离返回。

spawn_and_observeA

启动后台任务或常驻服务(输出落盘到 log_base 对应的 .out/.err 文件,立即返回 session_id 与 log_base 句柄不阻塞)。适用于需要等待就绪标记(ready_marker——回溯热窗口,快输出竞态安全)、自动捕获错误模式(error_pattern——命中即收摊)并在结束后用 stop_and_verify 核实进程终态与退出码的场景。若只需持续流式查看实时输出(如 tail -f / 监控日志)并按游标翻页续读,请改用 observe_stream + read_stream。

stop_and_verifyA

停止任务并核实终态。status 三态:exited=拿到退出码;stopped=终止已核实;unknown=核实不可达(非成功非失败——重试核实或显式上报,严禁当已清理)。

read_fileA

只读获取目标层中的 UTF-8 文本文件(不修改远端状态),返回 { path, content, size, mtime_ms }。文件不存在、无权限或层不支持元数据时报错;下载二进制文件请改用 get_file,同时读多个文件优先使用 run_batch,后续受控修改请配合 edit_file。

edit_fileA

受控编辑远端文件:精确替换(唯一命中校验,all=true 全替换)+ TOCTOU 乐观锁(他人先写则拒绝)+ base64 保真写回(零 Shell 转义——绝不 sed -i)。未命中/多处命中/冲突均报错不盲写。返回 write_mode:atomic-replace=原子替换;inplace-write=保留 inode(bind mount 挂载点 mv 不可用降级)——非原子写入,中断可暴露半截。

put_fileA

从 MCP 服务所在机器上传一个文件到目标层。支持二进制,校验后落位,可能覆盖目标文件。返回校验等级和写入形态。

get_fileA

从目标层下载单个文件到 MCP 服务所在机器(支持二进制)。先传输至本地暂存文件并校验大小与 SHA-256 后再落位,校验失败不破坏已有本地文件;成功时会覆盖已存在的 local_path,返回传输通道、字节大小、校验等级 (verification) 与写入形态 (write_mode)。仅读取远端小文本请用 read_file,批量传输多个文件请使用 run_batch。

observe_streamA

直接启动一条持续输出命令并打开本地滚动观察窗,立即返回 window_id(不等待命令结束)。适用于实时盯日志或持续监控输出(如 tail -f、事件流),配合 read_stream 按游标非破坏回看/翻页/续读,完成后用 close_stream 关闭并回收远端流进程。若需后台起停服务、等待就绪标记并核实进程退出码,请改用 spawn_and_observe + stop_and_verify。

read_streamA

读取本地观察窗。可读最近帧、按 before_seq 向前翻页、按 window_ms 回看或按 since_seq 续读。每次续读用 last_delivered_seq,gap 表示游标区间有丢失。

close_streamA

关闭由 observe_stream 打开的本地观察窗,确认终止并回收对应的远端观察流进程与通道资源,返回 { window_id, closed: true }。观察完成后应及时调用以防残留流进程;若 window_id 不存在或已关闭则报错(不影响其他观察窗)。

push_sshA

建立命名 ssh 层(成为默认层——后续工具缺省落它)。同落点幂等复用(reused=true 返回既有层,不重复建连)+ 落点校验(宁重连不错主机)。跳板传 jump(-J 不占层)。

push_intoA

从默认层(或 from 指定层)进入内层 shell(docker exec -i sh / kubectl exec 等)——enter 管线全量继承追加(父层 docker→再 su 不丢)。新层成为默认层。需 ssh 层为源。

list_layersA

列出全部命名层(链路/状态/有效用户/默认层标记)。死层/退化层有警示标注(removeLayer 后按原参数重建)。

remove_layerA

移出命名层(缺省连接保留在指纹缓存——再建同层零成本;destroy=true 才真销毁连接)。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 15 tools

Disambiguation4/5

The execution-oriented tools (run_command, run_batch, spawn_and_observe, observe_stream) overlap conceptually, but their descriptions explicitly cross-reference each other and define crisp boundaries (one-shot vs batch vs background-with-readiness vs live tail). The stream family (observe_stream/read_stream/close_stream) and file family (read/edit/put/get) are cleanly separated. The only residual confusion is choosing between spawn_and_observe and observe_stream, which requires reading the fine print.

Naming Consistency5/5

Every tool follows a snake_case verb_noun pattern (run_command, read_file, edit_file, put_file, get_file, push_ssh, list_layers, remove_layer). Compound verbs like spawn_and_observe and stop_and_verify are a minor stylistic variation but still fit the same convention. The get/put vs read/write vocabulary is used coherently per family.

Tool Count5/5

15 tools map onto four coherent sub-domains: execution (4), files (4), streaming (3), and layers (4). Each tool serves a distinct role in one of these workflows, and the count sits within the well-scoped range for a remote shell/execution platform.

Completeness4/5

Core CRUD and lifecycle are covered: exec (run_command/run_batch), background lifecycle (spawn_and_observe/stop_and_verify), streaming (observe/read/close), files (read/edit/put/get), and layers (push_ssh/push_into/list/remove). Gaps remain: no directory-listing tool, no file delete, and no way to pop/switch back to a prior layer as default. These are largely workaroundable via run_command (ls/rm) or remove_layer, so coverage is strong but not complete.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues