Skip to content

Conversation

Copy link

Copilot AI commented Nov 25, 2025

Fixes issues identified by automated code review on the MCP infrastructure PR.

http_server.py

  • Add hasattr guard before accessing mcp_client to prevent AttributeError on non-MCP environments
  • Use JSON-RPC error code -32603 (Internal error) instead of -32600 (Invalid Request) for missing MCP config
  • Add parse error handling with -32700 for malformed JSON requests
  • Add validation for missing tool_name in CallToolAction deserialization
  • Add missing MCPEnvironment import
  • Remove unused json import

mcp_environment.py

  • Remove invalid mcp_client kwarg from super().__init__() (base Environment doesn't accept it)

client.py

  • Implement list_tools() and echo_message() convenience methods (referenced in docstring but missing)
  • Move typing imports to top of file per PEP 8
  • Remove unused ListToolsAction import

pyproject.toml

  • Remove openenv_core.mcp package reference (directory doesn't exist)

RFC-003-implementation-journal.md

  • Fix filename references from mcp_tools.py to mcp_server.py

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@meta-cla
Copy link

meta-cla bot commented Nov 25, 2025

Hi @copilot!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

Copilot AI changed the title [WIP] Add basic local MCP server and MCP client Address code review feedback for MCP implementation Nov 25, 2025
Copilot AI requested a review from Darktex November 25, 2025 19:13
Copilot finished work on behalf of Darktex November 25, 2025 19:13
Copy link
Contributor

@Darktex Darktex left a 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

step_count=payload.get("step_count", 0),
)

def list_tools(self) -> List[Dict[str, Any]]:
Copy link
Contributor

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 stopped work on behalf of Darktex due to an error November 25, 2025 19:39
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.

2 participants