-
Notifications
You must be signed in to change notification settings - Fork 24
A 'pub-dev-search' mcp tool #103
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
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. |
Example transcript:
|
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.
Do we have a plan for testing this?
Should it hit the real server? Fake out some http responses by passing in an HttpClient (this might not be that useful)?
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
I didn't think the testing very much through yet, but I definitely think we should provide fixed fake responses and not rely on a live server for testing. I'll try to cook up some tests. |
Co-authored-by: Jacob MacDonald <[email protected]>
Co-authored-by: Jacob MacDonald <[email protected]>
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/test_fixtures/pub_dev_responses/README.md
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/test_fixtures/pub_dev_responses/README.md
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/test/tools/pub_dev_search_test.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/test/tools/pub_dev_search_test.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
Thanks for all the excellent reviewing so far! PTAL. |
pkgs/dart_tooling_mcp_server/lib/src/mixins/pub_dev_search.dart
Outdated
Show resolved
Hide resolved
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.
This generally LGTM from me now 🚀 . I left a few optional comments.
Adds a 'pub-dev-search' tool to the mcp tool list.
An attempt at #93
It strings together a number of (more or less secret) api calls from pub.dev to find relevant packages and information about them:
api/search/q=
for finding a list of packages (limits to 10 packages).api/packages/<package>
for finding the description and latest versionapi/packages/<package>/score
for finding scores and tagsdocumentation/<package>/latest/index.json
for listing top-level identifiers