Skip to content

feat(mcp-server): collection tools; create_entry only in registered collections (RFC-0040 step 4) - #87

Merged
Madraka merged 1 commit into
mainfrom
feat/collections-mcp
Oct 22, 2026
Merged

Madraka merged 1 commit into
mainfrom
feat/collections-mcp

Conversation

@Madraka

@Madraka Madraka commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

RFC-0040 / ADR-0042, step 4 of 4. Stacked on #85; independent of the Studio PR #86.

  • list_collections (content:read, read-only): the registry with names per locale, icon, entry counts by status, effective permalink, feed/sitemap/sort with defaults filled in, and the taxonomies that apply.
  • create_collection and update_collection:
    • site:write, requiresApproval, approverScopes: ["site:settings"], and classify that is person in every mode (bypass included) or read for dryRun. This is the same policy as set_collection_permalink.
    • The precheck refuses these before anyone is asked:
      • an overlap (path_conflict / reserved_path, via the store's dry-run site update);
      • an existing declared key (collection_exists);
      • an unknown collection for update (collection_undeclared);
      • a missing default-locale name, and more than 50 collections.
    • The approval text names the key, the labels and the address, and says the key cannot be renamed.
    • update_collection merges labels by locale; permalink changes stay with set_collection_permalink.
  • create_entry: a precheck refuses a collection that is not in the registry (collection_undeclared) and says to use create_collection. Inferred collections and posts keep working. Translations create entries only in their source's collection, so they need no check.
  • Server instructions are updated, the README tool reference is regenerated (node scripts/mcp-tools-doc.ts --check ok), and the new error codes have hints.
  • Tests: mcp-server 150/150. The new test/collections.test.ts covers approval in every mode, dry run, the refusal before and acceptance after create_collection, overlaps, duplicates and the label merge. The pinned tool lists were updated (105 tools).
  • Changeset: mcp-server, minor.

Refs #71

🤖 Generated with Claude Code

… registered collections (RFC-0040 step 4)

list_collections (content:read) returns the registry with names, icon,
counts, permalink, settings with defaults and the taxonomies that apply.
create_collection and update_collection (site:write, approval in every
mode, approverScopes site:settings, dryRun) declare and name
collections; overlaps, duplicates and a missing default-locale name are
refused in the precheck. create_entry's precheck refuses a collection
outside the registry (collection_undeclared); inferred collections keep
working. Server instructions and the generated tool reference updated.

Refs #71 (RFC-0040, ADR-0042)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
Base automatically changed from feat/collections-store to main October 22, 2026 19:55
@Madraka
Madraka merged commit 0cd4a7d into main Oct 22, 2026
4 checks passed
@Madraka
Madraka deleted the feat/collections-mcp branch October 22, 2026 20:15
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.

1 participant