You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mcp(refactor[instructions]): surface call-site rules in tool descriptions
Follow-up to 6432646 which split ``_BASE_INSTRUCTIONS`` into named
gap-explainer / positive-guidance segments and named the "prefer the
tool description" decision. Phase 1 of the slim-down acts on it:
per-tool rules move from the global card (or invisible module
docstrings) into tool descriptions an agent sees on every
``list_tools`` call.
* ``show_hooks``: docstring now carries the no-set_hook rationale
(write-hooks survive process death, so they belong in the tmux
config file, not a transient MCP session). Previously only in the
``hook_tools`` module docstring — FastMCP doesn't surface those.
* ``load_buffer``: docstring carries the no-list_buffers /
clipboard-privacy rationale. Same module-docstring-only problem.
* ``capture_pane``: registered with a ``description=`` override
pointing at ``snapshot_pane``, ``wait_for_text``, and
``search_panes``. The function docstring stays focused on
parameters for Sphinx; the override carries the agent-facing
cross-references without bloating the human docstring.
* ``send_keys``: explicit anti-poll guidance naming ``wait_for_text``
as the server-side blocking primitive.
* ``list_panes`` / ``list_windows``: sharpened metadata-vs-content
phrasing with the user-trigger language ("panes that contain X").
New parametrized ``test_tool_description_includes`` asserts each tool
is registered AND its description carries the cross-reference, so a
future rename that drops the rule fails loudly instead of silently.
Pure addition — ``_BASE_INSTRUCTIONS`` is unchanged. The redundant
card-level segments come out in a later phase once the call-site
copies have shipped.
0 commit comments