Skip to content

fix(mcp): clarify always_include semantics vs max_tools cap in prune_tools #2296

@bug-ops

Description

@bug-ops

Ambiguity

In crates/zeph-mcp/src/pruning.rs, always_include tools are added unconditionally before the max_tools cap is applied. This means pinned tools can push the result past max_tools.

Question to resolve

Does max_tools apply to:
a) The total result (pinned + LLM-selected), or
b) Only LLM-selected candidates (pinned always bypass the cap)

Required action

Either fix the logic or document the semantics explicitly in a doc comment with a test. Must be resolved before the wiring PR.

Component

zeph-mcp (pruning.rs)

Metadata

Metadata

Assignees

Labels

P2High value, medium complexityenhancementNew feature or requesttoolsTool execution and MCP integration

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions