---
title: "Suggest the prose of a report definition for a notebook"
method: POST
path: "/cases/suggest_definition"
tags: ["cases"]
---

# Suggest the prose of a report definition for a notebook

`POST /cases/suggest_definition`

Fills the natural-language fields of a report definition (title,
description, parameter labels, checks, outputs) with the LLM around the
notebook's analysis; suggestions referencing anything the analysis did
not find are filtered out. A suggestion the LLM could not produce comes
back absent.

## Request body

- object
  - `language` 'ja' | 'en' — Output language. Defaults to "ja".
  - `model` string — Optional LLM model override. Falls back to server default if not specified.
  - `notebook` object, required — The uploaded notebook JSON object.
  - `provider` 'anthropic' | 'bedrock' — LLM provider. Defaults to "bedrock".

## Response `200`

Notebook analyzed, and a definition suggested for it

- object
  - `suggestion` object — Prose suggestions for the definition editor; every referenced variable_name exists in the notebook's analysis. Absent when the LLM could not be reached.
    - `description` string, required — Two or three sentences on what the case computes
    - `outputs` object[], required
      - `cell_index` integer
      - `description` string
      - `name` string, required
      - `type` 'number' | 'image', required
      - `unit` string — Physical unit shown after the value (type number)
      - `variable_name` string
    - `parameters` object[], required
      - `description` string
      - `label` string, required
      - `unit` string
      - `variable_name` string, required
    - `title` string, required — A short name for the case
    - `validations` object[], required
      - `cell_index` integer
      - `method` 'prompt', required — Validations are AI judgements; completion and mechanical thresholds are not declared in the definition
      - `name` string, required
      - `prompt` string, required

## Other responses

- `400` — Bad request
- `default` — Other error

---

[API](https://skmtc.dev/matlantis/apis/matlantis-web-ui-backend-api.md) · [All operations](https://skmtc.dev/matlantis/apis/matlantis-web-ui-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/matlantis/matlantis-web-ui-backend-api/revisions/b155f3a32673/schema)
