Skip to content

feat(mcp-server): typed fields for agents (RFC-0041 step 4) - #97

Merged
Madraka merged 1 commit into
mainfrom
feat/fields-mcp
Oct 23, 2026
Merged

Madraka merged 1 commit into
mainfrom
feat/fields-mcp

Conversation

@Madraka

@Madraka Madraka commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Step 4 of RFC-0041's rollout (ADR-0043), built on #94–#96.

Tools (105 → 109)

  • list_collections: a new locale input; returns fields and fieldsSchema (fieldsJsonSchema) for collections that define fields.
  • create_entry / update_entry: fields are checked in precheck, so invalid output never reaches the person approving. The checks cover changed keys only, unknown keys, non-localized values on translations, requiredToPublish when the target is review or published, and assets in the same site. Refusals carry details.issues with paths.
  • update_entry: takes fields as a merge patch (null removes a key), and its approval prompt lists the typed changes readably.
  • update_collection: takes fields. The store's guard runs in a dry run, so risky edits are refused with field_change_needs_operation and a hint naming the operation tools.
  • New: rename_field, change_field_type, set_field_localized, remove_field.
    • Scopes site:write + content:write, approverScopes: ["site:settings"], requiresApproval; they wait for a person in every mode, bypass included. No new scopes.
    • The approval prompt is built from the dry run: counts, samples and a theme warning.
    • Continuing an unfinished operation (operationId) needs a new approval (ADR-0043 Q9). dryRun with an operationId returns the status.
  • Agent guidance: hints for every field error code, and a "Typed fields" paragraph in the server instructions.

Tests

  • mcp-server: 159/159, 9 of them new.
  • agent-runtime: 72/72.
  • API: mcp and approver-scopes tests pass.
  • CLI: e2e and media tests pass.
  • Typecheck, size check and the MCP doc check are clean.

Follow-ups

  • The asset check is reimplemented in mcp-server, mirroring the store's rules. It should move to one shared helper.
  • RFC §5's translation tools: get_translation_source should return only localized values, and save_translation should refuse non-localized ones. The store already refuses them (field_not_localized).
  • create_collection doesn't take fields; adding them to a new collection takes a second approved call.

Changeset: minor (mcp-server).

🤖 Generated with Claude Code

- list_collections returns fields and fieldsSchema (by locale).
- create_entry / update_entry check fields in precheck (changed-only,
  unknown keys, non-localized on translations, requiredToPublish,
  assets); update_entry takes fields as a merge patch and its approval
  lists typed changes.
- update_collection takes field definitions; risky edits are refused
  with a hint naming the operation tools.
- New tools rename_field, change_field_type, set_field_localized and
  remove_field: site:write + content:write, a person holding
  site:settings approves in every mode, the approval shows the dry run,
  continuing needs a new approval. 105 → 109 tools.
- Hints for every field code; server instructions on typed fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka
Madraka merged commit 94d575f into main Oct 23, 2026
4 checks passed
@Madraka
Madraka deleted the feat/fields-mcp branch October 23, 2026 02:05
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