Skip to content
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

Context Servers Not Working with LLMs in Assistant Panel #23507

Open
1 task done
reecelikesramen opened this issue Jan 22, 2025 · 0 comments
Open
1 task done

Context Servers Not Working with LLMs in Assistant Panel #23507

reecelikesramen opened this issue Jan 22, 2025 · 0 comments
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue

Comments

@reecelikesramen
Copy link

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

I created a Brave Search context server extension based off of the Postgres Context Server extension. I do not see the two tools that this context server registers, brave_web_search and brave_local_search, as slash commands in the Assistant Panel. The Zed docs imply that Zed supports this:

Currently Zed supports context servers providing slash commands for use in the Assistant.

I created the context server extension by minimally modifying the source of the Postgres extension to install the Brave Search context server that Anthropic provides in their MCP repo and create a setting entry for the API key. The Zed logs verify that the dev extension installation was successful and the context server tools were loaded.

I do not have a Postgres instance so I can't confirm or deny if the Postgres Context Server extension does register slash commands successfully, but it's implied here as an issue on their repo. They do not explicitly register the slash command and seem to say that the tools being provided by the context server should register the slash commands automatically. I have dug through some of the Zed source, and don't see slash commands (with slash_command_registry.register_command or .register_command) being registered for context server extensions implicitly based on the tools they provide occurring at all.

You can also register the Brave Search context server as a custom context server without the need for an extension, but that didn't work either, so I thought maybe the slash commands would only be registered if they came from an extension.

Even if there is no slash command registered, I was also unable to coerce the LLMs to use the tool by suggesting its name and inputs as a message.

I could be misunderstanding the support of context server extensions at this time, this could be an error in the documentation, or this could be a gap in the development. Either way, I'd just like to get this clarified. Having this feature available would be useful for me and my development flow.

Note: This source suggests Zed only has support for MCP in the way of provided prompts; not tools or any other feature.

Zed Version and System Specs

Zed: v0.170.1 (Zed)
OS: macOS 15.3.0
Memory: 8 GiB
Architecture: aarch64

If applicable, add screenshots or screencasts of the incorrect state / behavior

Image

If applicable, attach your Zed.log file to this issue.

