Skip to content

[Suggestion]: fff-mcp: let the user choose which tools the server exposes #716

Description

@vlsi

Which fff frontend(s)?

MCP server (fff-mcp)

What problem are you trying to solve?

fff-mcp always advertises all three tools — find_files, grep, and multi_grep — plus ~75 lines of MCP_INSTRUCTIONS. Every client pays for that on each request, whether or not it uses all three.

Two cases where this hurts:

  • Overlap with the host agent. A client that already has a good content search (its own grep, or another MCP server) may want only find_files from FFF. Today it gets all three, and the model has to pick between near-duplicate tools.
  • Context budget. Tool schemas and server instructions sit in the system prompt for the whole session. On small-context models, or when many MCP servers are connected, dropping two unused tools plus the parts of the instructions that describe them is a measurable saving.

Client-side deny rules do not solve this: they block the call, but the tool description still ships to the model.

Proposed solution

Add a CLI flag that selects the exposed tool set, for example:

fff-mcp --tools find_files
fff-mcp --tools grep,multi_grep

Default stays "all three", so nothing changes for existing configs.

Two things worth deciding as part of the design:

  1. Instructions should follow the selection. MCP_INSTRUCTIONS (crates/fff-mcp/src/main.rs:19-93) documents the "which tool should I use?" split and the multi_grep rules. If multi_grep is not exposed, the instructions should not describe it — otherwise the model is told to use a tool it cannot call, and the context saving is largely lost.
  2. Behavior on an unknown name. Failing at startup with the list of valid names is friendlier than silently ignoring a typo, since the mistake is otherwise invisible until the agent asks for a missing tool.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions