Skip to content

Content Search

New in v3.3.0. search-content lets an agent find the site’s own pages, saved templates, widgets, and global styles by natural-language query, so it can clone or adapt existing work instead of building from scratch. Two tools, edit_posts, always-on, enabled by default.

Searches an indexed corpus of the site’s content and returns the best matches ranked by relevance.

Input:

  • query: natural language, e.g. "pricing table", "team testimonials".
  • types (optional): restrict to page, template, widget, global_color, global_font, global_class.
  • limit (optional): max results (default 20).

Returns: { results: [ { object_type, object_id, title, score, snippet, meta } ], count }.

The agent then reads or clones the winner with the relevant tool: get-page-structure, apply-template, add-free-widget, etc.

Rebuilds the search index from the current site. The index also updates incrementally whenever a page or template is saved, so this is only needed for a full refresh or a first-time build.

Input: types (optional): restrict the rebuild. Returns: the number of items indexed per group.

v1 is strong lexical retrieval: field-weighted TF-IDF (titles weighted above body) over a materialized index (the plugin’s first custom database table, {prefix}emcp_search_index). Each page’s searchable text is built from the same normalized view as the Page Snapshot: headings, widget types, labels, and the tokens actually in use. An embedding-backed semantic rerank is a planned upgrade behind the same tool.

Without search, an AI rebuilds a “pricing section” from nothing every time, inconsistent, slower, and ignoring the design system you already have. With it, the agent finds your existing pricing template, clones it, and adapts the copy. Reuse-not-recreate is the single biggest lever on output consistency.

1. search-content "testimonials" → finds your existing testimonials template
2. get-page-structure / apply-template → clone it onto the new page
3. update-widget → swap in the new quotes