Skip to content

Conversation

Copy link

Copilot AI commented Nov 25, 2025

  • Understand the review feedback
  • Fix http_server.py:151 - Add hasattr check for mcp_client
  • Fix http_server.py:155 - Change error code from -32600 to -32603
  • Fix http_server.py:161 - Add error handling for malformed JSON with -32700 Parse error
  • Fix http_server.py:17 - Remove unused import json
  • Fix http_server.py:107 - Add import for MCPEnvironment
  • Fix http_server.py:243-244 - Add validation for tool_name field
  • Fix mcp_environment.py:70 - Remove mcp_client from super().init()
  • Fix client.py - Remove unused ListToolsAction import
  • Fix pyproject.toml:47-49 - Remove non-existent openenv_core.mcp package
  • Fix RFC-003-implementation-journal.md - Update mcp_tools.py to mcp_server.py
  • Fix client.py - Move typing imports to top of file
  • Fix http_server.py - Use specific exception types instead of generic Exception
  • Remove list_tools() and echo_message() convenience methods from EchoEnv client (per @Darktex feedback)
  • Update EchoEnv docstring examples to use step API with import statements
  • Update echo_mcp_demo.py to use step API directly

💬 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 cla@meta.com. Thanks!

Copilot AI and others added 2 commits November 25, 2025 19:10
Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
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
@Darktex
Copy link
Contributor

Darktex commented Dec 1, 2025

@copilot please iterate on this PR based on my comments

Copilot AI and others added 2 commits December 1, 2025 17:47
…dback

Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Copy link
Author

Copilot AI commented Dec 1, 2025

@copilot please iterate on this PR based on my comments

Removed list_tools() and echo_message() convenience methods from EchoEnv client in 9ebafb9. Updated the docstring examples and echo_mcp_demo.py to use the step API with ListToolsAction and CallToolAction instead.

Copilot AI requested a review from Darktex December 1, 2025 17:50
Copilot finished work on behalf of Darktex December 1, 2025 17:50
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.

see inline

print(f" - {tool['name']}: {tool['description']}")
list_action = ListToolsAction()
list_result = client.step(list_action)
if isinstance(list_result.observation, ListToolsObservation):
Copy link
Contributor

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?

Copy link
Author

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.

@Darktex Darktex marked this pull request as ready for review December 1, 2025 21:12
Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Copilot finished work on behalf of Darktex December 1, 2025 21:15
Copilot AI requested a review from Darktex December 1, 2025 21:15
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.

Nice

@Darktex Darktex merged commit 40dcea2 into rfc-003-first-pr Dec 1, 2025
1 check failed
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