Skip to content

Conversation

@tkmamidi
Copy link

@tkmamidi tkmamidi commented Nov 5, 2025

This pull request introduces a major performance change to the BioMCP project by consolidating and simplifying the MCP tool interface, reducing the number of tools from 35 to 12. This reduces the agent token load from the tool docstrings and improves faster initialization. All domain tools now follow a consistent action-based pattern, which streamlines usage and improves maintainability. Extensive documentation and migration guides are provided to help users transition to the new interface, and all related code, guides, and examples have been updated accordingly.

Tool Interface Consolidation

  • Reduced the MCP toolset from 35 to 12 tools, introducing a unified action-based pattern (action="search" or action="get") for all domain tools, including article, trial, variant, alphagenome, gene, drug, disease, fda, and nci.
  • Provided a comprehensive migration guide mapping old tool names and usage patterns to the new consolidated interface, making it easier for users to update existing code and workflows.

Documentation and Tutorial Updates

Code and Test Improvements

  • Added new consolidated tool implementations in src/biomcp/tools/ and improved parameter validation across all tools.
  • Achieved comprehensive test coverage for the new tools (701 tests passing).

Bug Fixes

  • Fixed the variant tool to properly support the hgvs parameter for general HGVS notation.
  • Fixed the FDA label tool to safely handle empty sections array parameters.

Major simplification of the MCP tool interface to improve usability and maintainability. All domain tools now use consistent action parameters ("search", "get", "predict") instead of separate _searcher/_getter functions. This reduces cognitive overhead for users while following industry-standard patterns from projects like AIVA.

Breaking Changes:
- article_searcher/getter → article(action="search/get")
- trial_searcher/getter → trial(action="search/get")
- variant_searcher/getter → variant(action="search/get")
- gene/drug/disease_getter → gene/drug/disease(action="get")
- nci_*_searcher/getter → nci(resource="...", action="search/get")
- openfda_*_searcher/getter → fda(domain="...", action="search/get")

See CHANGELOG.md for complete migration guide.
Corrected parameter names and action patterns:
- trial: Use detail parameter instead of separate get_* actions
- variant: Use variant_id instead of id
- alphagenome: Add action="predict" parameter
- gene/disease/drug: Use id instead of *_id_or_name/symbol
- fda: Fix parameter names (drug vs brand_name, etc.) and add more examples
@imaurer
Copy link
Collaborator

imaurer commented Nov 11, 2025

Thanks @tkmamidi for the PR. Definitely agree that BioMCP consumes a lot of tokens if you turn on all of the tools at once. Any way you can selectively choose tools? I considered the "action" parameter too, but it has downsides that might confuse the LLM on what's available. We are going to take a hard look at both your solution and other alternatives with the goal of trimming down the context used.

@tkmamidi
Copy link
Author

tkmamidi commented Nov 11, 2025

Thanks for the comment @imaurer !
I was using the "select tools" so far but I forget to turn on/off every now and then depending on the queries. From my testing with the repo tests and hands-on use, LLMs were using the right tools with "action" parameter, even with non-thinking models. Is there a benchmark that we have (or maybe develop one) to test how well it is working?

@imaurer
Copy link
Collaborator

imaurer commented Nov 11, 2025

Evals are a hard problem @tkmamidi !

One popular approach is LLM as a Judge, which I did for my "Deep Research" example:
https://github.com/genomoncology/biomcp-examples/tree/main/researcher_hnscc

You could use an LLM as a Judge to compare your BioMCP-enabled program against a strong model with basic web search to see who comes up with "better answers".

But the better thing would be to ask an expert.

If you want to contribute to the "BioMCP-examples" Repo, I'd love that!

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