Skip to main content
Glama

laya_predict

Execute typed decisions on a text state by evaluating predefined questions, returning choice, score, or noul judgments without text generation.

Instructions

状態に対して typed decision を実行する。

Args:
    state: 判定対象の文章。JSON オブジェクト/配列の文字列でも可。
    questions_json: 質問定義の JSON オブジェクト文字列。各値は type / instructions
        (choice・score は criteria)を持つ。
    model: 使うチェックポイント。省略時はロード済み、なければ既定モデル。
    dtype: float16 または float32。

Example questions_json:
    {
      "department": {
        "type": "choice",
        "instructions": "どの部署が対応すべきか?",
        "criteria": ["billing", "technical", "sales"]
      },
      "urgency": {
        "type": "score",
        "instructions": "緊急度は?",
        "criteria": ["not urgent", "soon", "critical"]
      },
      "refund": {
        "type": "noul",
        "instructions": "返金を求めているか?"
      }
    }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dtypeNo
modelNo
stateYes
questions_jsonYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the behavioral burden. It explains model fallback behavior ('省略時はロード済み、なければ既定モデル') and that state can be a JSON object/array string, which adds operational context. It does not disclose potential side effects, error behavior, or return format, but the inference-oriented purpose is reasonably transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: a one-sentence purpose, an Args block, and a concrete example. The example is somewhat long and includes the unexplained 'noul' type, but overall every section adds useful information without being redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

All four parameters are documented, including optional defaults and input flexibility, and the output schema handles return-value documentation. The main gaps are the unelaborated 'noul' type and lack of explicit error-handling or prerequisite information, but the description is sufficient for constructing a valid call.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must fully compensate. It explains state, questions_json structure (type/instructions/criteria), model default behavior, and dtype allowed values. The example JSON makes the parameter format concrete and is especially valuable for the agent.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear verb+resource statement: '状態に対して typed decision を実行する' (execute typed decision on a state). The state and questions_json arguments make it evident that this is a text-judging/classification tool. It does not explicitly differentiate from laya_status or laya_load, but the operation is conceptually distinct from status/load.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended use is implied: the tool evaluates a state against a question definition, and the parameters show how to construct the call. However, it does not explicitly say when to use this tool instead of laya_status or laya_load, nor does it provide exclusions or alternative conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools