Topic

Scripting

Explore the data types and operations available in Scripting.

69 operations

analyzeMCPToolSourceQuery

Infer and decorate a tool contract without saving or running it.

compileSchemaXMLQuery

Compile standalone XML schema syntax into JSON Schema without persisting it; host restrictions apply when embedded.

createCustomWorkflowActionMutation

Create a new custom action. Requires customWorkflowAction:write permission.

createMCPToolMutation

Create a tool definition. Requires mcpTool:write.

createScriptMutation

Create a new script. Requires script:write permission.

createTemplateMutation

Create a new template. Requires template:write permission.

dataChangeEventsSubscription

Subscribe to real-time data change events. Requires read permission on each requested resource. Task topics are the exception: a signed-in user without task:read receives the events of their own tasks only (assigned to them, claimed by them, unclaimed on their teams).

deleteCustomWorkflowActionMutation

Permanently delete a custom action from the caller's tenant. Reports notFound when no such action exists. Requires customWorkflowAction:delete permission.

deleteMCPToolMutation

Delete a tool and its versions and assignments.

deleteScriptMutation

Delete a script. Requires script:delete permission.

deleteTemplateMutation

Delete a template and all its versions. Requires template:delete permission.

deleteTemplateVersionMutation

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.

executeLuaScriptMutation

Execute a Lua script in the playground sandbox. Requires script:execute permission.

generateDefaultDataQueryQuery

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.

getCustomWorkflowActionQuery

Fetch a single custom action by id within the caller's tenant. Returns null when no such action exists. Requires customWorkflowAction:read permission.

getLuaSampleQuery

Fetch one Lua sample with its runnable source. Requires script:read.

getMagicQueryGraphQLQuery

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.

getMagicQuerySchemaQuery

Returns the input JSON Schema and output introspection for a Magic Query noun, so consumers (especially LLMs) can learn its contract before calling magicQuery.

getScriptQuery

Fetch a script by ID. Requires script:read permission.

getScriptByNameQuery

Fetch a script by name. Requires script:read permission.

getScriptVersionQuery

Fetch one version of a script. Requires script:read permission.

getTemplateQuery

Fetch a template by ID. Requires template:read permission.

getTemplateByHandleQuery

Fetch a template by handle. Requires template:read permission.

getTemplateVersionQuery

Fetch one template version by ID. Requires template:read permission.

helpChapterQuery

Read a chapter of the current published manual edition.

helpChaptersQuery

List human-facing manual chapters from the running deployment.

iacGuidesQuery

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.

iacSchemaQuery

The infrastructure-only view of this schema, for declarative tooling. Contains only annotated resources and the types they reach.

iacSchemaDocumentQuery

Fetch the JSON Schema document a SCHEMA-kind validator references, for declarative tooling.

iacValidateQuery

Validate an infrastructure artifact. Pure and side-effect free; safe to alias many times in one document.

invokeMCPToolMutation

Run an assigned tool as the caller and record the run. Any signed-in user; assignment is the grant. The tool's effects are real and are not rolled back.

listAvailableActionsQuery

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.

listCustomWorkflowActionsQuery

List the caller's tenant's custom actions, filtered and sorted. Requires customWorkflowAction:list permission.

listDataChangeEventTopicsQuery

List all valid data change event topics, grouped by resource. Requires authentication.

listLuaSamplesQuery

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.

listMagicQueriesQuery

Lists every available Magic Query noun with a short description and its options — the discovery entry point.

listScriptsQuery

List scripts with pagination and filtering. Requires script:list permission.

listScriptVersionsQuery

A script's history, newest first. Requires script:read permission.

listTemplatesQuery

List templates with pagination and filtering. Requires template:list permission.

listTemplateVersionsQuery

List versions of a template with pagination. Requires template:read permission.

luaApiSurfaceQuery

Structured ctx.* or bridge.* surface for editor completions and hover. Requires script:read.

luaTypeDefinitionsQuery

Type definitions for a scripting role, rendered from the surface the validator checks against. Requires script:read.

magicQueryQuery

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.

mcpToolQuery

Read the authoring definition and assignments.

mcpToolsQuery

List tenant tools for administration; not the end-user catalog.

mcpToolVersionsQuery

Read immutable publication history.

myMCPToolInvocationsQuery

The caller's own finished tool invocations, newest first. Nobody else's are ever listed; still-running ones are left out.

myMCPToolsQuery

The caller's tool catalog: enabled, published tools assigned to them directly or through a team. Any signed-in user; assignment is the grant.

pingQuery

Health check endpoint

publishMCPToolMutation

Analyze and publish the current draft atomically.