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.
emcp-tools/search-content
Section titled “emcp-tools/search-content”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 topage,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.
emcp-tools/reindex-search
Section titled “emcp-tools/reindex-search”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.
How it works
Section titled “How it works”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.
Why it matters
Section titled “Why it matters”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 template2. get-page-structure / apply-template → clone it onto the new page3. update-widget → swap in the new quotes