Skip to content

find_in_file CLI lacks --focus-line/--focus-column flags despite MCP accepting them #1597

Description

@Widthdom

Summary

The MCP find_in_file tool accepts focusLine / focusColumn arguments, but the CLI subcommand exposes no --focus-line / --focus-column flags. The two surfaces have drifted: callers that script via CLI cannot ask for "the symbol at line 42 col 7", but the MCP variant can.

Where

  • src/CodeIndex/Mcp/McpToolDefinitions.cs:186-188 (focusLine/focusColumn input schema)
  • src/CodeIndex/Mcp/McpToolDefinitions.cs:209-210 (find_in_file MCP wiring)
  • src/CodeIndex/Cli/QueryCommandRunner.cs (find_in_file CLI argument list — no focus-* flags)

This is a surface-parity drift, not a duplicate of #1525 (which only adds the missing flags to bash completion for an already-present CLI option).

Why it matters

Workflows that mix CLI + MCP cannot assume tool parity. Editor integrations that prefer to shell out also lose precision targeting.

Suggested approach

Add --focus-line / --focus-column to the CLI find_in_file runner, threaded through to the same code path the MCP handler uses. Document in USER_GUIDE.md and add bash completion entries. Long-term: introduce a parity test that compares CLI flag set vs MCP tool inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions