declared_inputs

Bring a customer's own aggregate figures into this world under a declared basis, and get back a handle the calculators read. Route here when a figure a question needs belongs to the caller rather than to this world: their book's population, their prevalence, their cost per affected member per month, their procedure volume. Nothing that enters here becomes a measurement. This world reserves `measured` for a figure it read out of its own register, so the only two bases a caller may declare are `assumption`, a figure you declared with no source to name, and `cited`, a published figure carrying its source. Declaring `measured` is refused by name. Compose a declared figure with one this world measured and the answer comes back on the declared basis, because the weakest input carries. Declare four arguments together. `schema` says what one row is. `mimetype` is one of application/json and text/csv. `blob` carries the rows themselves, inline. `mapping` says which of this world's vocabulary terms each column fills and on whose word. The mapping is the load-bearing argument: a customer column named avg_reimb means nothing here, and a money-bearing role fixes exactly one kind of money, so a charge cannot pool with a negotiated rate and neither can fill a role this world defines on paid amounts. Every schema column must carry a mapping entry and every mapping entry must name a schema column, in both directions, because a column that vanishes silently is a figure the customer believes is in the analysis and is not. The schema is read for whether its rows describe people BEFORE anything reads the blob, so a customer who attaches the wrong export never has it parsed. The grain must be the literal `aggregate`, a column naming a person or a person-level event is refused, a date-typed column is refused because a date on a row is a fact about one person, and the schema's own `row_meaning` prose is read and refused on its own sentence. What those tests do not do is prove a blob is aggregated. Nothing at this stage can. They refuse the shape, and the shape is what a mistake looks like. The handle carries no identifier, no session key and no digest. It is the validated, mapped content itself, echoed back for the caller to pass into a later call, because this world serves stateless estimators over static extracts and has no store an opaque id could be resolved against. Its rows are keyed by this world's vocabulary, spelled exactly as the calculators spell their own arguments, so a later call reads a row and passes it straight through.

Use this form for new arguments. Follow concrete links for known values. Fetch-only readers may be unable to submit new URLs.

Exact input contract

{
  "additionalProperties": false,
  "properties": {
    "blob": {
      "description": "The rows themselves, inline, as text in the declared mimetype. Capped at 262144 bytes as sent, for the same reason the row count is capped: this stage carries data inside a tool call.",
      "type": "string"
    },
    "mapping": {
      "additionalProperties": false,
      "description": "What each column is in this world's vocabulary, and on whose word. A per-set `basis` and `source` may be declared once here and a column may override either for itself.",
      "properties": {
        "basis": {
          "description": "The default basis for every column that declares none of its own. `measured` is not available to a caller and is refused by name.",
          "enum": [
            "assumption",
            "cited"
          ],
          "type": "string"
        },
        "fields": {
          "description": "One entry per schema column, keyed by the column's own name. Each carries `to`, the vocabulary term the column fills, and may carry `money_kind`, `basis` and `source` for itself.",
          "type": "object"
        },
        "source": {
          "description": "Where a cited set came from, named so an answer built on it can carry the source with it.",
          "type": "string"
        }
      },
      "required": [
        "fields"
      ],
      "type": "object"
    },
    "mimetype": {
      "description": "How to read the blob. Anything else is refused naming the upload path this stage does not replace.",
      "enum": [
        "application/json",
        "text/csv"
      ],
      "type": "string"
    },
    "schema": {
      "additionalProperties": false,
      "description": "What one row of the blob is. Read before the blob, and refused on its own terms if it says its rows are about people.",
      "properties": {
        "columns": {
          "description": "One entry per column of the blob, each with its `name` and its `type`.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "name": {
                "description": "The column name as the customer spelled it, carried through unaltered.",
                "type": "string"
              },
              "type": {
                "description": "The column's type. A `date` type is refused outright: a date on a row is a date of service, an admission or a birth, and each of those is a fact about one person.",
                "type": "string"
              }
            },
            "required": [
              "name",
              "type"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "expected_rows": {
          "description": "How many rows the blob carries. An agent that prepared an aggregate knows how many rows it prepared, and a blob disagreeing with its own schema is a file nobody looked at. Capped at 1000 rows, which is a fact about carrying data inline in a tool call rather than a fact about aggregation.",
          "type": "number"
        },
        "grain": {
          "description": "The literal `aggregate`, and nothing else. A person-level grain is named back in the refusal so the reader can see the word was understood rather than merely rejected.",
          "type": "string"
        },
        "period": {
          "description": "The period the whole extract covers, as a label. Belongs to the schema rather than to a row, which is why a date-typed column is refused.",
          "type": "string"
        },
        "row_meaning": {
          "description": "In prose, what one row is. The prose is read: a set declaring one row per member is refused on the customer's own sentence, which is the cheapest place to catch a file nobody should have attached.",
          "type": "string"
        }
      },
      "required": [
        "grain",
        "row_meaning",
        "expected_rows",
        "columns"
      ],
      "type": "object"
    }
  },
  "required": [
    "schema",
    "mimetype",
    "blob",
    "mapping"
  ],
  "type": "object"
}

Ready links