-
Notifications
You must be signed in to change notification settings - Fork 14
feat: Implement startup requirement checks and dynamic tool registration #96
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
base: main
Are you sure you want to change the base?
Conversation
… requiments while starting the server
| analytics "github.com/neo4j/mcp/internal/analytics/mocks" | ||
| "github.com/neo4j/mcp/internal/config" | ||
| db_mock "github.com/neo4j/mcp/internal/database/mocks" | ||
| db "github.com/neo4j/mcp/internal/database/mocks" |
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.
🫶
|
|
||
| "github.com/neo4j/mcp/internal/analytics" | ||
| analytics_mock "github.com/neo4j/mcp/internal/analytics/mocks" | ||
| amock "github.com/neo4j/mcp/internal/analytics/mocks" |
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.
I think we are not using the real analytics here, so there should not be a conflict if we used analytics instead of amock to be a bit more specific.
| Service database.Service | ||
| Deps *tools.ToolDependencies | ||
| createdLabels map[string]bool | ||
| AnalyticsService *analytics_mocks.MockService |
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.
Same here, I guess it was done in an earlier PR, but I think we should use analytics here as well. At least name it something other than snake case, please:)
| } | ||
|
|
||
| // VerifyConnectivity checks the driver can establish a valid connection with a Neo4j instance; | ||
| func (s *Neo4jService) VerifyConnectivity(ctx context.Context) error { |
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 looks neat as part of the service now
| dbService: dbService, | ||
| version: version, | ||
| anService: anService, | ||
| gdsInstalled: false, |
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.
nit: no need to provide it, as it defaults to false
Counterargument: it's more visible to be explicit
This update introduces a comprehensive pre-flight checks during the startup sequence.
We've implemented a new
verifyRequirementsfunction to ensure that the server's environment meets all necessary prerequisites before it begins its main operations.The verification process now confirms the following:
To perform these, this PR includes also other improvements such as the ability to filter registered tools by their specific categories, for instance: "read-only", "cypher", "gds".
The
registerToolsmethod is no longer exposed but instead is been moved to be part of the.Startmethod and implicitly invoked.Integration test helpers are slightly changed to accomodates testing initial part of the Server initialisation.