Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
LAYAMCP_HOSTNo监听地址127.0.0.1
LAYAMCP_PORTNo监听端口8077
LAYAMCP_DEVICENoauto / cpu / cuda / mpsauto
LAYAMCP_MODELSNo常驻 checkpoint,逗号分隔或 allenglish,multilingual
LAYAMCP_WARMUPNo启动时预热加载模型true
LAYAMCP_HF_TOKENNo私有镜像或受限下载时使用
LAYAMCP_LOG_JSONNo结构化 JSON 日志true
LAYAMCP_MCP_PATHNoMCP 挂载路径/mcp
LAYAMCP_LOG_LEVELNoDEBUG / INFO / WARNING / ERROR / CRITICALINFO
LAYAMCP_TRANSPORTNo传输方式: streamable-http / stdio / ssestreamable-http
LAYAMCP_API_PREFIXNoREST 前缀/v1
LAYAMCP_MAX_CHOICESNo单个 choice 问题最大候选数60
LAYAMCP_DOCS_ENABLEDNo是否开启 /docstrue
LAYAMCP_DEFAULT_MODELNo默认 checkpointenglish
LAYAMCP_MAX_QUESTIONSNo单次调用最大问题数32
LAYAMCP_WORKER_THREADSNo推理线程池大小2
LAYAMCP_MAX_STATE_CHARSNostate 最大字符数120000
LAYAMCP_METRICS_ENABLEDNo是否采集指标true
LAYAMCP_MARGIN_THRESHOLDNotop1−top2 低于此值视为「近距平局」→ escalate0.05
LAYAMCP_REQUEST_ID_HEADERNo请求 id 头名称x-request-id
LAYAMCP_AUTO_TASK_DETECTIONNo自动识别语言/脚本/工作流并路由true
LAYAMCP_CONFIDENCE_THRESHOLDNo达到此置信度才可能判为 auto_execute0.80

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": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
decideA

Answer a typed question set about state in one forward pass.

Returns calibrated answers plus a contract directive. Branch on contract.grade: act only when it is auto_execute. Compose a preset with inline questions to answer both in the same pass.

decide_yes_noA

The cheapest useful call: one statement, a calibrated yes/no and a directive.

Phrase statement positively (true = the action you want to take is safe/appropriate). Prefer decide when you have several questions, since extra questions cost almost nothing once the model is loaded.

decide_shortlistA

Pick one of many labels without degrading the prompt budget.

Laya scores every option inside a fixed token budget, so a 200-label choice loses resolution. This embeds the state and each label, keeps the top k, then runs the normal decision pass on those. Use it above ~40 labels, or whenever labels are long. k above the label count is a no-op and reports shortlisted: false.

route_requestA

Detect language/script and workflow, and name the checkpoint that fits.

Microseconds of work, no model download or forward pass. Useful before deciding whether a request needs the multilingual checkpoint at all.

list_presetsA

Question sets you can pass as preset instead of writing your own.

describe_questionsA

Echo a question set back: ids, kinds, options and levels.

Call this when you need the exact option labels before deciding (for example to map the answer back onto code branches).

should_escalateA

One call, one boolean answer: does a human need to see this?

Asks three questions at once (risk, reversibility, whether a human is required), then reduces them to the strictest verdict. Use it as a gate in front of an irreversible step.

server_statusB

Readiness, loaded checkpoints, cache size and latency percentiles.

preload_warmupA

Force checkpoints into memory so later decisions are fast.

Rarely needed: the HTTP server warms up at start. Call it only if you connect over stdio or the server was started with warmup disabled. Loading downloads hundreds of MB the first time, so expect a slow call.

Prompts

Interactive templates invoked by user choice

NameDescription
decide_before_actingFill-in template that turns an intended action into a question set.
triage_messageRoute a message to a team and decide whether it needs a human.

Resources

Contextual data attached and managed by the client

NameDescription
laya-guideQuestion-writing guide, kind reference, and the contract's grade semantics.
laya-question-schemaThe JSON schema accepted by `decide` and `describe_questions`.
laya-presetsEvery preset with its questions, as JSON.
laya-statusLive readiness and latency, same payload as `server_status`.

TDQS

A3.8/5.0

Scored across 9 tools

Disambiguation4/5

Most tools have clearly distinct roles: decide variants differ by input shape (typed questions, single statement, many labels), while route_request, list_presets, describe_questions, and server tools are separate concerns. However, should_escalate and decide_yes_no both produce gate-like boolean verdicts, and an agent could confuse when to use one versus the other despite the descriptions.

Naming Consistency4/5

All names use snake_case, and most follow a predictable verb_noun or verb pattern (decide_yes_no, decide_shortlist, route_request, list_presets, describe_questions, preload_warmup). Minor deviations are should_escalate (modal verb phrase) and server_status (noun phrase), but these are still readable and consistent enough.

Tool Count5/5

Nine tools is well-scoped for a decision/inference server. The surface covers decision making, routing, preset introspection, and server health without excessive redundancy.

Completeness4/5

The set covers core decision workflows (single yes/no, typed questions, shortlisting), routing, preset listing/description, status, and warmup. Minor gaps include no explicit tool to inspect or configure checkpoints beyond status, and no direct way to answer multiple independent statements in one call, but these are workable around.

Maintenance

ActivityMaintained
ResponsivenessNo issues