Skip to content

feat: tagged-v1-endpoints-for-mcp-usage#7052

Open
Zaimwa9 wants to merge 4 commits intomainfrom
feat/add-v1-update-feature-to-mcp-tools
Open

feat: tagged-v1-endpoints-for-mcp-usage#7052
Zaimwa9 wants to merge 4 commits intomainfrom
feat/add-v1-update-feature-to-mcp-tools

Conversation

@Zaimwa9
Copy link
Copy Markdown
Contributor

@Zaimwa9 Zaimwa9 commented Mar 26, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Tagged the following endpoints to be used as MCP tools:

  • POST /environments/{env}/features/{feat}/versions/{uuid}/publish/ — publish a feature version
  • GET /environments/{key}/featurestates/ — list environment feature states
  • PUT /environments/{key}/featurestates/{id}/ — update an environment feature state

How did you test this code?

  • new tests

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner March 26, 2026 21:07
@Zaimwa9 Zaimwa9 requested review from emyller and removed request for a team March 26, 2026 21:07
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Mar 27, 2026 0:45am
flagsmith-frontend-preview Ignored Ignored Preview Mar 27, 2026 0:45am
flagsmith-frontend-staging Ignored Ignored Preview Mar 27, 2026 0:45am

Request Review

@github-actions github-actions bot added api Issue related to the REST API feature New feature or request labels Mar 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-7052 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-7052 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-7052 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7052 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7052 Finished ✅ Results

@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Mar 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  40.2 seconds
commit  f94e1cc
info  🔄 Run: #15507 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  11.8 seconds
commit  f94e1cc
info  🔄 Run: #15507 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.3 seconds
commit  f94e1cc
info  🔄 Run: #15507 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  1 minute, 12 seconds
commit  f94e1cc
info  🔄 Run: #15507 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  8.3 seconds
commit  4a99719
info  🔄 Run: #15514 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  43.2 seconds
commit  4a99719
info  🔄 Run: #15514 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 10 seconds
commit  4a99719
info  🔄 Run: #15514 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.8 seconds
commit  4a99719
info  🔄 Run: #15514 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  25.4 seconds
commit  f9abcb8
info  🔄 Run: #15515 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  10 passed

Details

stats  10 tests across 7 suites
duration  28.8 seconds
commit  f9abcb8
info  🔄 Run: #15515 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  16 passed

Details

stats  16 tests across 13 suites
duration  34.8 seconds
commit  f9abcb8
info  🔄 Run: #15515 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  53 seconds
commit  f9abcb8
info  🔄 Run: #15515 (attempt 1)

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.33%. Comparing base (3f71f16) to head (f9abcb8).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7052   +/-   ##
=======================================
  Coverage   98.33%   98.33%           
=======================================
  Files        1337     1337           
  Lines       50010    50012    +2     
=======================================
+ Hits        49178    49180    +2     
  Misses        832      832           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +803 to +806
"x-gram": {
"name": "list_environment_feature_states",
"description": "Retrieves all feature states for an environment. Use this for environments without v2 feature versioning.",
},
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.

I think the list endpoint works as expected for environments with v2 versioning doesn't it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

True, I wrongly thought that we'd save a tool call for v1 but actually no, from scratch we'd still need the get projects tool call to get the environment key.
Removed in f9abcb8

@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Mar 27, 2026
@github-actions github-actions bot added feature New feature or request and removed feature New feature or request labels Mar 27, 2026
@Zaimwa9 Zaimwa9 requested a review from matthewelwell March 27, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Issue related to the REST API feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants