Update: tool names - #226
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_in→lookup_subdocument,sub_document_mutate_in→mutate_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 tomutate_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.
AayushTyagi1
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_in→lookup_subdocumentsub_document_mutate_in→mutate_subdocumentEvidence of Testing
Automated tests — commands run and results summary:
Environments tested (both are required):
Manual verification — Not performed in this session (no available); grepped the full repo to confirm zero remainingreferences to the old names anywhere in
.py/.mdfiles 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_inorsub_document_mutate_inby 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
cb_mcp.corecontracts / managed MCP inst) — tool behavior/contracts unchanged, only names.