Skip to content

Da 2061: Add Index tools for EA - #251

Merged
SanjanaBoggaramJ merged 4 commits into
DA-2027/Add-enterprise-toolsfrom
DA-2061/tools_EA_clean
Sep 2, 2026
Merged

Da 2061: Add Index tools for EA#251
SanjanaBoggaramJ merged 4 commits into
DA-2027/Add-enterprise-toolsfrom
DA-2061/tools_EA_clean

Conversation

@SanjanaBoggaramJ

Copy link
Copy Markdown
Contributor

jira: ticket

SanjanaBoggaramJ and others added 3 commits August 31, 2026 15:15
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 09:50
@VirajAgarwal-couchbase
VirajAgarwal-couchbase changed the base branch from main to DA-2027/Add-enterprise-tools August 31, 2026 09:51

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.

🔵 Needs a closer look

Pull request overview

Adds a throwaway/prototype Enterprise Analytics (EA) FastMCP server (analytics-mcp/) with query/metadata/index tools plus unit and live-cluster integration tests, intended to validate tool shapes/behavior before porting into the main server.

Changes:

  • Introduces EA tool implementations: run_query_sync, metadata introspection (databases/scopes/collections/schema), and create_index DDL builder.
  • Adds unit tests (mocked cluster) and integration tests (stdio MCP subprocess against a live EA cluster).
  • Adds packaging/CLI wiring (pyproject.toml, ea_mcp_server.py) and README usage docs.
File summaries
File Description
analytics-mcp/tests/unit/test_query_tools_unit.py Unit tests for run_query_sync success/error envelopes.
analytics-mcp/tests/unit/test_metadata_tools_unit.py Unit tests for metadata tools and identifier escaping.
analytics-mcp/tests/unit/test_index_tools_unit.py Unit tests for create_index statement construction and escaping.
analytics-mcp/tests/integration/test_query_tools.py Integration coverage for run_query_sync via MCP session.
analytics-mcp/tests/integration/test_metadata_tools.py Integration coverage for metadata tools + schema sampling workflow.
analytics-mcp/tests/integration/test_index_tools.py Integration coverage for create_index (including injection/backtick cases).
analytics-mcp/tests/integration/conftest.py Integration test harness (stdio server subprocess + payload extraction).
analytics-mcp/src/ea_mcp/tools/query.py Implements run_query_sync tool with success/error envelopes.
analytics-mcp/src/ea_mcp/tools/metadata.py Implements System.Metadata queries + safe identifier quoting.
analytics-mcp/src/ea_mcp/tools/index.py Implements SQL++ CREATE INDEX statement formatter + tool envelope.
analytics-mcp/src/ea_mcp/tools/init.py Registers tool list and MCP tool annotations.
analytics-mcp/src/ea_mcp/responses.py Shared {success: ...} envelope helpers.
analytics-mcp/src/ea_mcp/connection.py Cluster connection + request-context accessor.
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 prototype server over stdio.
analytics-mcp/README.md Prototype documentation, tool descriptions, and test instructions.
analytics-mcp/pyproject.toml Project metadata, dependencies, lint/test config, and packaging rules.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@VirajAgarwal-couchbase VirajAgarwal-couchbase changed the title Da 2061/tools ea clean Da 2061: Add Index tools for EA Sep 1, 2026

@VirajAgarwal-couchbase VirajAgarwal-couchbase 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.

lgtm

@SanjanaBoggaramJ
SanjanaBoggaramJ merged commit 992c7b7 into DA-2027/Add-enterprise-tools Sep 2, 2026
2 checks passed
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.

3 participants