schemas

结构化输出模型:AnlasEstimate 与 TagSuggestion。

参见

工具参考

Structured-output models for tools that compute their own results.

Tools that pass a NovelAI payload straight through keep returning dict[str, Any] (an object return already yields structured content, and modelling an upstream payload risks dropping unknown fields). The models here cover only the shapes this server computes itself, so their output schema is precise and stable.

class novelai_image_mcp.schemas.AnlasEstimate(*, anlas, opus_free_sample)[源代码]

基类:BaseModel

Anlas cost estimate returned by estimate_anlas_cost.

参数:
  • anlas (int)

  • opus_free_sample (bool)

anlas: int
opus_free_sample: bool
model_config = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class novelai_image_mcp.schemas.TagSuggestion(*, tag='', count=0, confidence=0.0, **extra_data)[源代码]

基类:BaseModel

One tag suggested by NovelAI's tagger for a partial prompt.

The wire shape is live-verified (2026-10-10): {"tag": "1girl", "count": 10000, "confidence": 0.79}. Unknown fields are preserved (extra="allow") and every field has a default, so an upstream vocabulary change never turns a suggestion into a validation failure.

参数:
model_config = {'extra': 'allow'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

tag: str
count: int
confidence: float