Da 2061/tools ea - #247
Closed
SanjanaBoggaramJ wants to merge 7 commits into
Closed
Conversation
Co-authored-by: Viraj Agarwal <virajagarwal15@gmail.com> Co-authored-by: Nithish Raghunandanan <12782505+nithishr@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Viraj Agarwal <viraj.agarwal@couchbase.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Nithish Raghunandanan <12782505+nithishr@users.noreply.github.com>
README: document array (UNNEST) and CAST clause inputs, and the behaviours verified against a live cluster that the published grammar does not state (optional types on plain fields, EXCLUDE UNKNOWN KEY required on arrays, CAST rejected on arrays, types unvalidated). Integration: cover array indexes, the CAST clause, and identifier escaping, none of which the existing tests exercised. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a minimal prototype FastMCP server for Couchbase Enterprise Analytics (EA), with a small toolset (query execution, metadata introspection, and index DDL) plus unit/integration tests to validate behavior against mocks and a live EA cluster.
Changes:
- Introduces EA MCP server entrypoint (
ea_mcp_server.py) with lifespan-managed cluster connection and tool registration. - Implements EA tools (
run_query_sync, metadata read tools,create_index) with shared response envelopes for write-style tools. - Adds comprehensive unit tests (mocked SDK) and integration tests (live cluster via stdio subprocess), plus project packaging/docs.
File summaries
| File | Description |
|---|---|
| analytics-mcp/tests/unit/test_query_tools_unit.py | Unit tests for run_query_sync success/error envelopes using mocks. |
| analytics-mcp/tests/unit/test_metadata_tools_unit.py | Unit tests for metadata tools, including identifier escaping and sample-size clamping. |
| analytics-mcp/tests/unit/test_index_tools_unit.py | Unit tests for CREATE INDEX statement construction, escaping, and envelope behavior. |
| analytics-mcp/tests/integration/test_query_tools.py | Live-cluster integration tests for run_query_sync via MCP session. |
| analytics-mcp/tests/integration/test_metadata_tools.py | Live-cluster integration tests for metadata tools with per-test scope/collection lifecycle. |
| analytics-mcp/tests/integration/test_index_tools.py | Live-cluster integration tests for create_index, including array indexes and escaping attack case. |
| analytics-mcp/tests/integration/conftest.py | Integration harness to spawn ea_mcp_server subprocess and normalize tool payloads. |
| analytics-mcp/src/ea_mcp/tools/query.py | Implements synchronous SQL++ execution tool with write-style envelope. |
| analytics-mcp/src/ea_mcp/tools/metadata.py | Implements read-only metadata introspection tools against System.Metadata. |
| analytics-mcp/src/ea_mcp/tools/index.py | Implements CREATE INDEX statement builder/executor with escaping helpers. |
| analytics-mcp/src/ea_mcp/tools/init.py | Registers tool list and tool annotations (readOnlyHint where applicable). |
| analytics-mcp/src/ea_mcp/responses.py | Adds shared tool_success / tool_error envelope helpers. |
| analytics-mcp/src/ea_mcp/connection.py | Adds minimal connection and context plumbing for a lifespan-scoped Cluster. |
| analytics-mcp/src/ea_mcp/init.py | Package marker for reusable EA MCP components. |
| analytics-mcp/src/ea_mcp_server.py | CLI entrypoint to run the FastMCP server over stdio and manage cluster lifecycle. |
| analytics-mcp/README.md | Documents prototype scope, tools, CREATE INDEX semantics, and how to run tests. |
| analytics-mcp/pyproject.toml | Defines packaging, dependencies, lint/test configuration, and script entrypoint. |
Review details
- Files reviewed: 17/18 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
AayushTyagi1
changed the base branch from
main
to
DA-2027/Add-enterprise-tools
August 31, 2026 08:21
VirajAgarwal-couchbase
self-requested a review
August 31, 2026 08:27
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.
jira: https://jira.issues.couchbase.com/jira/software/c/projects/DA/boards/4513?selectedIssue=DA-2061