Address code review feedback for MCP implementation - #226
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.
@copilot see my feedback
| step_count=payload.get("step_count", 0), | ||
| ) | ||
|
|
||
| def list_tools(self) -> List[Dict[str, Any]]: |
There was a problem hiding this comment.
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 |
| 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.
Why would it not be instance of ListToolsObservation?
There was a problem hiding this comment.
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>
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.