Skip to content

Extract tool handlers into reusable tools.py#12

Merged
drewburchfield merged 1 commit intomasterfrom
fix/extract-tools-from-server
Apr 3, 2026
Merged

Extract tool handlers into reusable tools.py#12
drewburchfield merged 1 commit intomasterfrom
fix/extract-tools-from-server

Conversation

@drewburchfield
Copy link
Copy Markdown
Owner

@drewburchfield drewburchfield commented Apr 3, 2026

Summary

  • Extract transport-agnostic tool handlers from server.py into tools.py
  • tools.py: validates args, calls engine, returns structured dicts
  • server.py: MCP schemas, response formatting, dispatch (thin transport layer)
  • Enables future CLI/REST transports to reuse tool handlers directly

Fixes NAS-991

Test plan

  • All 133 unit tests pass
  • Lint (ruff) and format (black) clean
  • Docker build succeeds
  • Server starts and all 6 MCP tools pass E2E in Docker

Open with Devin

Separates transport-agnostic tool logic from MCP plumbing:
- tools.py: validates args, calls engine, returns structured dicts
- server.py: MCP schemas, response formatting, dispatch

Enables future CLI/REST transports to reuse tool handlers without
depending on MCP. No sub-packages needed at current codebase size.
@drewburchfield drewburchfield merged commit 5ec57ab into master Apr 3, 2026
4 checks passed
@drewburchfield drewburchfield deleted the fix/extract-tools-from-server branch April 3, 2026 20:06
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

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.

1 participant