I am building an MCP server for Gmail. I want to link a few functionalities to each other, so if I have a reply action to a mail, that mail should also automatically be marked as read. This far I didn’t figure how I can make that with the MCP tool. Any good advice?
Unsure if this is a current feature. You could potentially just tell the model it needs to do both and that would solve it for the time being. (When calling the MCP)
I can give another example.
I’m using Meta Ads MCP with the N8N MCP Client (Community Node).
This node has 26 tools, most of which require an ID from the “parent”. For example, if you want to get a specific ad, you must provide its ID. To get the IDs of the ads, we need the adset ID, for which we need the campaign ID, and then the account ID.
So, we need five requests:
- List accounts
- List campaigns
- List ad sets
- List ads.
- Get ad.
How can we instruct the AI agent to chain these commands together to perform the five requests? Right now, I can’t even tell it to make two chain requests.
Is it possible with one or two AI agents, or do we need to build a loop with multiple AI agents for each possibility that the user can request?
There is a second problem now: how can we cache data, for example for 4 hours, for listings, accounts and campaigns? Chat memory is no use here.