Skip to content

Update: tool names - #226

Merged
VirajAgarwal-couchbase merged 1 commit into
mainfrom
update/tool-names
Aug 7, 2026
Merged

Update: tool names#226
VirajAgarwal-couchbase merged 1 commit into
mainfrom
update/tool-names

Conversation

@VirajAgarwal-couchbase

@VirajAgarwal-couchbase VirajAgarwal-couchbase commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Related Issue

Resolves: https://couchbase.slack.com/archives/C0976TJJ83W/p1786020858842629

What does this change do?

Renames two KV tools to match the project's action-first naming convention:

  • sub_document_lookup_inlookup_subdocument
  • sub_document_mutate_inmutate_subdocument

Evidence of Testing

Automated tests — commands run and results summary:

uv run pytest tests/unit/  →  480 passed
uv run ruff check .        →  All checks passed
uv run ruff format --check . → 90 files already formatted

Environments tested (both are required):

  • Couchbase Capella (version: ____)
  • Self-managed Couchbase Server (version: ____, e.g. via

Manual verification — Not performed in this session (no available); grepped the full repo to confirm zero remainingreferences to the old names anywhere in .py/.md files before opening this PR.

Compatibility Considerations

Breaking change: this renames two public MCP tool names. Any existing client, agent config, or automation that calls sub_document_lookup_in or
sub_document_mutate_in by name will break and must be upda/mutate_subdocument`. No change to parameters, return shapes, or read-only/annotation behavior — only the tool names themselves. No new dependencies. No Capella vs. self-managed behavior difference.

Checklist

  • Linked to an issue (required for new tools). The issue can be on JIRA (preferred for internal contributors) or GitHub.
  • Uses the Couchbase SDK (REST fallback justified in theA, pure rename, no SDK/REST changes.
  • Works on both Capella and self-managed Couchbase Server
  • No changes to cb_mcp.core contracts / managed MCP inst) — tool behavior/contracts unchanged, only names.
  • Unit tests added/updated
  • Integration tests added/updated (for cluster-touching rence new names.
  • Read-only mode and tool annotations handled (for new/changed tools) — annotations carried over unchanged under the new names.
  • Evidence of testing included above
  • Docs updated (README, DOCKER.md) for user-facing changes
  • Lint and pre-commit pass

@VirajAgarwal-couchbase VirajAgarwal-couchbase self-assigned this Aug 7, 2026
@VirajAgarwal-couchbase
VirajAgarwal-couchbase marked this pull request as ready for review August 7, 2026 04:09
Copilot AI lite review requested due to automatic review settings August 7, 2026 04:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR renames two Couchbase KV sub-document MCP tools to follow the project’s action-first naming convention, and updates the tool registry, annotations, and test/docs references to match.

Changes:

  • Renamed KV tool functions: sub_document_lookup_inlookup_subdocument, sub_document_mutate_inmutate_subdocument.
  • Updated tool registration/annotations and read-only/write tool category lists to use the new names.
  • Updated unit, integration, and accuracy tests plus README/DOCKER tool tables to reference the new tool names.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/unit/test_read_only_mode.py Updates expected tool-name sets for read-only filtering to the new KV tool names.
tests/unit/test_kv_tools_unit.py Updates KV tool imports/calls and docstrings in unit tests to the new names.
tests/integration/test_kv_tools.py Renames integration test functions and tool invocations to call lookup_subdocument/mutate_subdocument.
tests/integration/conftest.py Updates integration expectations and category listings for registered tool names.
tests/accuracy/tool_calling/test_kv.py Updates accuracy “expected tool” selections and case IDs to the renamed tools.
tests/accuracy/result_validation/test_kv.py Updates result-validation narrative/comments and mutate subdocument case IDs for the renamed tools.
src/cb_mcp/tools/kv.py Renames the two KV tool entrypoints and updates in-doc references accordingly.
src/cb_mcp/tools/init.py Updates tool imports, READ_ONLY/KV_WRITE lists, and TOOL_ANNOTATIONS keys to the new tool names.
README.md Updates the public tool list to reflect the new KV tool names.
DOCKER.md Updates the container docs tool list to reflect the new KV tool names.
Suppressed comments (1)

tests/unit/test_kv_tools_unit.py:272

  • The test class name still references the old tool name (TestSubDocumentMutateIn), but the tool/function was renamed to mutate_subdocument. Renaming the class keeps test names aligned with the public API and improves discoverability.
class TestSubDocumentMutateIn:
    """mutate_subdocument: spec building, atomic error handling, and result shaping."""

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/unit/test_kv_tools_unit.py
@VirajAgarwal-couchbase
VirajAgarwal-couchbase merged commit 4a0fad1 into main Aug 7, 2026
18 checks passed
@nithishr
nithishr deleted the update/tool-names branch August 10, 2026 13:24
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.

4 participants