Repository navigation
SEAB-7740 Add slimmed TRS MCP tools #12
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
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
4fc6271
Wire up get_trs_info and list_tool_classes against Dockstore's TRS API
denis-yuen 3551d54
Copy push-confirmation and minimal-diff PR guidance from dockstore/do…
denis-yuen 0c8876a
Potential fix for pull request finding 'Unused global variable'
denis-yuen 2e2fc58
Add the remaining GA4GH TRS V2 tool, version, and file tools
denis-yuen 3524c88
Send a dockstore-mcp/<git ref> User-Agent with TRS requests
denis-yuen 505973c
Report totals from list_tools/search_tools and support notebooks
denis-yuen a2c1930
Add a summary option to list_tools and search_tools
denis-yuen 62e6e69
Cap version names in list_tools/search_tools summaries
denis-yuen 825c0f2
Add a summary option to list_tool_versions
denis-yuen 118247a
Merge list_tool_classes into get_trs_info
denis-yuen cd2c9a0
Fold the TRS file tools into get_tool_descriptor_by_path
denis-yuen 35dc77b
Fold hello into get_trs_info with a local_only option
denis-yuen f302dd4
Merge remote-tracking branch 'origin/develop' into feature/trim_tools
denis-yuen 90eb58c
Fold get_tool_files into get_tool_version
denis-yuen 71c36d3
Fold search_tools into list_tools
denis-yuen 304d462
Fold list_tool_versions into get_tool
denis-yuen 5efb5ce
Keep a version's metadata when its file listing fails
denis-yuen d161d1f
Mark which tools are implemented in the README's tool table
denis-yuen 12f826c
Merge ToolDetail into Tool
denis-yuen e6ec87d
Call the project a prototype without search, not a scaffold
denis-yuen 5f5c542
Report the git ref as the server's version when it is set
denis-yuen f0da6f0
Run CI and the release build on Ubuntu 26.04
denis-yuen 6c162d6
Merge branch 'develop' into feature/trim_tools
denis-yuen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,10 +13,10 @@ MCP, so it is deployed alongside the Dockstore webservice rather than inside it. | |
|
|
||
| It is built on [FastMCP](https://gofastmcp.com) 4 and ships as a container image. | ||
|
|
||
| > **Status: scaffold.** `hello`, `get_trs_info`, and `list_tool_classes` have working | ||
| > bodies; the other four Dockstore tools are declared — names, arguments, and response | ||
| > shapes — but each one raises `NotImplementedError` until it is wired up to the | ||
| > Dockstore API. | ||
| > **Status: prototype without search.** The GA4GH TRS tools (`get_trs_info` through | ||
| > `get_tool_descriptor_by_path`) have working bodies; the other four Dockstore tools are | ||
| > declared — names, arguments, and response shapes — but each one raises | ||
| > `NotImplementedError` until it is wired up to the Dockstore API. | ||
|
|
||
| ## Requirements | ||
|
|
||
|
|
@@ -116,29 +116,39 @@ over the environment. | |
| | `DOCKSTORE_MCP_PATH` | `--path` | `/mcp` | Path the MCP endpoint is served from | | ||
| | `DOCKSTORE_MCP_LOG_LEVEL` | `--log-level` | `INFO` | Logging verbosity | | ||
| | `DOCKSTORE_MCP_DOCKSTORE_URL` | `--dockstore-url` | `https://dockstore.org` | Dockstore instance whose APIs are exposed | | ||
| | `DOCKSTORE_MCP_GIT_REF` | | package version | Version in the `dockstore-mcp/<ref>` User-Agent | | ||
|
|
||
| The container image overrides the first four so that it listens on `0.0.0.0:8000` out of | ||
| the box. It also sets a few `FASTMCP_*` variables so that a deployed server logs plainly | ||
| and does not check PyPI for updates on startup; see the | ||
| [FastMCP settings](https://gofastmcp.com) for the full list. | ||
| the box, and sets `DOCKSTORE_MCP_GIT_REF` from its `GIT_REF` build argument, which the | ||
| release workflow and `make docker-build` fill in with the git tag or ref being built. It | ||
| also sets a few `FASTMCP_*` variables so that a deployed server logs plainly and does not | ||
| check PyPI for updates on startup; see the [FastMCP settings](https://gofastmcp.com) for | ||
| the full list. | ||
|
|
||
| ## Tools | ||
|
|
||
| | Tool | Description | | ||
| | ------------------- | ------------------------------------------------------------------------------------- | | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is most useful for a breakdown of what the tools are and what they do |
||
| | `hello` | Greets the caller and reports the Dockstore instance and server version. No I/O. | | ||
| | `get_trs_info` | Describes this instance's GA4GH TRS API: identifiers, version, and operator. | | ||
| | `list_tool_classes` | Lists the tool classes (e.g. `Workflow`) this instance's TRS API sorts entries into. | | ||
| | `search_entries` | Searches entries by keyword and facet, the equivalent of the site's Search page. | | ||
| | `get_entry` | Retrieves the requested fields of one entry. | | ||
| | `get_version` | Retrieves the requested fields of one version of an entry. | | ||
| | `get_file` | Retrieves the requested fields of one file belonging to a version. | | ||
|
|
||
| `get_trs_info` and `list_tool_classes` call Dockstore's GA4GH TRS V2 API directly. The | ||
| last four are scaffolding and are not implemented yet. They are a chain: `search_entries` | ||
| yields entry identifiers, an entry yields version identifiers, and a version yields file | ||
| paths. Each lookup takes a list of fields so that a caller can ask for a name and a date | ||
| without also pulling down a README or a whole descriptor. | ||
| | Tool | Implemented | Description | | ||
| | ----------------------------- | ----------- | ------------------------------------------------------------------------------------ | | ||
| | `get_trs_info` | ✅ | Reports instance and version; unless `local_only`, also TRS info and tool classes. | | ||
| | `list_tools` | ✅ | Lists one page of TRS tools, optionally filtered by name, class, language, etc. | | ||
| | `get_tool` | ✅ | Retrieves one TRS tool by id, with all of its versions in full or summarized. | | ||
| | `get_tool_version` | ✅ | Retrieves one version of a TRS tool: authors, images, languages, optionally files. | | ||
| | `get_tool_descriptor_by_path` | ✅ | Fetches a version's primary descriptor, or any file get_tool_version lists, by path. | | ||
| | `search_entries` | ❌ | Searches entries by keyword and facet, the equivalent of the site's Search page. | | ||
| | `get_entry` | ❌ | Retrieves the requested fields of one entry. | | ||
| | `get_version` | ❌ | Retrieves the requested fields of one version of an entry. | | ||
| | `get_file` | ❌ | Retrieves the requested fields of one file belonging to a version. | | ||
|
|
||
| The TRS tools, from `get_trs_info` to `get_tool_descriptor_by_path`, call Dockstore's GA4GH | ||
| TRS V2 API directly. They form a chain: `list_tools` yields tool ids, a | ||
| tool yields version names, and `get_tool_version` with `files` yields the paths that | ||
| `get_tool_descriptor_by_path` takes. Pass `summary` to `list_tools` to get | ||
| each tool's id, languages, and version names without its full README and version details. | ||
|
|
||
| The last four are scaffolding and are not implemented yet. They are a chain too: | ||
| `search_entries` yields entry identifiers, an entry yields version identifiers, and a | ||
| version yields file paths. Each lookup takes a list of fields so that a caller can ask | ||
| for a name and a date without also pulling down a README or a whole descriptor. | ||
|
|
||
| ## Layout | ||
|
|
||
|
|
@@ -152,9 +162,8 @@ src/dockstore_mcp/ | |
| └── tools/ | ||
| ├── __init__.py registers every tool group | ||
| ├── entries.py get_entry, get_version, get_file | ||
| ├── hello.py the hello tool | ||
| ├── search.py search_entries | ||
| └── trs.py get_trs_info, list_tool_classes | ||
| └── trs.py get_trs_info and the other GA4GH TRS tools | ||
| tests/ pytest suite, using FastMCP's in-memory client | ||
| Dockerfile two-stage build of the deployable image | ||
| ``` | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 git ref business is to hook-up the user agent version to the mcp version which we will also expose in Slack deploy messages and the footer