feat(abilities): add related posts ability#5
Merged
Conversation
Co-Authored-By: Codex <codex@openai.com>
There was a problem hiding this comment.
Pull request overview
Adds a second public Abilities/MCP tool wpvdb/find-related-posts that wraps Search::related_to_post(), returning the same agent-safe result projection as the existing semantic search ability. Includes input/output schemas, README + POT/PO updates, and new unit coverage along with bootstrap stubs needed to exercise the abilities layer.
Changes:
- Register
wpvdb/find-related-postsability with input/output schemas and reuseformat_results()for agent-safe output. - Expand README and translation catalogs to document the new ability.
- Add
AbilitiesTestplus Abilities/API/user/transient stubs in the test bootstrap.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| includes/class-abilities.php | Adds FIND_RELATED constant, registration, executor, and input/output schemas for related-post lookup. |
| README.md | Documents the new ability and its REST route alongside semantic search. |
| languages/wpvdb-search.pot | New translatable strings for the related ability. |
| languages/wpvdb-search-es_ES.po | Spanish translations (several marked fuzzy) for the related ability strings. |
| tests/Unit/AbilitiesTest.php | New tests covering ability registration and related execution paths. |
| tests/bootstrap.php | Adds stubs (add_action, caps, transients, wp_register_ability*, get_post_type_object) and loads the abilities class. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
wpvdb/find-related-postsas a read only MCP public Ability.Search::related_to_post()and returns agent safe related post results with canonical URLs.Test steps
wpvdb-searchto a test site with MCP Adapter active.mcp-adapter-discover-abilities. Confirmwpvdb/semantic-searchandwpvdb/find-related-postsappear.mcp-adapter-execute-abilitywithability_nameset towpvdb/find-related-postsand a sourcepost_id. Confirm the response hasmodeset torelatedand returns related results.