---
title: "Propose consolidating a notebook's hard-coded values into one parameter cell"
method: POST
path: "/cases/propose_parameter_cell"
tags: ["cases"]
---

# Propose consolidating a notebook's hard-coded values into one parameter cell

`POST /cases/propose_parameter_cell`

The server enumerates every literal the transformation may touch, the
LLM selects and names the ones worth exposing as parameters, and the
server resolves that selection into verified replacement spans plus the
parameter cell to insert at the top. A proposal the LLM could not
produce, or that verification emptied, comes back absent.

## Request body

- object
  - `model` string — Optional LLM model override. Falls back to server default if not specified.
  - `notebook` object, required — The uploaded notebook JSON object.

## Response `200`

A parameter cell proposed for the notebook, if any

- object
  - `proposal` object — The parameter cell to insert at the top and the replacements that point at it. Absent when there is nothing to propose. Cell indices are the ORIGINAL notebook's.
    - `parameters` object[], required
      - `assignment_source` string, required — This parameter's line in the parameter cell, e.g. "temperature_K = 300"
      - `spans` object[], required — Server-resolved replacement spans. Offsets are UTF-16 code units into the ORIGINAL cell's source joined to a single string, matching JS String.prototype.slice — the client splices, it never searches. Spans never overlap, across parameters included, so any subset applies when spliced back to front. A parameter with two or more spans must be visually distinguished in the UI: grouping mistakes are the one thing no server check can catch.
        - `cell_index` integer, required
        - `end` integer, required
        - `replace` string, required
        - `start` integer, required
      - `variable_name` 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)
