Is there a way to limit tools available to an agent from an MCP server? #54
Unanswered
desmondcarot
asked this question in
Q&A
Replies: 2 comments 1 reply
-
|
This is a great suggestion. It's ultimately down to the Host/Client what gets presented to the LLM/Agent. Thinking aloud, this feels like something that would be better configured in the |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
https://fast-agent.ai/agents/defining/#basic-agent #tools={"filesystem": ["tool_1", "tool_2"] # Filter the tools available to the agent. Defaults to all@fast.agent(
name="agent", # name of the agent
instruction="You are a helpful Agent", # base instruction for the agent
servers=["filesystem"], # list of MCP Servers for the agent
#tools={"filesystem": ["tool_1", "tool_2"] # Filter the tools available to the agent. Defaults to all
#resources={"filesystem: ["resource_1", "resource_2"]} # Filter the resources available to the agent. Defaults to all
#prompts={"filesystem": ["prompt_1", "prompt_2"]} # Filter the prompts available to the agent. Defaults to all.
model="o3-mini.high", # specify a model for the agent
use_history=True, # agent maintains chat history
request_params=RequestParams(temperature= 0.7), # additional parameters for the LLM (or RequestParams())
human_input=True, # agent can request human input
elicitation_handler=ElicitationFnT, # custom elicitation handler (from mcp.client.session)
api_key="programmatic-api-key", # specify the API KEY programmatically, it will override which provided in config file or env var
) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently working with
@fast.Agentand using setting it up like this:@fast.Agent("agent1", servers=["filesystem"])This setup works fine, but it gives the agent access to all the tools provided by the filesystem server. For security and functionality purposes, I want to restrict which tools from a server the agent can access.
Is there a way to do something like this?
Basically, I want to allow only a subset of tools from the filesystem server.
Does the
@fast.AgentAPI (or MCP server config in general) support something like this?Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions