docs: explicitly forbid grepping rust source for mcp schemas and instruct usage of local json cache
This commit is contained in:
1 parent
14db90acbf
commit
02af8f18f1
3 files changed
+9
No files matched your search
@@ -110,3 +110,6 @@ To maintain absolute traceability, we link memory items directly to the exact gi
|
|||||||
The project contains two MCP binaries (win-nvim and linux-nvim) that bridge JSON-RPC over stdio directly to the active Neovim instance (using `active_nvim.txt` for Last Focused Wins telemetry). If no interactive instance is open, they will automatically spawn and connect to a persistent headless Neovim background instance.
|
The project contains two MCP binaries (win-nvim and linux-nvim) that bridge JSON-RPC over stdio directly to the active Neovim instance (using `active_nvim.txt` for Last Focused Wins telemetry). If no interactive instance is open, they will automatically spawn and connect to a persistent headless Neovim background instance.
|
||||||
- These binaries expose basic tools (`nvim_get_cursor`, `nvim_get_active_buffer`, `nvim_list_buffers`, etc.).
|
- These binaries expose basic tools (`nvim_get_cursor`, `nvim_get_active_buffer`, `nvim_list_buffers`, etc.).
|
||||||
- **God Mode**: They also expose `nvim_execute_lua`. This is the ultimate fallback tool. If you need to access *any* Neovim API that does not have a dedicated Rust tool (e.g., getting LSP diagnostics, evaluating a visual selection block based on modes, setting registers), you MUST write a short Lua script and pass it to `nvim_execute_lua`. Do not attempt to recompile the Rust server to add new basic tools; use the Lua escape hatch dynamically.
|
- **God Mode**: They also expose `nvim_execute_lua`. This is the ultimate fallback tool. If you need to access *any* Neovim API that does not have a dedicated Rust tool (e.g., getting LSP diagnostics, evaluating a visual selection block based on modes, setting registers), you MUST write a short Lua script and pass it to `nvim_execute_lua`. Do not attempt to recompile the Rust server to add new basic tools; use the Lua escape hatch dynamically.
|
||||||
|
|
||||||
|
## 16. Tool Schema Discovery (Lazy Loading)
|
||||||
|
Antigravity automatically caches all MCP tool schemas to your disk to save tokens. Do **NOT** grep or search the Rust source code to find tool schemas or arguments. To understand a tool`s arguments, directly read `~/.gemini/antigravity-cli/mcp/<server_name>/<tool_name>.json`. For simple tools, confidently guess the arguments instead of reading the schema to save time.
|
||||||
@@ -29,3 +29,6 @@ If you need to access *any* Neovim API that does not have a dedicated tool (e.g.
|
|||||||
|
|
||||||
## 3. The "Unix is NOT King" Rule
|
## 3. The "Unix is NOT King" Rule
|
||||||
You should **ALWAYS prioritize Neovim tools over basic unix terminal utilities** (like `cat`, `grep`, `sed`, `awk`, or PowerShell equivalents) for file read/writes and search/replace. If an interactive Neovim session is not currently open, the server will automatically spawn a persistent headless Neovim daemon in the background to execute your commands. Use Neovim as your primary AST-aware interface to the codebase at all times.
|
You should **ALWAYS prioritize Neovim tools over basic unix terminal utilities** (like `cat`, `grep`, `sed`, `awk`, or PowerShell equivalents) for file read/writes and search/replace. If an interactive Neovim session is not currently open, the server will automatically spawn a persistent headless Neovim daemon in the background to execute your commands. Use Neovim as your primary AST-aware interface to the codebase at all times.
|
||||||
|
|
||||||
|
## 4. Tool Schema Discovery
|
||||||
|
Do **NOT** grep or search the Rust source code to find tool schemas or arguments. All lazy-loaded MCP tool schemas are automatically cached as JSON files on your disk. To understand a tool`s arguments, directly read `~/.gemini/antigravity-cli/mcp/win-nvim/<tool_name>.json` (or linux-nvim), or simply guess the arguments if it is a basic tool like `nvim_open_file` (e.g., `{"file": "/path/to/file"}`).
|
||||||
@@ -11,3 +11,6 @@ You are Antigravity, connected to the mcp-memory persistence layer. This server
|
|||||||
6. **Decisions**: Use log_decision when you make an architectural choice (e.g. choosing a specific library or pattern).
|
6. **Decisions**: Use log_decision when you make an architectural choice (e.g. choosing a specific library or pattern).
|
||||||
|
|
||||||
Be aggressive about logging state changes in the background! Use the MemoryLibrarian subagent to do this off-thread if needed.
|
Be aggressive about logging state changes in the background! Use the MemoryLibrarian subagent to do this off-thread if needed.
|
||||||
|
|
||||||
|
## Tool Schema Discovery
|
||||||
|
Do **NOT** grep or search the Rust source code to find tool schemas or arguments. All lazy-loaded MCP tool schemas are automatically cached as JSON files on your disk. To understand a tool`s arguments, directly read `~/.gemini/antigravity-cli/mcp/mcp-memory/<tool_name>.json`. Do not waste tokens inspecting the Rust server code for schemas.
|
||||||
Reference in new issue
Block a user