gradeNot graded
get_spaceAnswer
Inspect the active space: apps, actors, backend, and exposed_types. Types with expose: true live on the account space and every app here shares those records — use that for data two apps both need (clients, organisations). App-only types do not appear here. Example: get_space({}).
View tool JSON
{
"name": "get_space",
"kind": "answer",
"impl": "imperative",
"description": "Inspect the active space: apps, actors, backend, and exposed_types. Types with expose: true live on the account space and every app here shares those records — use that for data two apps both need (clients, organisations). App-only types do not appear here. Example: get_space({}).",
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false
}
}get_specAnswer
Return the live spec, including generated default views, forms, and pages, and types the space exposes (those have expose: true — shared across apps). App-local types omit expose. Use get_space for the space-level exposed_types list. Use export_spec for the portable authored spec (defaults omitted).
View tool JSON
{
"name": "get_spec",
"kind": "answer",
"impl": "imperative",
"description": "Return the live spec, including generated default views, forms, and pages, and types the space exposes (those have expose: true — shared across apps). App-local types omit expose. Use get_space for the space-level exposed_types list. Use export_spec for the portable authored spec (defaults omitted).",
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false
}
}get_widgetsAnswer
Discover page widgets and their configuration contract. Call without widget to list or search widgets. Pass a widget key for its inputs. Also pass view for exact compatible field options before calling upsert_page.
View tool JSON
{
"name": "get_widgets",
"kind": "answer",
"impl": "imperative",
"description": "Discover page widgets and their configuration contract. Call without widget to list or search widgets. Pass a widget key for its inputs. Also pass view for exact compatible field options before calling upsert_page.",
"inputSchema": {
"type": "object",
"properties": {
"widget": {
"type": "string",
"description": "Widget key to inspect"
},
"view": {
"type": "string",
"description": "Optional View key used to resolve compatible field inputs"
},
"query": {
"type": "string",
"description": "Optional text search when listing widgets"
},
"category": {
"type": "string",
"enum": [
"content",
"data",
"actions"
],
"description": "Optional category filter when listing widgets"
}
},
"additionalProperties": false
}
}export_specAction
Export the portable authored spec as YAML or JSON. Generated default views, forms, and pages are omitted; they are recreated from types on import. Use get_spec to inspect the live spec including defaults.
View tool JSON
{
"name": "export_spec",
"kind": "act",
"impl": "imperative",
"description": "Export the portable authored spec as YAML or JSON. Generated default views, forms, and pages are omitted; they are recreated from types on import. Use get_spec to inspect the live spec including defaults.",
"inputSchema": {
"type": "object",
"properties": {
"format": {
"type": "string",
"enum": [
"yaml",
"json"
]
}
},
"additionalProperties": false
}
}query_viewAnswer
Run a named view and return its rows. Views can filter, sort, limit, and derive live grouped measures — list_* returns every source record. Discover view keys via get_spec. Example: query_view({ view: "active_projects" }).
View tool JSON
{
"name": "query_view",
"kind": "answer",
"impl": "imperative",
"description": "Run a named view and return its rows. Views can filter, sort, limit, and derive live grouped measures — list_* returns every source record. Discover view keys via get_spec. Example: query_view({ view: \"active_projects\" }).",
"inputSchema": {
"type": "object",
"properties": {
"view": {
"type": "string",
"description": "View key from get_spec"
},
"expose": {
"type": "object",
"description": "Runtime values for the view's expose filters, e.g. { status: \"active\" }",
"additionalProperties": true
},
"record_id": {
"type": "string",
"description": "Current record id when the view filters on $record.id"
}
},
"required": [
"view"
],
"additionalProperties": false
}
}apply_specAction
Replace the entire active app spec with a YAML or JSON document. Not a merge: types, views, forms, flows, and pages missing from the document are deleted. Generated defaults are recreated from types. Requires confirm: true. A document with no types is refused unless wipe: true — { key: "foo" } is not a full spec. Example: apply_spec({ spec: "<full yaml or json>", confirm: true }).
View tool JSON
{
"name": "apply_spec",
"kind": "act",
"impl": "imperative",
"description": "Replace the entire active app spec with a YAML or JSON document. Not a merge: types, views, forms, flows, and pages missing from the document are deleted. Generated defaults are recreated from types. Requires confirm: true. A document with no types is refused unless wipe: true — { key: \"foo\" } is not a full spec. Example: apply_spec({ spec: \"<full yaml or json>\", confirm: true }).",
"inputSchema": {
"type": "object",
"properties": {
"spec": {
"type": "string",
"description": "Full YAML or JSON document for the app spec"
},
"confirm": {
"type": "boolean",
"description": "Must be true. apply_spec replaces the entire spec."
},
"wipe": {
"type": "boolean",
"description": "Required with confirm if the document has no types and the app already has some."
}
},
"required": [
"spec",
"confirm"
],
"additionalProperties": false
}
}upsert_typeAction
Create or update a type and its fields. Use a singular key and label for one record; optional collection_label overrides the automatically pluralized list name (for example label: "Person", collection_label: "People"). Providing fields replaces the type's field list; omitting fields leaves existing fields unchanged. Add or change one field with upsert_field. fields is an array of {key, type, label, ...} or a map of key → field. Enum fields can use presentation: "badge" and explicit value_semantics; number fields can use presentation: "rating". Reference fields need target. expose: true stores the type on the account space so every app shares its records. Omit expose (or false) for app-only types. Example: upsert_type({ key: "person", label: "Person", collection_label: "People", expose: true, fields: [{ key: "name", type: "text", required: true }] }).
View tool JSON
{
"name": "upsert_type",
"kind": "act",
"impl": "imperative",
"description": "Create or update a type and its fields. Use a singular key and label for one record; optional collection_label overrides the automatically pluralized list name (for example label: \"Person\", collection_label: \"People\"). Providing fields replaces the type's field list; omitting fields leaves existing fields unchanged. Add or change one field with upsert_field. fields is an array of {key, type, label, ...} or a map of key → field. Enum fields can use presentation: \"badge\" and explicit value_semantics; number fields can use presentation: \"rating\". Reference fields need target. expose: true stores the type on the account space so every app shares its records. Omit expose (or false) for app-only types. Example: upsert_type({ key: \"person\", label: \"Person\", collection_label: \"People\", expose: true, fields: [{ key: \"name\", type: \"text\", required: true }] }).",
"inputSchema": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"label": {
"type": "string"
},
"collection_label": {
"type": "string",
"description": "Optional plural label for lists and navigation. Omit it to infer an English plural from label; pass an empty string to clear an existing override."
},
"store": {
"type": "string"
},
"expose": {
"type": "boolean",
"description": "If true, the type lives on the account space and all apps share its records. If false or omitted, the type belongs only to this app."
},
"fields": {
"description": "Fields to create with the type. Array of field objects, or a map of field key → field (or shorthand type string).",
"anyOf": [
{
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"label": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text",
"number",
"date",
"boolean",
"enum",
"reference"
]
},
"field_type": {
"type": "string",
"description": "Alias for type"
},
"required": {
"type": "boolean"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
},
"target": {
"type": "string",
"description": "Referenced type key (reference fields)"
},
"presentation": {
"type": "string",
"enum": [
"rating",
"badge"
]
},
"variant": {
"type": "string",
"enum": [
"segments"
]
},
"max": {
"type": "number",
"minimum": 2,
"maximum": 10
},
"value_semantics": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"neutral",
"info",
"success",
"warning",
"danger"
]
}
},
"default": {}
}
}
},
{
"type": "object",
"additionalProperties": {
"anyOf": [
{
"type": "string",
"description": "Shorthand field type, e.g. text"
},
{
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"label": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"text",
"number",
"date",
"boolean",
"enum",
"reference"
]
},
"field_type": {
"type": "string",
"description": "Alias for type"
},
"required": {
"type": "boolean"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
},
"target": {
"type": "string",
"description": "Referenced type key (reference fields)"
},
"presentation": {
"type": "string",
"enum": [
"rating",
"badge"
]
},
"variant": {
"type": "string",
"enum": [
"segments"
]
},
"max": {
"type": "number",
"minimum": 2,
"maximum": 10
},
"value_semantics": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"neutral",
"info",
"success",
"warning",
"danger"
]
}
},
"default": {}
}
}
]
}
}
]
}
},
"required": [
"key"
],
"additionalProperties": false
}
}upsert_fieldAction
Add or update one field on a type without removing the others. type is the type key; field_type is the field kind: text, number, date, boolean, enum, reference. Enum fields need values and can use presentation: "badge" with explicit value_semantics of neutral, info, success, warning, or danger; use neutral when meaning is unclear. Reference fields need target. A number field can use presentation: "rating", variant: "segments", and max from 2 to 10. Example: upsert_field({ type: "submission", key: "stage", field_type: "enum", values: ["submitted", "winner", "rejected"], presentation: "badge", value_semantics: { submitted: "neutral", winner: "success", rejected: "danger" } }).
View tool JSON
{
"name": "upsert_field",
"kind": "act",
"impl": "imperative",
"description": "Add or update one field on a type without removing the others. type is the type key; field_type is the field kind: text, number, date, boolean, enum, reference. Enum fields need values and can use presentation: \"badge\" with explicit value_semantics of neutral, info, success, warning, or danger; use neutral when meaning is unclear. Reference fields need target. A number field can use presentation: \"rating\", variant: \"segments\", and max from 2 to 10. Example: upsert_field({ type: \"submission\", key: \"stage\", field_type: \"enum\", values: [\"submitted\", \"winner\", \"rejected\"], presentation: \"badge\", value_semantics: { submitted: \"neutral\", winner: \"success\", rejected: \"danger\" } }).",
"inputSchema": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Type key (not the field kind)"
},
"type_key": {
"type": "string",
"description": "Alias for type"
},
"key": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
},
"label": {
"type": "string"
},
"field_type": {
"type": "string",
"enum": [
"text",
"number",
"date",
"boolean",
"enum",
"reference"
],
"description": "Field kind"
},
"required": {
"type": "boolean"
},
"values": {
"type": "array",
"items": {
"type": "string"
}
},
"target": {
"type": "string",
"description": "Referenced type key (reference fields)"
},
"presentation": {
"type": "string",
"enum": [
"rating",
"badge"
]
},
"variant": {
"type": "string",
"enum": [
"segments"
]
},
"max": {
"type": "number",
"minimum": 2,
"maximum": 10
},
"value_semantics": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": [
"neutral",
"info",
"success",
"warning",
"danger"
]
}
}
},
"required": [
"key"
],
"additionalProperties": false
}
}rename_fieldAction
Rename a field key while keeping its identity and stored values.
View tool JSON
{
"name": "rename_field",
"kind": "act",
"impl": "imperative",
"description": "Rename a field key while keeping its identity and stored values.",
"inputSchema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"from": {
"type": "string"
},
"to": {
"type": "string",
"minLength": 1,
"pattern": "\\S"
}
},
"required": [
"type",
"from",
"to"
],
"additionalProperties": false
}
}delete_fieldSensitive Action
Remove a field from a type and drop its SQLite column.
View tool JSON
{
"name": "delete_field",
"kind": "transact",
"impl": "imperative",
"description": "Remove a field from a type and drop its SQLite column.",
"inputSchema": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"key": {
"type": "string"
}
},
"required": [
"type",
"key"
],
"additionalProperties": false
}
}upsert_viewAction
Create or update a named view (a stored query: filter, sort, limit, columns, or live grouped measures). For a normal view, include fields in the order people should see them, such as fields: ["name", "status", "client.name"]. If fields is omitted while creating a normal view, builder.run chooses up to six useful source fields automatically; an empty fields array is invalid. Omitting fields while updating preserves the existing selection. For a grouped view, omit fields to derive them from group_by and measure aliases. group_by accepts one source field. measures supports count, sum, avg, min, and max; avg accepts field or fields. Sort aggregate aliases with order_by. Run it with query_view. Example: upsert_view({ key: "scores", source: "review", group_by: "submission", measures: { review_count: { op: "count" }, overall_score: { op: "avg", fields: ["quality", "impact"] } }, order_by: { overall_score: "desc" } }).
View tool JSON
{
"name": "upsert_view",
"kind": "act",
"impl": "imperative",
"description": "Create or update a named view (a stored query: filter, sort, limit, columns, or live grouped measures). For a normal view, include fields in the order people should see them, such as fields: [\"name\", \"status\", \"client.name\"]. If fields is omitted while creating a normal view, builder.run chooses up to six useful source fields automatically; an empty fields array is invalid. Omitting fields while updating preserves the existing selection. For a grouped view, omit fields to derive them from group_by and measure aliases. group_by accepts one source field. measures supports count, sum, avg, min, and max; avg accepts field or fields. Sort aggregate aliases with order_by. Run it with query_view. Example: upsert_view({ key: \"scores\", source: \"review\", group_by: \"submission\", measures: { review_count: { op: \"count\" }, overall_score: { op: \"avg\", fields: [\"quality\", \"impact\"] } }, order_by: { overall_score: \"desc\" } }).",
"inputSchema": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"source": {
"type": "string"
},
"fields": {
"type": "array",
"minItems": 1,
"items": {
"type": "string"
},
"description": "Ordered visible columns for a normal view. Reference labels may use paths such as client.name. Omit on creation to infer useful defaults; omit on update to preserve existing columns; omit for grouped views to derive aggregate columns."
},
"where": {
"type": "object"
},
"expose": {
"type": "array",
"items": {
"type": "string"
}
},
"limit": {
"type": "number"
},
"order_by": {
"type": "object"
},
"group_by": {
"type": "string"
},
"measures": {
"type": "object",
"description": "Named live aggregates for a grouped view",
"additionalProperties": {
"type": "object",
"properties": {
"op": {
"type": "string",
"enum": [
"count",
"sum",
"avg",
"min",
"max"
]
},
"field": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"op"
],
"additionalProperties": false
}
}
},
"required": [
"key",
"source"
],
"additionalProperties": false
}
}upsert_formAction
Create or update a form over a type. Example: upsert_form({ key: "intake", type: "client", fields: ["name", "email"], mode: "create" }).
View tool JSON
{
"name": "upsert_form",
"kind": "act",
"impl": "imperative",
"description": "Create or update a form over a type. Example: upsert_form({ key: \"intake\", type: \"client\", fields: [\"name\", \"email\"], mode: \"create\" }).",
"inputSchema": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"type": {
"type": "string"
},
"fields": {
"type": "array",
"items": {
"type": "string"
}
},
"mode": {
"type": "string",
"enum": [
"create",
"edit",
"custom"
]
}
},
"required": [
"key",
"type"
],
"additionalProperties": false
}
}upsert_flowAction
Create or update a flow. Steps may create, set, delete, query, branch, or invoke other flows. expose: ["agent"] registers invoke_<key>. Example: upsert_flow({ key: "mark_paid", expose: ["agent"], input: { invoice: "ref(invoice)" }, steps: [{ set: { "invoice.status": "paid" } }] }).
View tool JSON
{
"name": "upsert_flow",
"kind": "act",
"impl": "imperative",
"description": "Create or update a flow. Steps may create, set, delete, query, branch, or invoke other flows. expose: [\"agent\"] registers invoke_<key>. Example: upsert_flow({ key: \"mark_paid\", expose: [\"agent\"], input: { invoice: \"ref(invoice)\" }, steps: [{ set: { \"invoice.status\": \"paid\" } }] }).",
"inputSchema": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"input": {
"type": "object"
},
"when": {},
"trigger": {
"type": "object"
},
"expose": {
"type": "array",
"items": {
"type": "string"
}
},
"steps": {
"type": "array"
}
},
"required": [
"key"
],
"additionalProperties": false
}
}upsert_pageAction
Create or update a page of grids and widgets. Call get_widgets first to discover widget keys, required values, and compatible fields. Widget values are validated against that contract. Optional folder groups it in the app menu. Optional icon is one of: page, dashboard, table, chart, line, donut, board, calendar, list, inbox, people, money, time. If icon is omitted when creating a page, a one-time default is inferred from its widgets; later edits do not change it. A group nests children in a blocks array even when there is only one widget. columns is how many widgets sit side by side; unused columns stay empty. Example: upsert_page({ key: "board", icon: "board", path: "/board", blocks: [{ kind: "group", columns: 1, blocks: [{ kind: "widget", widget: "table", values: { view: "active_projects" } }] }] }).
View tool JSON
{
"name": "upsert_page",
"kind": "act",
"impl": "imperative",
"description": "Create or update a page of grids and widgets. Call get_widgets first to discover widget keys, required values, and compatible fields. Widget values are validated against that contract. Optional folder groups it in the app menu. Optional icon is one of: page, dashboard, table, chart, line, donut, board, calendar, list, inbox, people, money, time. If icon is omitted when creating a page, a one-time default is inferred from its widgets; later edits do not change it. A group nests children in a blocks array even when there is only one widget. columns is how many widgets sit side by side; unused columns stay empty. Example: upsert_page({ key: \"board\", icon: \"board\", path: \"/board\", blocks: [{ kind: \"group\", columns: 1, blocks: [{ kind: \"widget\", widget: \"table\", values: { view: \"active_projects\" } }] }] }).",
"inputSchema": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"label": {
"type": "string"
},
"path": {
"type": "string"
},
"folder": {
"type": "string"
},
"icon": {
"type": "string",
"enum": [
"page",
"dashboard",
"table",
"chart",
"line",
"donut",
"board",
"calendar",
"list",
"inbox",
"people",
"money",
"time"
],
"description": "Sidebar icon for this page."
},
"blocks": {
"type": "array",
"description": "Page layout. A group nests children in a blocks array — always an array, even for one widget.",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"enum": [
"widget",
"group"
]
},
"widget": {
"type": "string"
},
"values": {
"type": "object"
},
"columns": {
"type": "number",
"description": "Widgets side by side in this group (1–4). Unused cells stay empty."
},
"blocks": {
"type": "array",
"items": {
"type": "object"
}
}
}
}
}
},
"required": [
"key"
],
"additionalProperties": false
}
}create_appAction
Create an app in the active space and switch to it. The new app can use types the space already exposes (see get_space.exposed_types) — do not recreate those types in the app. Example: create_app({ name: "Invoicing" }).
View tool JSON
{
"name": "create_app",
"kind": "act",
"impl": "imperative",
"description": "Create an app in the active space and switch to it. The new app can use types the space already exposes (see get_space.exposed_types) — do not recreate those types in the app. Example: create_app({ name: \"Invoicing\" }).",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"sample": {
"type": "string"
}
},
"required": [
"name"
],
"additionalProperties": false
}
}delete_appSensitive Action
Delete an app created from this account space. Shared records stay.
View tool JSON
{
"name": "delete_app",
"kind": "transact",
"impl": "imperative",
"description": "Delete an app created from this account space. Shared records stay.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}switch_appAction
Switch the active app by id. Space-exposed types stay available; app-local types change with the app.
View tool JSON
{
"name": "switch_app",
"kind": "act",
"impl": "imperative",
"description": "Switch the active app by id. Space-exposed types stay available; app-local types change with the app.",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": false
}
}create_spaceAction
Create a new account space with its own apps. After switching to it, upsert_type({ expose: true }) creates types every app in this space shares — e.g. a customer type used by both a CRM and invoicing. Example: create_space({ name: "Studio" }).
View tool JSON
{
"name": "create_space",
"kind": "act",
"impl": "imperative",
"description": "Create a new account space with its own apps. After switching to it, upsert_type({ expose: true }) creates types every app in this space shares — e.g. a customer type used by both a CRM and invoicing. Example: create_space({ name: \"Studio\" }).",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"additionalProperties": false
}
}list_samplesAnswer
List gallery sample applications that can be loaded as an app.
View tool JSON
{
"name": "list_samples",
"kind": "answer",
"impl": "imperative",
"description": "List gallery sample applications that can be loaded as an app.",
"inputSchema": {
"type": "object",
"properties": {},
"additionalProperties": false
}
}