- Notifications
You must be signed in to change notification settings - Fork471
[WIP] MCP#8001
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
[WIP] MCP#8001
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| .concat()) | ||
| } | ||
| pubfncompiler_args_for_diagnostics( |
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.
Please add a comment why this exists.
| fnlist_tools(&self) ->Vec<mcp_spec::tool::Tool>{ | ||
| vec![Tool::new( | ||
| "diagnose", | ||
| "Quick per-file diagnostics after edits; prefer before full build; no writes; only this file.", |
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.
You might want to clarify whatpath is here.
I know it is a.res or.resi path, preferably the full path, but if left unspecified the LLM might call this with some other path.
| let name = tool_name.to_string(); | ||
| Box::pin(asyncmove{ | ||
| match name.as_str(){ | ||
| "diagnose" =>{ |
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 seems rather horrible that we need to parse the tool name ourselves. Is there no better abstraction for this?
| fninstructions(&self) ->String{ | ||
| "ReScript MCP server.\n\n\ | ||
| Tools:\n\ | ||
| - diagnose(path): Quick per-file diagnostics after edits. Prefer this before a full build.\n\ |
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 tool call does feel a bit like duplication of one of the LSP endpoints.
It makes me wonder if we should explore having an LSP client inside the MCP tool that can ask this information from the running LSP Server.
This bootstrap a simple MCP for ReScript, through Rewatch. Initially it adds a single command
diagnose, which will run quick diagnostics for a single file. Diagnostics here means that we'll run a compilation only on the single file targeted, no dependents, so it's really quick. Warnings and errors are returned to the LLM.Supersedes#7566.