Skip to content

Add resolve action for name-based resource lookup in MCP#72

Merged
titouanmathis merged 1 commit intomainfrom
feature/70-resolve-action
Feb 27, 2026
Merged

Add resolve action for name-based resource lookup in MCP#72
titouanmathis merged 1 commit intomainfrom
feature/70-resolve-action

Conversation

@titouanmathis
Copy link
Contributor

Implements #70 — adds a resolve action to servers and sites resources for name-based lookup.

Changes

Core

  • Added resolve to ACTIONS constant
  • New resolveServers() executor — partial/exact name matching
  • New resolveSites() executor — partial/exact domain matching
  • Exported from core index

MCP

  • Added resolve to READ_ACTIONS
  • Wired into handleServers and handleSites via createResourceHandler
  • Added query parameter to forge tool input schema
  • Updated help and schema handlers
  • Comprehensive test coverage (executor + handler levels)

Usage

{"resource": "servers", "action": "resolve", "query": "prod"}

Returns:

2 server(s) matching "prod":
• prod-web-1 (ID: 725393)
• studio-meta-prod-1 (ID: 829790)

Closes #70

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.80%. Comparing base (9714cf5) to head (9455eab).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #72   +/-   ##
=======================================
  Coverage   99.80%   99.80%           
=======================================
  Files         221      223    +2     
  Lines        3561     3596   +35     
  Branches      810      845   +35     
=======================================
+ Hits         3554     3589   +35     
  Misses          7        7           
Flag Coverage Δ
unittests 99.80% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Add a resolve action to servers and sites that accepts a name/query
and returns matching resources via partial case-insensitive search.
Exact match returns single result, partial returns all candidates.

Extracted matching logic into forge-core executors so both CLI and
MCP can share the resolution logic.

Closes #70

Co-authored-by: Claude <claude@anthropic.com>
@titouanmathis titouanmathis force-pushed the feature/70-resolve-action branch from 8cbae95 to 9455eab Compare February 27, 2026 16:11
@titouanmathis titouanmathis merged commit 56ae8a9 into main Feb 27, 2026
8 checks passed
@titouanmathis titouanmathis deleted the feature/70-resolve-action branch February 27, 2026 16:13
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.

Add resolve action for name-based resource lookup in MCP

1 participant