WP Webhooks / Docs / update_snippet
AI Ability Pro since v1.3.0

update_snippet

Update a Code Glue snippet — Update an existing Code Glue snippet's name, code or tags.

$

Update an existing Code Glue snippet's name, code or tags. If the snippet is already assigned and enabled on a webhook, the new code runs on the next dispatch — re-test with preview_snippet after editing. Registered as the WordPress Ability flowsystems-webhook-actions/update_snippet, so external AI tools (Claude Code, Cursor) can call it over MCP or REST with a scoped API token.

/ Plan step shape

{ "ability": "update_snippet", "input": { "id":, "name":, "code":, "tags":} }

/ Scope & confirmation

Minimum API-token scope for external (MCP/REST) callers: full. Runs without a confirmation pause (the overall plan is still user-approved before execution starts).

/ Input fields

NameInTypeReqDescription
idparamintegeryes
nameparamstring
codeparamstring
tagsparamarray

/ Examples

Plan step as the AI Builder proposes it

{
  "id": "step_1",
  "ability": "update_snippet",
  "summary": "…",
  "input": {
    "id": 4,
    "code": "$payload[\"tag\"] = {{ $args.0.total }} > 250 ? \"vip\" : \"standard\";\nreturn $payload;"
  }
}

/ Related

Ready

Your next automation is
one sentence away.

$ wp plugin install flowsystems-webhook-actions --activate