Skip to content

Only use certain tools from MCP server #376

Open
@dingfengshaoDD

Description

@dingfengshaoDD

Please read this first

  • Have you read the docs?Agents SDK docs
  • Have you searched for related issues? Others may have had similar requesrs

Describe the feature

Is it possible to select only some tools from MCP servers and assign to an agent?
For example, I have a read_agent, and a write_agent. The read_agent only have access to all read-only tools from the MCP server, while the write_agent have access to write tools (or just one specific write tool).

I think the current implementation assigns all available tools to the agent.

agent = Agent(
        name="Assistant",
        instructions="Use the tools to answer the questions.",
        mcp_servers=[mcp_server],
        model_settings=ModelSettings(tool_choice="required"),
    )

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions