Evaluate VimL expression
nvim_evalEvaluate any Vimscript expression in your Neovim session and get the result, enabling agent access to Neovim state for automation and control.
Instructions
Evaluate a Vimscript expression (e.g. expand('%:p')) and return the result.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"expr": "<expr>"
},
"name": "nvim_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expr | Yes | The Vimscript expression to evaluate. |