Skip to content

MCP tool indirection security

MCP tool indirection security rests on one rule: the run tool unwraps to a name and arguments, then meets the same checks a direct call would meet.

Raajshekhar Rajan Updated 7 min read
A single tool call passing through role, scope and restriction checks before reaching a connected app

The tool list a security reviewer sees first

When an AI client connects to Elaichi, its tool list holds Elaichi's own admin actions. Beside them sit the tools that reach everything else: a search tool that finds a connected tool, and a run tool that runs it. A code tool also appears where Code Mode is available. There is no Salesforce tool in that list, and no Jira tool, because connected tools are never listed one by one, however few there are. The first question a reviewer asks is whether the run tool is a way around the rules. MCP tool indirection security is the answer. The run tool resolves a string to a tool and decides nothing else, and the call it unwraps to meets the checks a direct call meets. For the engineer who has to type the names, these are the exact ones:

search_tools     the search tool
execute_tool     the run tool
run_code         the code tool
elaichi__...     Elaichi's own admin actions

What does the run tool do with the name it is handed?

It unwraps it. The run tool takes a required tool name and a set of arguments. There is no separate execution path behind it, and it carries no privilege of its own. An optional connection argument picks the connected account a tool runs against. It belongs inside the arguments. One sent at the top level beside the name is refused, with an error showing where to move it. Nothing else is guessed. The shape is:

execute_tool(
  name: "<tool name>",
  arguments: { connection: "<account>", ... }
)

The name can also be one of Elaichi's own admin actions. The run tool will unwrap to one of those, which then has to clear that action's own checks rather than the run tool's. Nothing about passing through the run tool changes what the named thing is allowed to do.

Why MCP tool indirection security has to mean no extra privilege

Because the alternative is a bypass with a friendly name. Suppose the wrapper held authority of its own. Every role check, every restriction and every scope decision could then be sidestepped. A caller would route the call through the wrapper instead of naming the tool. A restriction, in Elaichi, is a rule on a role or on one member saying which connectors and tools they may reach. A rule that holds for a direct call and not for a wrapped one is not a rule.

So the wrapper does one job. It turns a name into a resolved tool, then hands the call to the same checks. The honest test of any meta-tool is not what its description promises. It is whether both routes land in the same place.

Which gates one connected-tool call passes, in order

Four gates, in this order. A connected-tool call passes them whether or not it was wrapped.

  1. The caller's role must hold the permission to run tools. A role without it gets an empty tool list. The in-band refusal says re-authorizing cannot grant it, because it is a role and not a scope.
  2. The name must resolve on this grant's surface. A grant is the OAuth authorization the person approved for that client. Without the "Use your connected apps" box ticked at sign-in, the answer is a refusal that names the missing permission. A tool a restriction withholds gets a restriction refusal. Anything else gets "Unknown tool".
  3. The gate re-derives the tool's tier, read, write or delete, at call time. It charges no further scope for that tier. A custom tool edited from a GET to a DELETE is dispatched as a delete. If the tool no longer resolves, the call is refused rather than run unclassified.
  4. Execution re-resolves the toolbox and requires use access to it. It then applies the caller's own restrictions, resolves the connection argument, and writes an audit row.

One detail matters for evidence. A call refused at the scope check writes no audit row, because the refusal happens before any executor runs. Rows exist for calls that reached execution and then ran, failed or were refused there.

What the gates read at call time, not at list time

Every authorization is taken again when the call arrives. A grant's connected-tool surface is what the search tool ranks and the run tool resolves. It is kept in worker memory for up to 60 seconds. That cache only affects what is advertised. Each tool call re-reads toolbox access, the caller's restrictions and the scope tier from a fresh resolution. A stored toolbox is re-resolved entry by entry. That includes whether the person who pinned each connection still holds access to it.

The timing differs by change. Revoking a grant fails the client's very next request. In Elaichi, revoking a share or disconnecting an account takes effect on the caller's next call. Role, team and restriction changes reach every surface within about two minutes.

What happens when the name is one of Elaichi's own operations

It meets that action's own checks, which are stricter than a connected tool's. The call passes the run-tools permission, then the app-only check, then the step-up check, which asks the person to prove it is them. Next comes the requirement that the name exists, is not forbidden and is offered to this client. After that comes the organization's assistant-operations setting. The sign-in boxes come last: a read needs "See your organization", a write needs "Make changes", a delete needs "Delete things". The executor then re-checks the role's permission, the plan feature and the operation's own access rules.

Some names cannot be reached at all. Six actions are never listed over MCP. They are creating and deleting invitations, changing a member's roles, deleting a member, deleting a role and deleting a team. The Elaichi app asks the person to confirm it is them first. Calling one by name is refused, and the refusal names the console screen to use. Three operations classified forbidden, covering credential creation or rotation, security changes and authentication flows, never run on any surface. Wrapping a name does not conjure a path that does not exist.

Can a client skip the wrapper and call the tool name directly?

Yes, and that is the point. The server accepts a connected tool's exact name in a direct tool call, even though it is never listed. The call meets the same checks it would meet through the run tool. Over MCP a connected tool can also be run through the code tool, where Code Mode is available, and through Elaichi's actions for running a toolbox and running a synthetic tool (a multi-step tool you build). Each of those routes ends at the same restriction check, evaluated for the person the call acts as.

