Add new_slug parameter to update_note MCP tool #2

Merged
forgejo_admin merged 1 commit from 1-slug-rename into main 2026-02-25 23:27:25 +00:00

Summary

  • Add new_slug optional parameter to the update_note MCP tool, enabling note slug renames via the MCP interface
  • Maps new_slug to slug in the API request body (matching the pal-e-docs API convention)

Changes

  • src/pal_e_docs_mcp/tools/notes.py: Added new_slug: str | None = None parameter to update_note, mapped to body["slug"] in the request

Test Plan

  • Python syntax valid (ast.parse)
  • No test suite in this repo; verified manually that the parameter follows the same pattern as all other optional fields
  • Companion API change merged in forgejo_admin/pal-e-docs PR #24

Review Checklist

  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
## Summary - Add `new_slug` optional parameter to the `update_note` MCP tool, enabling note slug renames via the MCP interface - Maps `new_slug` to `slug` in the API request body (matching the pal-e-docs API convention) ## Changes - `src/pal_e_docs_mcp/tools/notes.py`: Added `new_slug: str | None = None` parameter to `update_note`, mapped to `body["slug"]` in the request ## Test Plan - [x] Python syntax valid (ast.parse) - [x] No test suite in this repo; verified manually that the parameter follows the same pattern as all other optional fields - [x] Companion API change merged in forgejo_admin/pal-e-docs PR #24 ## Review Checklist - [x] No secrets committed - [x] No unnecessary file changes - [x] Commit messages are descriptive ## Related Notes - `plan-2026-02-25-agent-profiles` — phase `phase-2026-02-25-3.5-claude-custom-cleanup` - forgejo_admin/pal-e-docs-mcp#1: Add new_slug parameter to update_note MCP tool - forgejo_admin/pal-e-docs#23: Add slug rename support to note update API
Maps new_slug to the slug field in the API request body, enabling
note slug renames via the MCP interface.

Refs: forgejo_admin/pal-e-docs-mcp#1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

PR #2 Review

BLOCKERS

None.

NITS

  1. Review Checklist checkbox: The PR body's Review Checklist is missing the [x] Passed automated review-fix loop checkbox. This should be checked after the review-fix loop completes (not a blocker since this is the first review pass, but the checkbox should be present and unchecked).

SOP COMPLIANCE

  • Branch named after issue (1-slug-rename maps to issue #1)
  • PR body follows template-pr-body (all 5 sections: Summary, Changes, Test Plan, Review Checklist, Related Notes)
  • Related Notes references the plan slug (plan-2026-02-25-agent-profiles with phase phase-2026-02-25-3.5-claude-custom-cleanup)
  • No secrets committed
  • No unnecessary file changes (1 file, +3 lines)
  • Commit messages are descriptive
  • Scope is minimal and focused

CODE REVIEW

  • Parameter new_slug: Annotated[str | None, Field(description="Rename the note to this slug")] = None correctly follows the existing annotation pattern used by all other optional parameters in update_note.
  • Naming new_slug (not slug) correctly avoids collision with the existing slug parameter that identifies the target note. Clear intent.
  • Mapping body["slug"] = new_slug matches the pal-e-docs REST API field name for slug rename (confirmed by companion PR forgejo_admin/pal-e-docs#23).
  • Guard if new_slug is not None matches the conditional pattern of all other fields. No unnecessary API payload.
  • Parameter placement (after title, before html_content) is logically ordered.
  • No edge cases, bugs, or security issues detected.

VERDICT: APPROVED

Clean, minimal change. Follows existing patterns exactly. SOP fully compliant. Ready to merge pending user approval.

## PR #2 Review ### BLOCKERS None. ### NITS 1. **Review Checklist checkbox**: The PR body's Review Checklist is missing the `[x] Passed automated review-fix loop` checkbox. This should be checked after the review-fix loop completes (not a blocker since this is the first review pass, but the checkbox should be present and unchecked). ### SOP COMPLIANCE - [x] Branch named after issue (`1-slug-rename` maps to issue #1) - [x] PR body follows `template-pr-body` (all 5 sections: Summary, Changes, Test Plan, Review Checklist, Related Notes) - [x] Related Notes references the plan slug (`plan-2026-02-25-agent-profiles` with phase `phase-2026-02-25-3.5-claude-custom-cleanup`) - [x] No secrets committed - [x] No unnecessary file changes (1 file, +3 lines) - [x] Commit messages are descriptive - [x] Scope is minimal and focused ### CODE REVIEW - Parameter `new_slug: Annotated[str | None, Field(description="Rename the note to this slug")] = None` correctly follows the existing annotation pattern used by all other optional parameters in `update_note`. - Naming `new_slug` (not `slug`) correctly avoids collision with the existing `slug` parameter that identifies the target note. Clear intent. - Mapping `body["slug"] = new_slug` matches the pal-e-docs REST API field name for slug rename (confirmed by companion PR forgejo_admin/pal-e-docs#23). - Guard `if new_slug is not None` matches the conditional pattern of all other fields. No unnecessary API payload. - Parameter placement (after `title`, before `html_content`) is logically ordered. - No edge cases, bugs, or security issues detected. ### VERDICT: APPROVED Clean, minimal change. Follows existing patterns exactly. SOP fully compliant. Ready to merge pending user approval.
forgejo_admin deleted branch 1-slug-rename 2026-02-25 23:27:25 +00:00
Sign in to join this conversation.
No description provided.