Skip to content

cg review mcp fixes#167

Merged
ncfrey merged 1 commit intomainfrom
n/mcp-cg-review
Jul 30, 2025
Merged

cg review mcp fixes#167
ncfrey merged 1 commit intomainfrom
n/mcp-cg-review

Conversation

@ncfrey
Copy link
Contributor

@ncfrey ncfrey commented Jul 29, 2025

Description

This pull request introduces improvements to type annotations, dependency synchronization, and caching in the Lobster MCP server codebase. The most important changes include refining type hints for better type safety, updating dependency synchronization commands, and adding caching to improve performance when loading models.

Improvements to type annotations:

  • Updated return type annotations for the following functions to use more specific types (dict[str, Any]) for better type safety:
    • get_sequence_concepts in src/lobster/mcp/tools/concepts.py
    • get_supported_concepts in src/lobster/mcp/tools/concepts.py
    • intervene_on_sequence in src/lobster/mcp/tools/interventions.py
  • Added Any to the imports in src/lobster/mcp/tools/concepts.py and src/lobster/mcp/tools/interventions.py to support the updated type annotations. [1] [2]

Dependency synchronization:

  • Modified the dependency synchronization command in CLAUDE.md to use uv sync --all-extras instead of uv sync, ensuring all optional extras are installed.

Performance improvements:

  • Added @cache decorator to the _load_model function in src/lobster/mcp/tools/tool_utils.py to cache model loading and improve performance. Updated the function's return type to specify the expected model types (LobsterPMLM | LobsterCBMPMLM). [1] [2]

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring

@ncfrey ncfrey requested a review from karinazad July 29, 2025 21:09
@ncfrey ncfrey merged commit a941262 into main Jul 30, 2025
4 checks passed
@ncfrey ncfrey deleted the n/mcp-cg-review branch July 30, 2025 13:50
taylormjs pushed a commit that referenced this pull request Jul 31, 2025
Co-authored-by: freyn6 <freyn6@gene.com>
taylormjs pushed a commit that referenced this pull request Aug 1, 2025
Co-authored-by: freyn6 <freyn6@gene.com>
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