mcp

v0.10.0
@openfairygui/mcp Checked 9 hours ago Published 1 day ago

FairyGUI Headless Authoring SDK - MCP server adapter for the backend runtime.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

openfairygui_backend_get_capabilities Get Backend Capabilities

Return the OpenFairyGUI backend capability, version, and service-plane snapshot.

openfairygui_backend_open_session Open Backend Session

Open a project directory or .fairy file within allowed roots (stdio: OPENFAIRYGUI_ALLOWED_PROJECT_ROOTS). Acquire a session lock; close the session when finished.

ParameterTypeDescription
projectPath *string

openfairygui_backend_open_project_session Open Project Session

Open a browser-safe backend session from an already loaded UAM project without filesystem access.

openfairygui_backend_get_session Get Backend Session

Return a backend session snapshot by session id.

ParameterTypeDescription
sessionId *string

openfairygui_backend_get_project_outline Get Project Outline

Return a revision-bound project/package/resource/component identity outline without source bytes or full property payloads. Complete tool response is limited to 16 MiB.

ParameterTypeDescription
sessionId *string

openfairygui_backend_query_entity Query Entity Properties

Read revision-bound project/package settings, resource, component-property, display-node, controller (including pages/actions), or transition (including items) snapshots. Project queries use only kind; other queries use formal selectors. Settings snapshots include the complete settings payload for updateProjectSettings/updatePackageSettings. No source bytes; fixed projection with explicit response limits.

ParameterTypeDescription
sessionId *string
target *

openfairygui_backend_query_entities Batch Query Entity Properties

Read up to 50 revision-bound entity snapshots in one call using formal entity targets (project, package, resource, component, displayNode, controller, transition). Per-target not_found/ambiguous errors are returned inline without discarding valid results. No source bytes; explicit response byte budget.

ParameterTypeDescription
sessionId *string
targets *array

openfairygui_backend_query_display_nodes Query Display Nodes in Component

Filter display nodes within one component by modeled properties (kind, name, nameContains, text, textContains, title, titleContains, group, resourceId, url, visible, locked, touchable, hasGears, hasRelations) with an explicit limit (default 50, max 200) and response byte budget. Returns matching displayNode IDs, displayList indices, and key summary properties at the current revision; mutations still require exact displayNodeId selectors.

ParameterTypeDescription
selector *object
sessionId *string
filterobject
limitinteger

openfairygui_backend_search_display_nodes Search Display Nodes Across Components

Search display nodes across all components in the project (or within an optional packageId) using the same modeled DisplayNodeFilter fields as queryDisplayNodes, with an explicit limit (default 50, max 200) and response byte budget. Returns packageId, componentResourceId, componentName, displayNodeId, displayList index, and summary properties at the current revision.

ParameterTypeDescription
sessionId *string
filterobject
limitinteger
packageIdstring

openfairygui_backend_read_session_state Read Session State

Read a detached copy of the currently committed public UAM model without primary asset sourceBytes, with revision, dirty state and source-read diagnostics. Optional expectedRevision rejects stale reads. Does not hydrate, write, reserve history or guarantee downstream usability. Complete tool response is limited to 16 MiB.

ParameterTypeDescription
sessionId *string
expectedRevisioninteger

openfairygui_backend_read_resource_bytes Read Resource Bytes

Read a detached copy of one asset resource primary sourceBytes already held in the session, using exact packageId/resourceId and the required model edit revision. No filesystem hydration or auxiliary-file discovery. Stale reads require restarting the model/bytes read. Complete tool response is limited to 16 MiB.

ParameterTypeDescription
expectedRevision *integer
selector *object
sessionId *string

openfairygui_backend_validate_session Validate Project Session

Validate the current session project structure, references, paths, and available source bytes without writing files. Complete tool response is limited to 16 MiB.

ParameterTypeDescription
sessionId *string

openfairygui_backend_preflight_transaction Preview UAM Transaction

Execute a revision-checked operation batch on an isolated project snapshot and discard the result. Each operations[] item is one object whose "kind" field selects its fields, e.g. {"kind":"renameResource","selector":{"packageId":"<packageId>","resourceId":"<resourceId>"},"newName":"Panel"} with IDs from openfairygui_backend_get_project_outline. Read openfairygui://contracts/operations for every kind and openfairygui://contracts/operations/{kind} for the exact fields of one kind before composing operations. Returns the base revision and Core diagnostics; does not write, reserve a revision, or g…

openfairygui_backend_apply_transaction Apply UAM Transaction

Apply a bounded, revision-checked UAM operation batch. Each operations[] item is one object whose "kind" field selects its fields, e.g. {"kind":"renameResource","selector":{"packageId":"<packageId>","resourceId":"<resourceId>"},"newName":"Panel"} with IDs from openfairygui_backend_get_project_outline. Read openfairygui://contracts/operations for every kind and openfairygui://contracts/operations/{kind} for the exact fields of one kind before composing operations. Check a batch first with openfairygui_backend_preflight_transaction. On stale_write, re-query and reconsider the batch; do not retry…

openfairygui_backend_save_session Save Backend Session

Write the current backend session through its coordinated save path; Node stages project-owned files and reports rollback or retained-backup diagnostics.

ParameterTypeDescription
sessionId *string
expectedRevisioninteger
force
modestring
targetPathstring

openfairygui_backend_materialize_session Materialize Backend Session

Force materialize the current backend session project through the configured project storage without requiring a dirty edit revision.

ParameterTypeDescription
sessionId *string
expectedRevisioninteger
modestring
reasonstring

openfairygui_backend_close_session Close Backend Session

Close a backend session and release its backend-local session lock.

ParameterTypeDescription
sessionId *string

openfairygui_docs_read Read installed documentation

Read index first, then an exact document ID from that index. Offline, read-only and bound to the installed version.

ParameterTypeDescription
idstring