export_resources_toml
Export an explicit selection of at most 16 resources and 16 visible user groups through Core's scoped read API. targets is required; [] requires explicit groups or include_variables=true, which selects ALL Core variables, never per-variable names. Return parseable inspection-only TOML with conservative structural omission of arbitrary text, inline documents/scripts, credentials, all variable values and unknown fields, even for administrators. Identify missing definitions (Core omits inline ResourceSyncs), redactions and references outside the selection. Never use this incomplete export as authoritative desired state: omitted fields can reset existing configuration to defaults. No file write, cache refresh, RunSync or deployment; no export-all fallback. Bound source/output and reject excess without returning a truncated document.
Availability
Available under the default capability policy
The instance’s tool selection and upstream Core permissions also apply. Some inputs require additional grants.
Effect annotations
readOnlyHint—truedestructiveHint—falseidempotentHint—true
Inputs
The registered schema gives field types, alternatives and declared bounds. The description and operator guides also cover checks applied at runtime.
include_variables- Core exports ALL variables, not individually selected variables.
type "boolean"·default false targets- Explicit targets, at most 16. Use [] only with explicit groups/variables. Required ·
type "array"·maxItems 16 user_groups- Exact visible group selectors, at most 16; not a blanket inclusion flag.
type "array"·maxItems 16·default []
Show input JSON Schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"include_variables": {
"default": false,
"description": "Core exports ALL variables, not individually selected variables.",
"type": "boolean"
},
"targets": {
"description": "Explicit targets, at most 16. Use [] only with explicit groups/variables.",
"items": {
"$ref": "#/$defs/Target"
},
"maxItems": 16,
"type": "array"
},
"user_groups": {
"default": [],
"description": "Exact visible group selectors, at most 16; not a blanket inclusion flag.",
"items": {
"$ref": "#/$defs/DetailInput"
},
"maxItems": 16,
"type": "array"
}
},
"required": [
"targets"
],
"$defs": {
"DetailInput": {
"additionalProperties": false,
"oneOf": [
{
"required": [
"id"
]
},
{
"required": [
"name"
]
}
],
"properties": {
"id": {
"description": "Exact stable resource ID returned by a list tool.",
"pattern": "^[0-9a-fA-F]{24}$",
"type": "string"
},
"name": {
"description": "Exact, case-sensitive name within this family; never interpreted as an ID.",
"minLength": 1,
"pattern": "\\S",
"type": "string"
}
},
"type": "object"
},
"Kind": {
"enum": [
"server",
"swarm",
"stack",
"deployment",
"build",
"repo",
"builder",
"alerter",
"procedure",
"action",
"resource_sync"
],
"type": "string"
},
"Target": {
"additionalProperties": false,
"properties": {
"kind": {
"$ref": "#/$defs/Kind"
},
"target": {
"$ref": "#/$defs/DetailInput"
}
},
"required": [
"kind",
"target"
],
"type": "object"
}
}
}Output
The registered output schema covers structured results and tool errors.
Outputauthoritative_apply_input,mutation_requests,omitted_fields,selection_complete,targets,toml,user_groups,variable_scope,variables_returned,warningsAppErrorcandidates,correction,field,kind,message,operation,status
Show output JSON Schema
{
"type": "object",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"anyOf": [
{
"$ref": "#/$defs/Output"
},
{
"$ref": "#/$defs/AppError"
}
],
"$defs": {
"AppError": {
"additionalProperties": false,
"description": "Only application-owned messages and selected, nonsensitive metadata survive.",
"properties": {
"candidates": {
"items": {
"$ref": "#/$defs/Candidate"
},
"type": [
"array",
"null"
]
},
"correction": {
"type": [
"string",
"null"
]
},
"field": {
"type": [
"string",
"null"
]
},
"kind": {
"$ref": "#/$defs/ErrorKind"
},
"message": {
"type": "string"
},
"operation": {
"type": "string"
},
"status": {
"format": "uint16",
"maximum": 65535,
"minimum": 0,
"type": [
"integer",
"null"
]
}
},
"required": [
"kind",
"message",
"operation"
],
"type": "object"
},
"Candidate": {
"additionalProperties": false,
"description": "A bounded ambiguity hint, never a raw upstream resource.",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
],
"type": "object"
},
"ErrorKind": {
"description": "Stable public categories. No variant contains a raw upstream error.",
"enum": [
"invalid_arguments",
"not_found",
"ambiguous_target",
"incomplete_resolution",
"configuration",
"authentication",
"permission_denied",
"timeout",
"unreachable",
"upstream",
"invalid_response",
"response_too_large",
"capability_disabled",
"unsupported_target",
"stale_preview",
"invalid_preview"
],
"type": "string"
},
"Group": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"returned_by_core": {
"type": "boolean"
}
},
"required": [
"id",
"name",
"returned_by_core"
],
"type": "object"
},
"Kind": {
"enum": [
"server",
"swarm",
"stack",
"deployment",
"build",
"repo",
"builder",
"alerter",
"procedure",
"action",
"resource_sync"
],
"type": "string"
},
"Output": {
"properties": {
"authoritative_apply_input": {
"description": "Always false: omission/default resets make this inspection-only output.",
"type": "boolean"
},
"mutation_requests": {
"format": "uint8",
"maximum": 255,
"minimum": 0,
"type": "integer"
},
"omitted_fields": {
"format": "uint",
"minimum": 0,
"type": "integer"
},
"selection_complete": {
"description": "True only when Core returned every explicitly selected resource/group.",
"type": "boolean"
},
"targets": {
"items": {
"$ref": "#/$defs/Selected"
},
"type": "array"
},
"toml": {
"type": "string"
},
"user_groups": {
"items": {
"$ref": "#/$defs/Group"
},
"type": "array"
},
"variable_scope": {
"type": "string"
},
"variables_returned": {
"format": "uint",
"minimum": 0,
"type": "integer"
},
"warnings": {
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"toml",
"targets",
"user_groups",
"variable_scope",
"variables_returned",
"selection_complete",
"authoritative_apply_input",
"omitted_fields",
"mutation_requests",
"warnings"
],
"type": "object"
},
"Selected": {
"properties": {
"id": {
"type": "string"
},
"kind": {
"$ref": "#/$defs/Kind"
},
"name": {
"type": "string"
},
"returned_by_core": {
"type": "boolean"
}
},
"required": [
"kind",
"id",
"name",
"returned_by_core"
],
"type": "object"
}
}
}