chore(mcp): audit model-facing prompts, tool descriptions, and skills - #1603
phernandez wants to merge 1 commit into
Conversation
Fix contract errors and dated prompting patterns in text that reaches the model: MCP tool descriptions, server instructions, prompts, templates, shared skills, Claude Code plugin skills, Hermes/OpenClaw tool text, and agent rule files. - Correct wrong calls: delete_note guidance argument order, append+section in skills, noteType -> note_type, create_memory_project params, bm cloud set-key -> api-key save, recent_activity project="default" - Add contract detail to under-described tools (search_notes, grep, edit_note, move_note, view_note, read_content, schema_*, search/fetch) - Remove note-capture pressure and scripted "Ask user" steering that contradicted "do not create notes unprompted" - Drop workarounds for fixed bugs, migration-relative wording, stale CLI commands and tool lists; delete dead mcp/prompts/utils.py - Regenerate man pages Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YTL4S8SSKFZ8UvQc7AdAwc Signed-off-by: phernandez <paul@basicmachines.co>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b27411bd70
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "description": ( | ||
| "Read a specific note by title, permalink, or memory:// URL. Returns the " | ||
| "full markdown body with observations and relations. Permalinks returned " | ||
| "by bm_write carry their own project routing." |
There was a problem hiding this comment.
Preserve routing for cross-project write permalinks
When Hermes calls bm_write(project="other-local-project", ...), write_note returns an unqualified permalink such as folder/note because local responses have no workspace context. A subsequent bm_read that follows this new guidance and supplies only that permalink causes _translate_args to inject Hermes's configured default project, so it can return a same-named note from the wrong project or report the new note missing. Either instruct callers to retain the write's project/project_id, or return a genuinely project-qualified identifier for every cross-project write.
AGENTS.md reference: AGENTS.md:L338-L343
Useful? React with 👍 / 👎.
Summary
This PR audits the text that reaches the model: MCP tool descriptions, server instructions, prompts, skills, plugin skills, and agent rule files. It fixes dated prompting patterns and contract errors, targeting current Claude models (Opus 5.5 / Fable 5.1 / Opus 5) while staying compatible with other MCP clients.
Most fixes are contract errors. There was little dated-idiom cruft.
Wrong calls and wrong facts in model-facing text
delete_noteerror guidance suggested positional calls such asdelete_note("{project}", ...). That argument order would delete a note named after the project. All suggested calls now use keyword arguments.edit_note(operation="append", section=...), butappendignoressectionand writes at end of file. These are nowinsert_after_section/insert_before_section.noteType=16 times; the parameter isnote_type.create_memory_project(name=, path=)is nowproject_name=/project_path=.bm cloud set-keyno longer exists. The two places that still suggested it now saybm cloud api-key save.recent_activityprompt example passedproject="default".memory-schemadescribed validate/diff output that the code does not produce.Under-described tools (Group 3: add contract detail)
Tools with an explicit
description=never send their docstring to clients.search_notessent 13 words. This PR adds full contract text to:search_notes, including itsentity_types/note_types/categoriesargumentsgrep, which is not a regex search and defaults to hybrid semantic plus full-text matchingedit_note, covering all six operations and theexpected_replacementsdefaultmove_note, covering the same-project rule, extension matching, and permalink behaviorview_note,read_content, theschema_*tools, and the OpenAI-onlysearch/fetchadaptersdelete_note,write_note,read_noteBehavior steering removed
continue_conversation, the.hbstemplates, andread_notenot-found output. The text now offers to save a note instead of pushing the model to write one.recent_activityandlist_memory_projectsoutput.recent_activityat every session start. Man pages are read when a question is open, not before each tool's first use.mcp/prompts/utils.pyand its tests.Rule files and runbooks
AGENTS.md:mcp-publisherlocally..claude/commands:release.md,spec.md, andtest-live.mdare updated for the current repo.sync_statusis gone, and the v0.13 pins are removed.docs/agent-guide.md.--prerelease=allowstays in install docs because PyPI 0.23.2 still pins a FastMCP beta. Only the stated reason changed. It can be dropped after the next release.Deliberately kept
Test plan
just man-regen(10 pages updated)just package-check-skills,just package-check-hermes,just package-check-claude-code(includingclaude plugin validate --strict), and OpenClaw tests / biome / tscuv run pytest tests/mcp tests/test_man_pages.py tests/api/v2/test_prompt_router.py tests/cli test-int/mcptyerrors are unresolvedpymilvusimports (the milvus extra was not installed); none come from this diff.🤖 Generated with Claude Code
https://claude.ai/code/session_01YTL4S8SSKFZ8UvQc7AdAwc