name: tool-materialize
kind: tool
description: Write a request's derived outputs (features, attributes, windows) as ordinary fields of a new cohort that later requests read.
type: reference
applies_to: mcp
When to use
CALL WHEN A LATER REQUEST MUST READ A WINDOW, FEATURE OR ATTRIBUTE OUTPUT AS AN ORDINARY FIELD.
A derived value lives only inside the request that computes it: a later request cannot name it, nor a filter read an attribute or window. pulse_materialize writes it to a new cohort; point the next request at out.
Input
request(object, required): a request body (thepulse_processshape) withcohort. Onlycohort,label,features,filterers,attributes,windows,sort,weight,time_zone,disable_components,params,models(loaded fits forcoef()/sweep_axis()),output.out(string; required unlesspredict): the NEW.pulsepath, relative to the data directory.overwrite(bool): replace an existing cohort atout.predict(bool): validate only; writes nothing.
Output
No envelope: target, records (one per filter-passing source record; source order, or sort order), derived_columns (output order: feature outputs, attributes, windows), warnings, invalidated_sidecars (overwrite only, each with its rebuild command).
predict: true answers under predict: valid, columns, derived_columns, risks, errors / warnings (the run’s codes).
The cohort holds the source fields verbatim, then one nullable f64 per derived field (an ATTR_PREVIOUS_STATE output keeps its state field’s categorical type and dictionary), described by operator, field, params and (when read) frame.
Gotchas
- Nest the request. A slot beside
out→PULSE_REQUEST_UNKNOWN_FIELD; a slot outside the list →PULSE_MATERIALIZE_SLOT_UNSUPPORTED(details.slot); nothing derived →PULSE_MATERIALIZE_NO_DERIVED. - Label outputs you will reference: the written field is named by the label.
- Integer window outputs are
f64; a non-numeric one →PULSE_MATERIALIZE_OUTPUT_NOT_NUMERIC. - Existing
outwithoutoverwrite→SERVICE_VALIDATION. Refusals precede any write (atomic). sortorders ROWS only (source or derived keys, nulls last); windows follow their ownorder_by.- Only the SPSS metadata sidecar is carried.
outputpicks, orders, renames, describes, recodes, buckets, retypes columns; applied last (derived-cohorts,materialize-recode,materialize-casts);shards/groupsshape the file (materialize-container).
See
derived-cohorts— when to materialise, and the two-step recipe.request-envelope— the request slots.