-
Notifications
You must be signed in to change notification settings - Fork 116
Address code review feedback for MCP implementation #226
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
|
Hi @Copilot! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Darktex
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.
@copilot see my feedback
src/envs/echo_env/client.py
Outdated
| step_count=payload.get("step_count", 0), | ||
| ) | ||
|
|
||
| def list_tools(self) -> List[Dict[str, Any]]: |
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.
We should do the opposite: remove list_tools and echo_message as methods, and remove each and every reference to them
|
@copilot please iterate on this PR based on my comments |
…dback Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Removed |
Darktex
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.
see inline
examples/echo_mcp_demo.py
Outdated
| print(f" - {tool['name']}: {tool['description']}") | ||
| list_action = ListToolsAction() | ||
| list_result = client.step(list_action) | ||
| if isinstance(list_result.observation, ListToolsObservation): |
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.
Why would it not be instance of ListToolsObservation?
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.
You're right - it will always be a ListToolsObservation when sending a ListToolsAction. Removed the unnecessary check in 8ef3f83.
Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Darktex
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.
Nice
hasattrcheck for mcp_clientjsonMCPEnvironmenttool_namefieldmcp_clientfrom super().init()ListToolsActionimportopenenv_core.mcppackagemcp_tools.pytomcp_server.pylist_tools()andecho_message()convenience methods from EchoEnv client (per @Darktex feedback)💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.