Skip to content

Update: EA Tools based on Murtadha's recommendation - #253

Merged
VirajAgarwal-couchbase merged 4 commits into
DA-2027/Add-enterprise-toolsfrom
Update-EA-tools
Sep 1, 2026
Merged

Update: EA Tools based on Murtadha's recommendation#253
VirajAgarwal-couchbase merged 4 commits into
DA-2027/Add-enterprise-toolsfrom
Update-EA-tools

Conversation

@VirajAgarwal-couchbase

@VirajAgarwal-couchbase VirajAgarwal-couchbase commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Resolves:

Murtadha's recommendations in EA tools

Evidence of Testing

# e.g. uv run pytest analytics-mcp/src/ea_mcp/tests  →  20 passed

Environments tested (both are required):

  • Capella Analytics (Not supported as of now)
  • Self-managed Enterprise Analytics

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 the description, if any)
  • Works on both Capella and self-managed Couchbase Server
  • No changes to cb_mcp.core contracts / managed MCP interfaces (or discussed first)
  • Unit tests added/updated
  • Integration tests added/updated (for cluster-touching changes)
  • Read-only mode and tool annotations handled (for new/changed tools)
  • Evidence of testing included above
  • Docs updated (README, DOCKER.md) for user-facing changes
  • Lint and pre-commit pass

@VirajAgarwal-couchbase VirajAgarwal-couchbase changed the title Update: get_collections_in_scope tool Update: EA Tools based on Murtadha's recommendation Sep 1, 2026
@VirajAgarwal-couchbase VirajAgarwal-couchbase self-assigned this Sep 1, 2026

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.

🟢 Approval recommended

Pull request overview

Updates the Enterprise Analytics (EA) metadata tools to align schema inference with Analytics’ built-in ARRAY_INFER_SCHEMA behavior and makes the associated tests less coupled to a specific response envelope.

Changes:

  • Switch get_schema_for_collection from custom per-field inference to ARRAY_INFER_SCHEMA, returning the inferred “flavor” objects.
  • Extend get_collections_in_scope results to include dataset Type (DatasetType).
  • Update unit/integration tests to reflect the new schema inference output and avoid over-asserting the envelope shape.
File summaries
File Description
analytics-mcp/src/ea_mcp/tools/metadata.py Uses ARRAY_INFER_SCHEMA for schema inference and includes dataset type in collection listings.
analytics-mcp/tests/unit/test_metadata_tools_unit.py Updates unit expectations for the ARRAY_INFER_SCHEMA-based return shape.
analytics-mcp/tests/integration/test_metadata_tools.py Makes schema assertions resilient to envelope changes by checking presence of inferred field keys.
Review details
  • Files reviewed: 3/3 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.

@SanjanaBoggaramJ SanjanaBoggaramJ 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.

Here in the comment uve mentioned that the sample_size must be
positive and is capped at MAX_SCHEMA_SAMPLE_SIZE, but when the agent is reading this it, it wont know the number right?

@VirajAgarwal-couchbase
VirajAgarwal-couchbase merged commit 38599ca into DA-2027/Add-enterprise-tools Sep 1, 2026
3 checks passed
@VirajAgarwal-couchbase
VirajAgarwal-couchbase deleted the Update-EA-tools branch September 1, 2026 10:53
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