Tools Catalog / Plugin integrations / WPCode / Code Snippets / Woody / snippet_create

snippet_create tool reference for WPCode / Code Snippets / Woody

Write
Group WPCode / Code Snippets / WoodyCapability manage_options

creates a new snippet, inactive by default. It does not execute the code; it only stores it.

Description

creates a new snippet, inactive by default. It does not execute the code; it only stores it.

What it is for

  • Preparing snippets for human review.

Example use case

staging a safe code change.

Sample prompt

Create a new inactive PHP snippet that redirects logged-in users to the dashboard after login.

Sample response

{
  "tool": "snippet_create",
  "status": "ok",
  "updated": true
}

What does snippet_create do?

creates a new snippet, inactive by default. It does not execute the code; it only stores it.

Does snippet_create modify site data?

Yes. It can create, update, activate, deactivate, or delete data depending on arguments.

Which capability is commonly required?

It usually runs with controls compatible with manage_options and the active MCP profile.

How should snippet_create be used safely?

Require confirmation, test in staging first, and verify rollback coverage.

Which plugin is required?

WPCode / Code Snippets / Woody must be installed and active in the target WordPress environment.