Skip to content

Da 2061/tools ea - #247

Closed
SanjanaBoggaramJ wants to merge 7 commits into
DA-2027/Add-enterprise-toolsfrom
DA-2061/tools_EA
Closed

Da 2061/tools ea#247
SanjanaBoggaramJ wants to merge 7 commits into
DA-2027/Add-enterprise-toolsfrom
DA-2061/tools_EA

Conversation

@SanjanaBoggaramJ

Copy link
Copy Markdown
Contributor

VirajAgarwal-couchbase and others added 5 commits August 27, 2026 13:34
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>
Copilot AI lite review requested due to automatic review settings August 31, 2026 07:05

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.

🟡 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.

Comment thread analytics-mcp/src/ea_mcp/tools/query.py
Comment thread analytics-mcp/src/ea_mcp/tools/index.py
Comment thread analytics-mcp/tests/integration/test_query_tools.py
Comment thread analytics-mcp/tests/integration/test_metadata_tools.py
Comment thread analytics-mcp/tests/integration/test_index_tools.py
Comment thread analytics-mcp/tests/unit/test_metadata_tools_unit.py
@AayushTyagi1 AayushTyagi1 reopened this Aug 31, 2026
@AayushTyagi1
AayushTyagi1 changed the base branch from main to DA-2027/Add-enterprise-tools August 31, 2026 08:21
@VirajAgarwal-couchbase
VirajAgarwal-couchbase deleted the DA-2061/tools_EA branch September 1, 2026 06:20
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.

5 participants