Skip to main content

Module schema

Module schema 

Source
Expand description

Tool schema builders (WBSV-07) — the mandatory non-empty outputSchema + the per-tool input schema, projected ENTIRELY from the embedded Manifest + CellMap.

There is NO privileged headline field (S-1): the output schema projects ALL named outputs uniformly from cell_map.outputs, each as a { value, unit } pair carrying its declared unit/meaning. The input-schema envelope is strict (additionalProperties: false) and mirrors the runtime DTO gate so a client trusting the schema never sends a key the runtime then rejects.

Functions§

diff_version_output_schema
The diff_version result outputSchema (WBSV-07), composed over the shared result envelope. The success-specific fields describe the served recorded changelog: from_version/to_version, deltas (per-output machine records), and a human-readable summary.
empty_input_schema
get_manifest/diff_version have no input — an empty strict object schema.
explain_output_schema
The explain result outputSchema (WBSV-07), composed over the shared result envelope. The success-specific fields are the ordered steps trace + the generic manifest-declared annotations object (S-2 — any domain-specific keystone step is generalized into manifest-declared annotations).
get_manifest_output_schema
The get_manifest result outputSchema (WBSV-07), composed over the shared result envelope. get_manifest has no domain-error trigger today, but composing the SAME envelope keeps every tool’s schema uniform.
input_schema_for_manifest
The strict input schema for calculate/explain: an object with additionalProperties:false accepting only the manifest Role::Input columns (by their neutral json_key) plus an optional overrides map for variable-tier params. The DTO’s deny_unknown_fields is the runtime gate; this schema mirrors it for discovery.
input_schema_for_tool
Build the strict per-tool input schema (WBV2-04): an object with additionalProperties:false carrying ONLY this tool’s DAG-derived input_keys (the subset of the shared cell_map.inputs pool transitively reachable upstream of this tool’s outputs), plus the F2 overrides block.
output_schema_for_manifest
Build the mandatory non-empty outputSchema (WBSV-07) from the embedded Manifest + CellMap.
output_schema_for_tool
Build ONE tool’s non-empty outputSchema (WBSV-07 / WBV2-04) over the tool’s OWN outputs only (NOT the union across tools). Each output Table becomes its own MCP tool, so its schema enumerates exactly that Table’s output columns — the TypedToolWithOutput dual-surface invariant (every tool emits a non-empty outputSchema → structuredContent).
provenance_schema
The provenance stamp sub-schema — present on every result. Carries bundle_id/version/combined_hash (NEVER workbook_hash — Codex HIGH #3).
render_workbook_output_schema
The render_workbook output schema (WBSV-05, WBSV-07): a workbook:// resource-URI POINTER + its MIME type — NOT the .xlsx bytes (those arrive on resources/read). Non-empty so the outputSchema-advertise contract holds.
result_envelope_schema
Build a tool result outputSchema that accepts BOTH the tool’s success shape AND the shared isError envelope, generalizing the contract to every tool.