Skip to content

Conversation

@chughtapan
Copy link
Owner

@chughtapan chughtapan commented Jan 18, 2026

Summary

  • Adds GroupsMiddleware for progressive tool disclosure via hierarchical groups
  • Tools can be assigned to groups via @in_group decorator or tool metadata
  • Agents use enable_tools/disable_tools meta-tools to control active groups
  • Returns structured JSON output using Pydantic models (EnableToolsResult, DisableToolsResult)
  • Supports parent-child group hierarchies with cascading disable
  • Optional max_tools limit to control context size

Test plan

  • Unit tests: pytest tests/unit/middleware/test_groups.py
  • Integration tests: pytest tests/integration/test_groups_middleware.py
  • E2E tests: pytest tests/e2e/groups/test_groups_e2e.py --model claude-sonnet-4-5

🤖 Generated with Claude Code

Replace text-formatted responses with Pydantic models (EnableToolsResult,
DisableToolsResult) that FastMCP automatically serializes via ToolResult's
structured_content parameter.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@chughtapan chughtapan force-pushed the groups_middleware branch 2 times, most recently from 4fe8cf0 to ab82bcb Compare January 18, 2026 08:47
- Fix proxy tests to use Client connection for listing tools
- Fix mypy errors: use Sequence[Tool] instead of list[Tool]
- Update lock file for camelCase MCP SDK/FastMCP forks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@chughtapan chughtapan merged commit 7914226 into main Jan 18, 2026
3 checks passed
@chughtapan chughtapan deleted the groups_middleware branch January 18, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants