mcp-laya

v0.1.5
io.github.dockndevai/mcp-laya Checked 4 days ago Published 12 days ago

Safe-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…

ParameterTypeDescription
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.

ParameterTypeDescription
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.

ParameterTypeDescription
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?".

ParameterTypeDescription
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.

ParameterTypeDescription
state *
model
presetstring

detect_language

Detect the script and language of a text (sub-millisecond, no model forward pass).

ParameterTypeDescription
text *string

explain_routing

Explain which checkpoint the Router would use for this state, without running inference.

ParameterTypeDescription
questions *object
state *

list_models

List the laya checkpoints this server may use, the default, device and offline status.