A name that resolves to nothing returns an in-band tool error rather than a protocol error. When the caller has connected tools, it suggests the three closest names, ranked as tool search ranks them. A name with one typo still finds its target. The error also says the gap may be a role, a scope or a restriction rather than a spelling mistake. The mechanics of that ranking are covered in how tool search picks one tool from hundreds.

What the indirection costs

One tool name carries every connected-tool call made through the run tool, whatever the app. An AI app setting that allows or gates individual MCP tool names therefore sees them as one tool. It cannot tell a Salesforce read from a Gusto write. A permission set on the run tool also misses calls made through the code tool or through the action that runs a toolbox. Per-app and per-tool control has to live in Elaichi, as restrictions on a role or on one member. The case for each shape is in restrict one AI tool or the whole app.

The annotations compound this. Elaichi marks the run tool destructive, open-world and not idempotent (not safe to repeat). The real tier of whatever it is handed is not knowable before the call. Elaichi treats annotations as untrusted hints for clients, not as gates. A tool's description is untrusted in the same way, which is the ground that instructions smuggled into a tool's description or its output exploit.

Client-side approval settings read those hints. Codex sets approval behavior per server with a default approval mode. Its writes setting prompts for any tool not marked read-only (OpenAI's MCP docs, checked October 2026). Cursor asks for approval before using MCP tools by default (Cursor's MCP docs, checked October 2026). Claude's connector tool permissions take one of three settings: Always allow, Needs approval or Blocked. They apply to a whole connector, a category of its tools or a single tool (Anthropic's connectors article, checked October 2026). A per-tool setting of that kind can only reach the tools Elaichi lists, so on Elaichi it lands on the run tool rather than on one app. Because the run tool is never marked read-only, a client that prompts for anything but reads asks before every connected-app call, reads included.

The sign-in boxes do not narrow this either. "Use your connected apps" alone runs every tier of connected tool, deletes included. Leaving "Make changes" unticked does not make a connected app read-only. To hold a client to reads, pick toolboxes of read tools at consent. Or block the app's write and delete tools with a restriction.

When you do not need any of this

If one team uses one app's own MCP server, and that server lists its tools individually, the indirection question never arises. The client shows a dozen named tools. Per-tool approval there means what it looks like it means, and nothing sits between the client and the vendor. Adding a layer there buys governance that matters more as apps and AI clients are added, and whether you need an MCP gateway is worth reading before you shop.

The wrapper earns its place when one address fronts many apps for many people. At that point a tool list long enough to be useful stops fitting in a model's context. Naming becomes indirection whether you choose it or not. The question left is whether the indirect path is checked as tightly as the direct one. That is what an MCP control plane is for. It is also the thing to verify in any product that offers one. To see what sits behind the wrapper on Elaichi's side, browse the connector catalog.

FAQ

Frequently asked questions

Does running a tool through the run tool need different permissions than calling it directly?

No. In Elaichi, the run tool passes on the tool name and arguments it was given. The call then meets the same permission check a direct call meets. For connected apps, that check is the "Use your connected apps" box on the sign-in screen. It covers every kind of tool, including tools that delete things in the connected app. The run tool never adds or removes a requirement.

Can an AI client call a connected tool by its exact name even though Elaichi never lists it?

Yes. Elaichi's MCP address accepts a connected tool's exact name in a direct tool call, even though connected tools are never listed one by one, however few there are. That call passes the same checks as a call made through the run tool. Those are the role's permission to run tools, what the person approved at sign-in, the caller's restrictions, and use access to the toolbox. The AI finds the name with the search tool.

What happens when the AI asks to run a tool that is restricted?

Elaichi refuses it, and the AI can read the refusal. The response is HTTP 200 with a tool error. It says the tool is restricted for the caller's role or for their account. It adds that an admin can lift the restriction through an access request. The refusal does not name the rule, who wrote it, or what else it covers, and the call never reaches the connected app.

Can the run tool reach Elaichi's own admin actions?

It can pass on a request for one of Elaichi's own actions. That action then has to clear its own checks. Those are the role permission it requires and the sign-in box its type needs. A plan feature and the action's own access rules apply too. Some actions are refused over MCP every time. They include creating or deleting invitations, changing a member's roles, deleting a member, and deleting a role or a team. The Elaichi app asks the person to confirm their identity first.

Why does the run tool say it is destructive even when it only reads?

Because Elaichi cannot know what kind of tool it is handed until the call arrives. The run tool is labeled destructive, open-world and not repeatable for that reason, and the code tool is labeled the same way. Those labels are hints for the AI app, and Elaichi does not rely on them. The server's own permission and restriction checks are the real gates, and the actual kind of tool is worked out again at call time.

Put AI to work in your own apps

14 days of Black, no credit card. Start with one app and one team.

When the trial ends, nothing is deleted. You move to the free Personal plan, and connections, roles and the audit log stay where they are.

Add one link to your AI app

The same link for everyone on your team.

https://api.elaichi.ai/mcp
  • ChatGPT
  • Claude
  • Perplexity
  • Grok
  • Cursor
  • Microsoft Copilot