-
Notifications
You must be signed in to change notification settings - Fork 939
feat(mcp): add list-plugin-instances tool for AI Agent #3038
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
新增 list-plugin-instances MCP 工具以支持 AI Agent 查询插件实例变更概述
变更文件
💡 小贴士与 lingma-agents 交流的方式📜 直接回复评论
📜 在代码行处标记
📜 在讨论中提问
|
|
@CH3CHO @rinfx @wydream @johnlanni @erasernoob ptal,thx @CH3CHO @rinfx @wydream @johnlanni @erasernoob asked,thx |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3038 +/- ##
==========================================
+ Coverage 35.91% 45.01% +9.10%
==========================================
Files 69 82 +13
Lines 11576 10898 -678
==========================================
+ Hits 4157 4906 +749
+ Misses 7104 5644 -1460
- Partials 315 348 +33 🚀 New features to boost your workflow:
|
|
Thank you, we will review it as soon as possible. cc @cr7258 |
Thanks for your feedback. I will make the changes should there be any issues @johnlanni |
cr7258
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐉 LGTM
@Libres-coder Thanks for your contribution.
Thanks for your approval! The current PR has been approved. Could you please merge it when you have a moment? Thank you! @cr7258 |
|
@johnlanni, I don't have permission to merge this PR, could you please merge it? |
|
@cr7258 I've removed the requirement to update the branch to the latest before merging, so you (as the maintainer of this repository) can merge it in the future as well :) |
Ⅰ. Describe what this PR did
Added
list-plugin-instancestool to MCP Server, enabling AI Agents to query plugin instances for specific scopes (GLOBAL, DOMAIN, SERVICE, ROUTE) via MCP protocol.Changes:
handleListPluginInstances()andgetListPluginInstancesSchema()functionsRegisterCommonPluginTools()Ⅱ. Does this pull request fix one issue?
Relates to #3019, but does not fully resolve it.
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Compile check:
cd plugins/golang-filter/mcp-server go build ./servers/higress/higress-api/tools/pluginsMCP tool usage:
{ "tool": "list-plugin-instances", "arguments": { "scope": "ROUTE", "resource_name": "test-route" } }API endpoints verified in Console:
GET /v1/{scope}/plugin-instances(scope: global/domains/services/routes)Ⅴ. Special notes for reviews
WasmPluginInstancesController.java)