feat: Add tool annotations to mcp-neo4j-data-modeling server #262
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.
Summary
Adds MCP tool annotations (
readOnlyHint,destructiveHint,title,idempotentHint,openWorldHint) to all 16 tools in themcp-neo4j-data-modelingserver to help LLMs better understand tool behavior and make safer decisions about tool execution.Changes
ToolAnnotationsimport frommcp.typesreadOnlyHint: trueto all tools (all are read-only validation/transformation tools)destructiveHint: falseto all tools (none modify external state)titleannotations for human-readable displayidempotentHint: trueandopenWorldHint: falsefor all toolsTools Annotated
validate_nodevalidate_relationshipvalidate_data_modelload_from_arrows_jsonexport_to_arrows_jsonget_mermaid_config_strget_node_cypher_ingest_queryget_relationship_cypher_ingest_queryget_constraints_cypher_queriesget_example_data_modellist_example_data_modelsload_from_owl_turtleexport_to_owl_turtleexport_to_pydantic_modelsexport_to_neo4j_graphrag_pkg_schemaload_from_neo4j_graphrag_pkg_schemaWhy This Matters
Tool annotations provide semantic metadata that helps MCP clients:
Testing
uv sync)ruff check src/)Note on Pre-existing Type Errors
There are pre-existing
pyrighttype errors in the codebase (related toparse_dict_from_json_inputtype signatures). These errors exist on themainbranch and are not introduced by this PR.Before/After
Before:
After:
🤖 Generated with Claude Code