Need more detail? Connect your coding agent to the full docs.

Skip to Content
AMIRILDocs

Grant tools to an agent

Turn on the tools an agent may call, give it a gateway token and point its MCP client at the Amiril gateway. Then revoke the tools it stops using.

This guide grants the payments agent its issue_payment tool and connects the agent to the Amiril gateway. It ends with revoking a tool and answering an access suggestion.

Every tool starts denied, including a tool that a server adds later.

Before you start

Grant a tool

Open Agents, select the payments agent and open its Access tab. It lists each tool server with its tools. Set Show to All tools to see the denied ones as well.

Find payments.issue_payment and turn on its switch. The part before the dot is the server's slug. Amiril says Granted payments.issue_payment. and the grant takes effect within a few seconds.

To grant several tools on one server at once, select Edit on the server's heading and pick an Access level. Read ticks the server's Read tools, Read and write adds its Write tools and Full adds its Destructive tools too. Tick or untick any tool, then select Save changes.

Connect the agent

The agent needs a gateway token to reach its tools.

Open the agent's Connect tab and select Create token. Name it after where the agent runs, such as Production deployment. A token works only in the environment you create it in.

Select Copy token. Amiril shows the token only once, so store it where the agent keeps its secrets.

Point the agent's MCP client at the gateway. The Client configuration on the Connect tab has this shape with the gateway URL filled in. Put the token in place of <token>:

mcp.json
{
  "mcpServers": {
    "amiril": {
      "url": "<gateway URL>",
      "headers": {
        "Authorization": "Bearer <token>"
      }
    }
  }
}

If your agent creates its MCP client in code, point the agent at the gateway shows how in TypeScript.

The agent's tool list now has payments__issue_payment. The app writes the tool as payments.issue_payment, but model APIs do not accept a dot in a tool name. So the gateway joins the slug and the tool's name with __. If the agent calls a tool it was not granted, the gateway answers with an error that says an admin can grant it in Amiril.

See the agent's gateway calls

The agent's Calls tab lists each tool call through the gateway, newest first. Decision says whether the gateway allowed it, and Result says how the tool server answered. Amiril does not store the arguments or the results.

Revoke a tool

Turn off the tool's switch on the Access tab. The agent loses the tool within a few seconds. The message that confirms the revoke has Undo, which puts the grant back as it was.

Answer an access suggestion

Amiril suggests revoking a tool when the agent was granted it more than 30 days ago and has not called it in the last 30 days. The investigator, the AI agent that writes up each issue, can suggest a revoke too. It does so when it judges from the issue's runs that the agent should not be able to call that tool at all.

Open suggestions show above the table on the agent's Access tab and on the Suggestions page. Each one has two answers:

  • Revoke takes the tool away.
  • Dismiss keeps the grant. An unused tool you dismiss is not suggested again for 30 days.

A suggestion also closes on its own when it no longer applies, for example when the agent calls an unused tool. Every grant, revoke and dismissal goes into the access log.

Next steps

Last updated on