Skip to content

Content MCP tools — the four tools on /mcp#24

Merged
hendrikebbers merged 3 commits into
mainfrom
feat/012-content-mcp-tools
Jul 13, 2026
Merged

Content MCP tools — the four tools on /mcp#24
hendrikebbers merged 3 commits into
mainfrom
feat/012-content-mcp-tools

Conversation

@herbie-bot

Copy link
Copy Markdown
Collaborator

Summary

ContentMcpToolProvider implements the library McpToolProvider (auto-aggregated by McpServerConfig) and exposes the four content tools on /mcp: search_content, list_posts, get_post, list_categories. They are thin adapters over ContentSearchService (spec 011) using the house helpers for schemas, paging, access logging, and JSON-RPC error mapping. /mcp now advertises real content tools.

Spec

  • docs/specs/012-content-mcp-tools/{design,behaviors,steps}.md

Changes

  • ContentMcpToolProvider (gated on openelements.mcp.enabled); tool logic extracted to package-private methods for direct testing
  • Bootstrap guard (McpUnavailableException) on search/list; get_post maps invalid-argument / not-found
  • Drift: spec 001's ContentMcpApplicationTests asserted an empty tool catalog; updated to expect the provider, with a Drift Log entry in 001-project-skeleton/behaviors.md
  • Build fix: pinned spring-services to 1.3.0-20260712.175350-13 — the floating 1.3.0-SNAPSHOT published a broken (dependency-less) -14 POM that broke compilation

Test coverage

  • 9 tests via a capturing ContentSearchService subclass + real McpToolSupport/McpPaging: registration, delegation, filter pass-through, size clamp, missing-arg/not-found/unavailable errors. 130 tests total; spec-review and quality-review clean.

Closes #23

🤖 Generated with Claude Code

- ContentMcpToolProvider implements McpToolProvider (auto-aggregated by
  McpServerConfig, gated on openelements.mcp.enabled): search_content,
  list_posts, get_post, list_categories. Thin adapters over
  ContentSearchService using McpTools/McpToolSupport/McpPaging; paging
  clamped; bootstrap guard -> McpUnavailableException; get_post maps
  IllegalArgumentException (neither url/id) and NoSuchElementException
  (absent). Tool logic extracted to package-private methods for testing.
- ContentMcpToolProviderTest via a capturing ContentSearchService subclass.
- Drift: spec 001's ContentMcpApplicationTests asserted an empty tool
  catalog; updated to expect the provider, with a Drift Log entry in
  001-project-skeleton/behaviors.md.
- Build: pin spring-services to 1.3.0-20260712.175350-13 (the floating
  1.3.0-SNAPSHOT published a broken dependency-less -14 POM). 130 tests green.
- steps.md; refresh CLAUDE.md.

Refs #23
@hendrikebbers hendrikebbers merged commit 59ada89 into main Jul 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Content MCP tools — the four tools on /mcp

2 participants