dmtrKovalenko / dmtrKovalenko/fff
[Suggestion]: fff-mcp: let the user choose which tools the server exposes
- Dominant language
- Rust
- Stars
- 10.7k
- Forks
- 446
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 39
Description
### 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:
```console
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in crates/fff-mcp/src/main.rs, especially MCP_INSTRUCTIONS at lines 19-93 and the fff-mcp command entry point. Trace how the server currently exposes find_files, grep, and multi_grep. Done means --tools selects a validated subset, defaults to all three, and instructions no longer describe tools that are not exposed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 67/100