mcp-laya
v0.1.5Safe-by-default MCP for Laya: fast, local, typed decisions (classify/score/yes-no), 100+ langs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
decide
Answer several typed questions about a state in one local forward pass. Use this to offload System-1 judgment calls from the main model: classification, routing, scoring and yes/no gates over text, an email, a ticket or a JSON object — fast, local, and without hallucination. Each question is one of three types: - choice: {"type":"choice","instructions":"...","criteria":{"labelA":"desc","labelB":"desc"}} - score: {"type":"score","instructions":"...","criteria":["level0","level1","level2"]} - noul: {"type":"noul","instructions":"..."} (yes/no/unknown) Return…
| Parameter | Type | Description |
|---|---|---|
questions * | object | |
state * | ||
model |
classify
Assign the single best category to a state (one `choice` question). Provide either `labels` (a list of category names) or `criteria` (a map of category -> short description; more accurate). Returns the chosen label, calibrated confidence, and the probability over all labels.
| Parameter | Type | Description |
|---|---|---|
state * | ||
criteria | ||
instructions | ||
labels | ||
model |
score
Rate a state on an ordinal scale (one `score` question). `levels` are the ordered rungs, lowest first, e.g. ["not urgent","soon","critical"]. Returns an expected score (0..len-1), the level legend, calibrated confidence, and per-level probabilities.
| Parameter | Type | Description |
|---|---|---|
instructions * | string | |
levels * | array | |
state * | ||
model |
check
Answer a single yes/no/unknown question about a state (a `noul` gate). Returns `answer` (yes | no), the probability of yes (0..1), and calibrated confidence. Ideal for agent control flow: "does the user request a refund?", "is this a security incident?".
| Parameter | Type | Description |
|---|---|---|
instructions * | string | |
state * | ||
model |
triage
Run a ready-made set of decisions over a state using a laya preset. presets: triage (department/urgency/sentiment…), email, moderation (safety categories), guard (prompt-injection / policy gates). Returns all answers with confidence.
| Parameter | Type | Description |
|---|---|---|
state * | ||
model | ||
preset | string |
detect_language
Detect the script and language of a text (sub-millisecond, no model forward pass).
| Parameter | Type | Description |
|---|---|---|
text * | string |
explain_routing
Explain which checkpoint the Router would use for this state, without running inference.
| Parameter | Type | Description |
|---|---|---|
questions * | object | |
state * |
list_models
List the laya checkpoints this server may use, the default, device and offline status.