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