You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(mcp): Add a tool that can validate the syntax of a DQL query (#9465)
**Description**
This PR adds the `validate_query_syntax` tool.
NOTE: the tool does not validate mutations. Long story, but the parser
used removed its ability to parse mutation blocks way back.
**Checklist**
- [x] Code compiles correctly and linting passes locally
- [ ] For all _code_ changes, an entry added to the `CHANGELOG.md` file
describing and linking to
this PR
- [x] Tests added for new functionality, or regression tests for bug
fixes added as applicable
---------
Co-authored-by: mattthew <matthew.mcneely@gmail.com>
returnmcp.NewToolResultText("Query is valid"), nil
130
+
})
131
+
75
132
queryTool:=mcp.NewTool("run_query",
76
133
mcp.WithDescription("Run DQL Query on Dgraph"),
77
134
mcp.WithString("query",
78
135
mcp.Required(),
79
-
mcp.Description("The query to perform"),
136
+
mcp.Description("The query to run"),
80
137
),
81
138
mcp.WithString("variables",
82
-
mcp.Required(),
83
139
mcp.Description("The parameters to pass to the query in JSON format. The JSON should be a map of string keys to string, number or boolean values. Example: {\"$param1\": \"value1\", \"$param2\": 123, \"$param3\": true}"),
0 commit comments