feat: add include_cold param to list_notes tool #44
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-mcp!44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "43-add-include-cold-param-to-list-notes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add
include_coldboolean parameter to thelist_notesMCP tool so agents can retrieve completed/archived/deprecated notes when researching historical decisions or provenance. Defaults tofalseto keep token cost low by excluding cold notes.Changes
src/pal_e_docs_mcp/tools/notes.py— Addedinclude_cold: Annotated[bool, Field(...)]parameter afterparent_slug, forwarded toget_sdk().list_notes(include_cold=...). Updated docstring to mention cold exclusion behavior.tests/test_param_alignment.py— AddedTestListNotesIncludeColdclass with 4 tests: default false, true forwarded, false forwarded, and coexistence with other params.Test Plan
pytest tests/ -x -q— 59 tests pass (4 new)ruff formatandruff checkcleanReview Checklist
Annotated[..., Field(...)]patternFalse— no behavior change for existing callersinclude_coldon main (f56a903); published 0.4.0 will pass it as query param at runtimeRelated
plan-2026-03-16-knowledge-architectureSelf-Review: LGTM
Correctness
Annotated[bool, Field(...)]matches existing patterns (e.g.,is_publicincreate_note)parent_slugper issue specFalse-- no behavior change for existing callersinclude_cold=include_cold-- correctTests
TestListNotesIncludeCold: default false, explicit true, explicit false, coexistence with other paramsmock_sdkfixture correctlyLint/Test
ruff format+ruff checkcleanNo issues found. Ready for human review.
PR #44 Review
DOMAIN REVIEW
Tech stack: Python / MCP tool layer (pydantic
Field+Annotatedpattern) bridging to pal-e-docs-sdk.Parameter design: The
include_coldparameter follows the establishedAnnotated[type, Field(description=...)]pattern used by every other parameter inlist_notes. Placement afterparent_slugmaintains the existing parameter ordering convention (required params first, optional filters after).SDK alignment verified: The SDK's
list_notesmethod at/home/ldraney/pal-e-docs-sdk/src/pal_e_docs_sdk/notes.pyline 19 acceptsinclude_cold: bool = Falsewith identical default and semantics. The SDK only sends the query param whenTrue(line 34-35), so the defaultFalseis a true no-op for existing callers.Type correctness:
boolwith defaultFalseis correct. No CSV splitting or sentinel handling needed (unlike tags/labels params). The value is forwarded directly without transformation, which is the right approach.Docstring: Updated to document cold exclusion behavior. The added line integrates cleanly with the existing docstring structure.
Test quality: 4 tests in
TestListNotesIncludeColdcovering:Tests follow the exact same
mock_sdkfixture pattern andcall_argsassertion style used throughout the test file. The coexistence test is particularly good -- it verifiesinclude_colddoes not interfere with other parameter forwarding.BLOCKERS
None.
NITS
None. This is a minimal, well-scoped change. The description text, default value, parameter placement, and test coverage all follow established patterns precisely.
SOP COMPLIANCE
43-add-include-cold-param-to-list-notes(references #43)plan-2026-03-16-knowledge-architecturefeat: add include_cold param to list_notes tool)PROCESS OBSERVATIONS
Clean single-purpose feature addition. The SDK dependency is confirmed present (
include_coldon SDK main atf56a903). The PR body correctly notes that SDK 0.4.0 will pass it as a query param at runtime -- this is good provenance documentation. Zero deployment risk since the default isFalse(backward compatible). Change failure risk: negligible.VERDICT: APPROVED