-
Notifications
You must be signed in to change notification settings - Fork 117
Add strongly typed MCP types: Tool, ToolError, rename types.py to mcp_types.py #230
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
base: rfc-003-first-pr
Are you sure you want to change the base?
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! |
…nd ToolError classes 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 add tests to validate that these changes are working as intended. Run the tests and show me
Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Added comprehensive tests in commit 4843088. Here are the test results: Run the tests with: python -c "
import sys
sys.path.insert(0, 'src')
import pytest
pytest.main(['-v', 'tests/core/test_mcp_module/'])
" |
types.pytomcp_types.pyto avoid conflict with Python'stypesmoduleTooldataclass with name, description, input_schema, output_schemaToolErrorclass with error_type (enum), message, and detailsListToolsObservationto use typedList[Tool]instead ofList[Dict[str, Any]]CallToolObservationto make fields required and use typedToolErrorclasstypes.py__init__.pyto export new types (Tool, ToolError, ToolErrorType)💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.