-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add analyze tool to Developer extension
#4530
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
Conversation
|
I think this approach has promise, have closed #3389 in favour of this one in the developer MCP which is the right place. Will want to make sure can deal with a tree compute that takes a few minutes without it timing out (so the tool can reply and run in background possibly). |
5567e18 to
d610d55
Compare
e660445 to
6eacf7d
Compare
| Your windows/screen tools can be used for visual debugging. You should not use these tools unless | ||
| prompted to, but you can mention they are available if they are relevant. | ||
| Always prefer ripgrep (rg -C 3) to grep. |
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.
is this best here or closer to where rg is mentioned elsewhere in the prompt (or was that system prompt?)
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.
It is already in the developer extension prompt in the editor description for some reason. Not sure why there in particular, but it seems like general developer instructions might fit better here in the general developer mcp description
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.
oh I mean in the common shell instructions. it says to use ripgrep - but it doesn't mention -C N at all, which seems to be the thing that hurts it (lacking that), but probably doesn't hurt here.
|
this seems to work nicely when I try it, a very nice addition. Any measuable improvement on benches @tlongwell-block ? |
Yes, a fairly consistent 3-6% boost with this change. It gets Sonnet up to our current Opus average. |
Resolved conflicts: - crates/goose-mcp/Cargo.toml: Kept all dependencies from both branches (tree-sitter deps + mpatch) - crates/goose-mcp/src/developer/rmcp_developer.rs: Kept unified diff support and analyze tool changes
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.
|
The tool itself is feature complete. The instructions/prompt need a little tweaking around helping the llm understand the max depth parameter and how it effects analysis |
|
@tlongwell-block I would think a response first/last line (probably both) saying "you will only see X, there is still Y" if possible in the response? |
The tool intentionally does lazy parsing of the codebase (because monorepos are a thing), so we can't really tell it how deep the call graph actually is without the agent electing to parse the entire repo to max_depth=0 (which it totally can do) It can also surgically search for the calls in subdirectories or individual files to avoid having to parse everything. This works well, too |
…0.21 - Add Swift language support with element and call queries - Replace tree-sitter-kotlin-ng with [email protected] for 0.21 compatibility - Fix Kotlin queries to match tree-sitter-kotlin node types - Ensure all tree-sitter dependencies use consistent 0.21 version - All tests passing for both Swift and Kotlin parsing
* main: Soften str_replace instructions for weaker LLMs (#4639) docs: changed logo (#4633) Add `analyze` tool to Developer extension (#4530) Add recipe title in import form (#4625) Desktop json recipes upload (#4629) Catch errors in node main (#4627) chore(deps-dev): bump vite from 7.1.3 to 7.1.5 in /ui/desktop (#4583) docs: add Rube extension documentation and server configuration (#4556) Always show recipe activities at the top of chat when recipe accepted and active (#4616) Add parameter replacement to activities in ui (#4617) UI recipes filter invalid, duplicate and unused params (#4615) Fix gpt-5 input context limit (#4619) [docs] MCP-UI Blog Post (#4578) release/1.8.0 (#4577) fix: docker build include valid string prior to sha (#4613) Run the conversation fixer over messages for recipe create (#4605) docs: github copilot config workarounds (#4607) Add recipe schema validation to UI (#4602)
Adds an analyze tool to the developer MCP extension that provides code structure analysis and symbol tracking capabilities across multiple programming languages. Signed-off-by: HikaruEgashira <[email protected]>
Adds an
analyzetool to the developer MCP extension that provides code structure analysis and symbol tracking capabilities across multiple programming languages.Changes
.gooseignoreand.gitignorepatterns for file traversalUsage
Implementation Notes
Testing
Tested with various codebases including Python packages, Rust crates, and mixed-language projects. The tool correctly identifies code structure and tracks cross-file dependencies.