Skip to main content

Tool Reference

Every tool is typed: inputs are validated against the official Etch public API schemas and results come back as structured content your harness can rely on. The Effect column is the key to the editing model:

  • read - never changes anything.
  • buffered - lands in the open builder document; saved only by an explicit etch_save_document.
  • persist - written to the database immediately.
  • session - changes agent-side session state (which target is selected), nothing in WordPress.

81 tools as of 2.1.0.

Targets, status, and navigation

ToolEffectWhat it does
etch_list_targetsreadList connected Etch targets and the current working target.
etch_select_targetsessionSelect the working target for future tools.
etch_get_statusreadEtch availability and runtime status, including unsaved changes.
etch_get_navigation_contextreadActive document identity and builder navigation context.
etch_list_postsreadList posts visible from the target, optionally by post type.
etch_list_templatesreadList templates visible from the target.
etch_open_postbufferedSwitch the target to a post; refused while changes are unsaved.
etch_open_templatebufferedSwitch the target to a template; refused while changes are unsaved.
etch_go_tosessionNavigate the builder to a supported UI area.
etch_get_color_schemereadRead the builder color scheme.
etch_set_color_schemepersistSet the builder color scheme.

Reading the document

ToolEffectWhat it does
etch_get_document_treereadThe current document's full block tree.
etch_get_block_jsonreadOne block's full JSON payload.
etch_get_selected_blockreadThe block currently selected in the builder.
etch_find_blocksreadFind block ids by a typed predicate.

Editing blocks

ToolEffectWhat it does
etch_insert_blocksbufferedInsert validated blocks.
etch_replace_blockbufferedReplace one block.
etch_update_blockbufferedPatch one block (attributes, text, classes).
etch_mutate_block_attributesbufferedGranular attribute and class changes on one block.
etch_duplicate_blockbufferedDeep-copy one block.
etch_move_blockbufferedMove one block within the document.
etch_delete_blockbufferedDelete one block.
etch_copy_blockreadCopy one block into an opaque portable payload.
etch_paste_blockbufferedPaste a copied payload anywhere in the document.

Saving and history

ToolEffectWhat it does
etch_save_documentpersistExplicitly save the active document. Always user-approved.
etch_undobufferedUndo the last document operation; repeatable.
etch_redobufferedRedo the last undone operation.

Buffered styles

ToolEffectWhat it does
etch_list_stylesreadBuffered style rules and CSS variables.
etch_apply_style_patchbufferedApply validated rules and CSS variables without saving.
etch_delete_stylebufferedDelete one buffered style rule.
etch_get_style_variablereadRead one global CSS variable.
etch_remove_style_variablebufferedRemove one buffered CSS variable.

Global stylesheets

ToolEffectWhat it does
etch_list_stylesheetsreadList global stylesheets, optionally including CSS.
etch_get_stylesheetreadRead one global stylesheet.
etch_create_stylesheetpersistCreate a global stylesheet.
etch_update_stylesheetpersistUpdate a global stylesheet.
etch_append_stylesheetpersistAppend CSS to a global stylesheet.
etch_delete_stylesheetpersistDelete a global stylesheet.
etch_list_custom_mediareadList global @custom-media definitions.
etch_add_custom_mediapersistAdd an @custom-media definition.

Components

ToolEffectWhat it does
etch_list_componentsreadComponent summaries, optionally filtered.
etch_get_component_jsonreadOne component including its block tree.
etch_upsert_agent_componentpersistCreate or update a component by key.
etch_delete_agent_componentpersistDelete components by key.
etch_enter_component_edit_modesessionFocus a component for direct editing of its tree.
etch_save_component_edit_modepersistPersist the focused component.
etch_exit_component_edit_modesessionLeave focus mode, optionally reverting.
etch_is_in_component_edit_modereadWhether focus mode is active.

Loops

ToolEffectWhat it does
etch_list_loopsreadList buffered loop definitions.
etch_upsert_loopbufferedCreate or replace a loop by key.
etch_delete_loopbufferedDelete a loop by id.
etch_bind_loop_to_blockbufferedBind a loop definition to a loop block.

Custom fields

ToolEffectWhat it does
etch_list_field_groupsreadList all custom field groups.
etch_get_field_groupreadRead one field group by id.
etch_create_field_grouppersistCreate a field group.
etch_update_field_grouppersistReplace a field group.
etch_delete_field_grouppersistDelete a field group.
etch_add_fieldpersistAdd a field to a group.
etch_update_fieldpersistReplace a field in a group.
etch_remove_fieldpersistRemove a field from a group.
etch_get_field_valuesreadAll resolved field values for a post.
etch_get_field_valuereadOne resolved field value for a post.
etch_set_field_valuepersistSet one field value.
etch_set_field_valuespersistSet several field values at once.
etch_delete_field_valuepersistClear one field value.

ACSS

ToolEffectWhat it does
etch_detect_acssreadDetect Automatic.css and sample its live variables in the builder tab.

Skills

ToolEffectWhat it does
etch_list_skillsreadList core, user, and runtime skills.
etch_get_skillreadRead one skill by name and provider.
etch_get_skill_referencereadRead a declared reference file for a skill.
etch_list_local_skillsreadList local core and user skills.
etch_create_local_skillpersistCreate a user skill.
etch_update_local_skillpersistUpdate a user skill.
etch_validate_local_skillsreadValidate locally authored user skills.
etch_create_skill_referencepersistCreate or overwrite a reference file for a local skill.

Project Memory

ToolEffectWhat it does
etch_recall_project_memoryreadRecall the Project Digest and record brief. Always first.
etch_inspect_project_memoryreadAudit stored memory per project.
etch_remember_project_memorypersistStore one confirmed Decision, Observation, or Reference.
etch_correct_project_memorypersistCorrect one record's payload under an expected revision.
etch_forget_project_memorypersistDelete one record or a confirmed aggregate.
etch_write_project_digestpersistWrite the narrative Project Digest.
etch_recover_project_memorypersistExplicit URL rebind, or quarantine a corrupt store.