Zed.log
2025-01-22T15:55:57.668843-06:00 [INFO] ========== starting zed ==========
2025-01-22T15:55:58.079577-06:00 [INFO] Opening main db
2025-01-22T15:55:58.234174-06:00 [INFO] Opening main db
2025-01-22T15:55:59.317486-06:00 [INFO] Using git binary path: Some("/Applications/Zed.app/Contents/MacOS/git")
2025-01-22T15:56:01.975471-06:00 [INFO] No prompt template overrides directory found at /Users/rholmdahl/.config/zed/prompt_overrides. Using built-in prompts.
2025-01-22T15:56:01.980471-06:00 [INFO] No prompt template overrides directory found at /Users/rholmdahl/.config/zed/prompt_overrides. Using built-in prompts.
2025-01-22T15:56:01.990727-06:00 [INFO] extensions updated. loading 12, reloading 0, unloading 0
2025-01-22T15:56:02.078069-06:00 [INFO] Opening main db
2025-01-22T15:56:02.240476-06:00 [INFO] set environment variables from shell:/bin/zsh, path:/Users/rholmdahl/.deno/bin:/Users/rholmdahl/.pyenv/shims:/Users/rholmdahl/.codeium/windsurf/bin:/Users/rholmdahl/.cargo/bin:/Library/Java/JavaVirtualMachines/jdk-21.0.2.jdk/Contents/Home/bin:/Users/rholmdahl/.nvm/versions/node/v20.18.0/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/X11/bin:/Library/TeX/texbin:/usr/local/share/dotnet:~/.dotnet/tools:/usr/local/go/bin:/Users/rholmdahl/.cargo/bin:/Users/rholmdahl/.zsh/path
2025-01-22T15:56:02.342164-06:00 [INFO] set status on client 0: Authenticating
2025-01-22T15:56:02.34813-06:00 [INFO] set status on client 119563: Connecting
2025-01-22T15:56:02.358905-06:00 [INFO] starting context server brave_search
2025-01-22T15:56:02.358981-06:00 [ERROR] no command specified for server brave_search
2025-01-22T15:56:02.380533-06:00 [INFO] Opening main db
2025-01-22T15:56:02.469331-06:00 [INFO] Opening main db
2025-01-22T15:56:02.470339-06:00 [WARN] unhandled message: Metadata(SupermavenMetadataMessage { dust_strings: None })
2025-01-22T15:56:02.828533-06:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2025-01-22T15:56:03.226-06:00 [INFO] add_connection;
2025-01-22T15:56:03.254622-06:00 [INFO] set status on client 119563: Connected { peer_id: PeerId { owner_id: 637, id: 6160911 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2025-01-22T15:56:03.541885-06:00 [INFO] loading command for context server brave-search-context-server from extension brave-search-context-server
2025-01-22T15:56:04.204133-06:00 [INFO] loaded command for context server brave-search-context-server: Command { command: "node", args: ["/Users/rholmdahl/Library/Application Support/Zed/extensions/work/brave-search-context-server/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"], env: [("BRAVE_API_KEY", "<obfuscated>")] }
2025-01-22T15:56:04.204299-06:00 [INFO] starting context server brave-search-context-server
2025-01-22T15:56:04.204367-06:00 [INFO] starting context server (executable="node", args=["/Users/rholmdahl/Library/Application Support/Zed/extensions/work/brave-search-context-server/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"])
2025-01-22T15:56:04.304154-06:00 [WARN] context server stderr: Brave Search MCP Server running on stdio
2025-01-22T15:56:04.314255-06:00 [INFO] registering context server tool: "brave_web_search"
2025-01-22T15:56:04.314309-06:00 [INFO] registering context server tool: "brave_local_search"
2025-01-22T16:01:37.73262-06:00 [ERROR] connection error: error reading rpc message from socket

Caused by:
    0: IO error: Connection reset by peer (os error 54)
    1: Connection reset by peer (os error 54)
2025-01-22T16:01:37.739501-06:00 [INFO] set status on client 119563: ConnectionLost
2025-01-22T16:01:37.781447-06:00 [INFO] set status on client 119563: Reauthenticating
2025-01-22T16:01:37.781917-06:00 [INFO] set status on client 119563: Reconnecting
2025-01-22T16:01:37.956207-06:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2025-01-22T16:01:43.453986-06:00 [INFO] add_connection;
2025-01-22T16:01:43.480168-06:00 [INFO] set status on client 119563: Connected { peer_id: PeerId { owner_id: 637, id: 6165374 }, connection_id: ConnectionId { owner_id: 0, id: 1 } }
2025-01-22T16:03:37.910074-06:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2025-01-22T16:03:37.955646-06:00 [INFO] open paths ["/Users/rholmdahl/.config/zed/settings.json"]
2025-01-22T16:03:37.960715-06:00 [INFO] loading command for context server brave-search-context-server from extension brave-search-context-server
2025-01-22T16:03:38.007157-06:00 [INFO] attempting to start language server "json-language-server", path: "/Users/rholmdahl/.config/zed/settings.json", id: 1
2025-01-22T16:03:38.007527-06:00 [INFO] Initializing default prettier with plugins {}
2025-01-22T16:03:38.00934-06:00 [INFO] Initializing default prettier with plugins {}
2025-01-22T16:03:38.018499-06:00 [INFO] fetching latest version of language server "json-language-server"
2025-01-22T16:03:38.019567-06:00 [ERROR] No path or contents found for buffer
2025-01-22T16:03:38.030151-06:00 [WARN] unhandled message: Set(SupermavenSetMessage { key: "disabled", value: Bool(false) })
2025-01-22T16:03:38.301218-06:00 [INFO] loaded command for context server brave-search-context-server: Command { command: "node", args: ["/Users/rholmdahl/Library/Application Support/Zed/extensions/work/brave-search-context-server/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"], env: [("BRAVE_API_KEY", "<obfuscated>")] }
2025-01-22T16:03:38.301374-06:00 [INFO] starting context server brave_search
2025-01-22T16:03:38.301434-06:00 [ERROR] no command specified for server brave_search
2025-01-22T16:03:38.30149-06:00 [INFO] starting context server brave-search-context-server
2025-01-22T16:03:38.301549-06:00 [INFO] starting context server (executable="node", args=["/Users/rholmdahl/Library/Application Support/Zed/extensions/work/brave-search-context-server/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"])
2025-01-22T16:03:38.368396-06:00 [WARN] context server stderr: Brave Search MCP Server running on stdio
2025-01-22T16:03:38.372113-06:00 [INFO] loading command for context server brave-search-context-server from extension brave-search-context-server
2025-01-22T16:03:38.372927-06:00 [INFO] registering context server tool: "brave_web_search"
2025-01-22T16:03:38.373166-06:00 [INFO] registering context server tool: "brave_local_search"
2025-01-22T16:03:38.546489-06:00 [INFO] loaded command for context server brave-search-context-server: Command { command: "node", args: ["/Users/rholmdahl/Library/Application Support/Zed/extensions/work/brave-search-context-server/node_modules/@modelcontextprotocol/server-brave-search/dist/index.js"], env: [("BRAVE_API_KEY", "<obfuscated>")] }
2025-01-22T16:03:39.073608-06:00 [INFO] using project environment variables shell launched in "/Users/rholmdahl/.config/zed/settings.json". PATH="..."
2025-01-22T16:03:39.25089-06:00 [INFO] language server "json-language-server" is already installed
2025-01-22T16:03:39.251465-06:00 [INFO] starting language server process. binary path: "/Users/rholmdahl/.nvm/versions/node/v20.18.0/bin/node", working directory: "/Users/rholmdahl/.config/zed", args: ["/Users/rholmdahl/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"]
@reecelikesramen reecelikesramen added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue
Projects
None yet
Development

No branches or pull requests

1 participant