Skip to content

feat: add slice tool to mcp#1204

Merged
yelizhenden-mdb merged 2 commits intomainfrom
CLOUDP-393141-3
Apr 13, 2026
Merged

feat: add slice tool to mcp#1204
yelizhenden-mdb merged 2 commits intomainfrom
CLOUDP-393141-3

Conversation

@yelizhenden-mdb
Copy link
Copy Markdown
Collaborator

Proposed changes

Jira ticket: CLOUDP-393141

This PR implements A new tool that creates a filtered subset of a loaded OpenAPI specification and saves it as a virtual spec for further use.

Input:

  • sourceAlias (required) — alias of the spec to slice
  • saveAs (required) — agent-chosen alias for the resulting virtual spec
  • tags, operationIds, paths (at least one required) — filter criteria, combined with OR logic

Output: success message + the new alias

Key behaviours:

  • Validates saveAs format (lowercase letters, numbers, hyphens) and uniqueness
  • Delegates filtering to FOASCLI slice, which also cleans up unreferenced schemas, parameters, and responses
  • The same source spec can be sliced multiple times under different aliases

Checklist

  • I have signed the MongoDB CLA
  • I have added tests that prove my fix is effective or that my feature works

Changes to Spectral

  • I have read the README file for Spectral Updates

Further comments

Copy link
Copy Markdown
Collaborator

@andmatei andmatei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yelizhenden-mdb yelizhenden-mdb merged commit d4a4a21 into main Apr 13, 2026
12 checks passed
@yelizhenden-mdb yelizhenden-mdb deleted the CLOUDP-393141-3 branch April 13, 2026 12:58
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.

2 participants