Scripting
Tenant Lua scripts, custom actions and script validation.
66 operations · complete schema 107 KB
magicQuery
Executes a Magic Query string and returns the predefined query's JSON result. On a bad noun or parameter, returns a structured error whose 'extensions' carry 'code', 'actionable_message', and 'suggestions' for self-correction.
getMagicQuerySchema
Returns the input JSON Schema and output introspection for a Magic Query noun, so consumers (especially LLMs) can learn its contract before calling magicQuery.
listMagicQueries
Lists every available Magic Query noun with a short description and its options — the discovery entry point.
getMagicQueryGraphQL
Resolves a Magic Query string to the real GraphQL operation and variables it runs, so consumers can graduate from the façade to raw GraphQL. Does not execute.
listDataChangeEventTopics
List all valid data change event topics, grouped by resource. Requires authentication.
generateDefaultDataQuery
Generate a default GraphQL data query for an event topic. Returns a query string with all scalar fields for the resource, or null if the topic has no matching query. The query uses $id as the variable for the resource ID.
ping
Health check endpoint
getScript
Fetch a script by ID. Requires script:read permission.
getScriptByName
Fetch a script by name. Requires script:read permission.
listScriptVersions
A script's history, newest first. Requires script:read permission.
getScriptVersion
Fetch one version of a script. Requires script:read permission.
listScripts
List scripts with pagination and filtering. Requires script:list permission.
listLuaSamples
List the platform's Lua sample scripts. Metadata only — fetch source with getLuaSample. Every sample is type-checked and executed by tests. Requires script:read.
getLuaSample
Fetch one Lua sample with its runnable source. Requires script:read.
luaTypeDefinitions
Type definitions for a scripting role, rendered from the surface the validator checks against. Requires script:read.
luaApiSurface
Structured ctx.* or bridge.* surface for editor completions and hover. Requires script:read.
mcpTool
Read the authoring definition and assignments.
mcpTools
List tenant tools for administration; not the end-user catalog.
mcpToolVersions
Read immutable publication history.
analyzeMCPToolSource
Infer and decorate a tool contract without saving or running it.
getCustomWorkflowAction
Fetch a single custom action by id within the caller's tenant. Returns null when no such action exists. Requires customWorkflowAction:read permission.
listCustomWorkflowActions
List the caller's tenant's custom actions, filtered and sorted. Requires customWorkflowAction:list permission.
listAvailableActions
The tenant's unified action catalog: every active custom action plus every action declared by an active integration instance, ordered by label and keyset-paginated. Inactive custom actions are omitted. Requires customWorkflowAction:list permission.
iacSchema
The infrastructure-only view of this schema, for declarative tooling. Contains only annotated resources and the types they reach.
iacValidate
Validate an infrastructure artifact. Pure and side-effect free; safe to alias many times in one document.
iacGuides
Every authoring guide, for a tool that syncs them to a folder. Intended for `schema pull` to call once and write to disk, not for an agent to call while authoring — a file can be grepped and re-read in part, where a response arrives whole.
helpChapters
List human-facing manual chapters from the running deployment.
helpChapter
Read a chapter of the current published manual edition.
searchHelp
Search human-facing manuals using shared semantic and text retrieval.
schemaAuthoringCatalog
Compiler-owned vocabulary for the standalone XML JSON Schema dialect, including native form annotations.
compileSchemaXML
Compile standalone XML schema syntax into JSON Schema without persisting it; host restrictions apply when embedded.
renderSchemaXML
Render JSON Schema as native XML without dropping unsupported keywords or changing a saved document.
iacSchemaDocument
Fetch the JSON Schema document a SCHEMA-kind validator references, for declarative tooling.
getTemplate
Fetch a template by ID. Requires template:read permission.
getTemplateByHandle
Fetch a template by handle. Requires template:read permission.
listTemplates
List templates with pagination and filtering. Requires template:list permission.
getTemplateVersion
Fetch one template version by ID. Requires template:read permission.
listTemplateVersions
List versions of a template with pagination. Requires template:read permission.
upsertScript
Create or update a script. Requires script:write permission.
createScript
Create a new script. Requires script:write permission.
updateScript
Update a script. Only provided fields are changed. Requires script:write permission.
restoreScriptVersion
Put an old version's source back on the script. Appends a new version rather than rewinding history. The name and role are not restored, only the source. Requires script:write permission.
deleteScript
Delete a script. Requires script:delete permission.
createMCPTool
Create a tool definition. Requires mcpTool:write.
upsertMCPTool
Upsert a tool definition. Requires mcpTool:write.
updateMCPTool
Update a tool definition. Requires mcpTool:write.
publishMCPTool
Analyze and publish the current draft atomically.
deleteMCPTool
Delete a tool and its versions and assignments.
testMCPTool
Run the current draft as the authenticated developer; also requires mcpTool:read.
validateLua
Type-check Lua source against the ambient typedef for the chosen role without persisting anything. Safe to call from editors on every keystroke.
upsertCustomWorkflowAction
Create a custom action, or overwrite an existing one when input.id is supplied. Overwrite semantics: omitted optional fields are written as null, unlike updateCustomWorkflowAction. Requires customWorkflowAction:write permission.
createCustomWorkflowAction
Create a new custom action. Requires customWorkflowAction:write permission.
updateCustomWorkflowAction
Update a custom action. Only provided fields are changed. Requires customWorkflowAction:write permission.
deleteCustomWorkflowAction
Permanently delete a custom action from the caller's tenant. Reports notFound when no such action exists. Requires customWorkflowAction:delete permission.
upsertTemplate
Create or update a template. Requires template:write permission.
createTemplate
Create a new template. Requires template:write permission.
updateTemplate
Update a template. Only provided fields are changed. Requires template:write permission.
deleteTemplate
Delete a template and all its versions. Requires template:delete permission.
validateTemplate
Validate template syntax without saving. Requires template:read permission.
publishTemplateVersion
Publish current template content as a new version. Requires template:write permission.
deleteTemplateVersion
Delete one version from a template's history. Fails when the version is the one the template is currently published at. Requires template:write permission.
restoreTemplateVersion
Restore template content from a previous version. Requires template:write permission.
renderTemplate
Render a template with context data. Requires template:execute permission.
validateLuaScript
Validate a Lua script for syntax errors. Requires script:execute permission.
executeLuaScript
Execute a Lua script in the playground sandbox. Requires script:execute permission.
dataChangeEvents
Subscribe to real-time data change events. Requires read permission on each requested resource.