Skip to main content
Glama

vim_jump

Easily navigate Neovim's jump list: move back, forward, or view all jumps using precise commands for efficient code editing and navigation.

Instructions

Navigate Neovim jump list: go back, forward, or list jumps

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionYesJump direction or list jumps

Implementation Reference

  • src/index.ts:567-591 (registration)
    Registration of the 'vim_jump' MCP tool, including schema and handler function that delegates to NeovimManager
    server.tool(
      "vim_jump",
      "Navigate Neovim jump list: go back, forward, or list jumps",
      {
        direction: z.enum(["back", "forward", "list"]).describe("Jump direction or list jumps")
      },
      async ({ direction }) => {
        try {
          const result = await neovimManager.navigateJumpList(direction);
          return {
            content: [{
              type: "text",
              text: result
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: "text",
              text: error instanceof Error ? error.message : 'Error navigating jump list'
            }]
          };
        }
      }
    );
  • Handler function for vim_jump tool that invokes neovimManager.navigateJumpList and formats the response
    async ({ direction }) => {
      try {
        const result = await neovimManager.navigateJumpList(direction);
        return {
          content: [{
            type: "text",
            text: result
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: "text",
            text: error instanceof Error ? error.message : 'Error navigating jump list'
          }]
        };
      }
    }
  • Input schema for vim_jump tool using Zod validation
    {
      direction: z.enum(["back", "forward", "list"]).describe("Jump direction or list jumps")
    },
  • Core implementation of jump list navigation in NeovimManager class, handling back, forward, and list actions via Neovim API
    public async navigateJumpList(direction: string): Promise<string> {
      try {
        const nvim = await this.connect();
        
        switch (direction) {
          case 'back':
            await nvim.input('\x0f'); // Ctrl-O
            return 'Jumped back in jump list';
            
          case 'forward':
            await nvim.input('\x09'); // Ctrl-I (Tab)
            return 'Jumped forward in jump list';
            
          case 'list':
            await nvim.command('jumps');
            // Get the output from the command
            const output = await nvim.eval('execute("jumps")');
            return `Jump list:\n${output}`;
            
          default:
            throw new NeovimValidationError(`Unknown jump direction: ${direction}`);
        }
      } catch (error) {
        if (error instanceof NeovimValidationError) {
          throw error;
        }
        console.error('Error navigating jump list:', error);
        throw new NeovimCommandError(`jump ${direction}`, error instanceof Error ? error.message : 'Unknown error');
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states what the tool does but lacks critical behavioral details: it doesn't specify if this requires an active Neovim instance, what happens if no jumps exist (e.g., error behavior), whether it's read-only or modifies state, or what the output looks like (especially for 'list' direction). For a navigation tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise and front-loaded in a single sentence that captures the core functionality. Every word earns its place: 'Navigate' sets the action, 'Neovim jump list' specifies the resource, and 'go back, forward, or list jumps' enumerates the options. There's zero waste or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (navigation in an editor context), no annotations, no output schema, and 100% schema coverage, the description is incomplete. It adequately states the purpose but fails to provide necessary behavioral context (e.g., state modification, error handling) or usage guidance. For a tool interacting with Neovim's state, more completeness is needed to help the agent use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'direction' fully documented in the schema with enum values and description. The description adds no additional parameter semantics beyond implying the three actions map to the enum values. This meets the baseline of 3 when the schema does the heavy lifting, but the description doesn't compensate with extra context like format details or examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Navigate') and resource ('Neovim jump list'), specifying the three actions available (go back, forward, or list jumps). It distinguishes this tool from siblings like vim_buffer or vim_command by focusing on jump list navigation rather than buffer management or command execution. However, it doesn't explicitly differentiate from vim_mark (which might involve similar navigation concepts), keeping it at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active Neovim session), when not to use it, or how it relates to sibling tools like vim_buffer_switch for buffer navigation or vim_search for search-based movement. The agent must infer usage from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bigcodegen/mcp-neovim-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server