Skip to content

[Tiny Agents] Add tools to config #3242

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

NielsRogge
Copy link
Contributor

This PR enables tools inclusion/exclusion for a given agent. Users can specify the tools to include/exclude like so:

{
  "model": "meta-llama/Meta-Llama-3-8B-Instruct",
  "provider": "auto",
  "servers": [
    {
      "type": "stdio",
      "command": "npx",
      "args": ["@playwright/mcp@latest"],
+      "tools": {
+        "include": ["browser_click", "browser_close"]
      }
    }
  ]
}

Note: this feature was implemented using Claude Code.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does Claude say the behavior should be if specify both 'include' and 'exclude'? 😀

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Back to work Claude! 😁

@NielsRogge
Copy link
Contributor Author

@claude address the comments

Copy link

claude bot commented Jul 30, 2025

Claude encountered an error —— View job

Failed with exit code 128

I'll analyze this and get back to you.

@NielsRogge
Copy link
Contributor Author

@claude address the comments

Copy link

claude bot commented Jul 30, 2025

Claude encountered an error —— View job

Failed with exit code 128

I'll analyze this and get back to you.

NielsRogge and others added 2 commits August 8, 2025 21:24
- Replace complex include/exclude structure with simple allowed_tools list
- Follow OpenAI specs for tool filtering (allowlist approach only)
- Simplify _filter_tools method to use list comprehension
- Update type definitions in types.py
- Remove example files as requested by maintainers
- Add comprehensive unit tests for allowed_tools functionality

This addresses PR feedback from @julien-c and @Wauplin:
- Eliminates confusion about include/exclude precedence
- Aligns with industry standards (OpenAI)
- Provides cleaner, simpler API

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
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.

4 participants