Skip to main content

Tools and MCP servers

A tool is something an agent may do while it works: read a file, look up a row, send an email, or call a tool on an MCP server. The agent decides when to use each one. You decide which ones it has, what they may do, and how much it may spend on them.

  • Agents
  • MCP is off until an installation turns it on

Catalog steps as tools​

Any catalog step that works on one document can be a tool. In the agent's Tools segment, or the step's tools list, you choose them by name. An agent has up to 16 steps as tools.

A step cannot be a tool when:

  • it is another AI agent (an agent cannot be another agent's tool);
  • it works on all the documents of one arrival together, such as merging PDFs;
  • it waits for a person's answer (Ask by email and wait for the reply, the WhatsApp ask);
  • it is a step an app's workers run.

A saved step (a Step) is not a tool either: only catalog steps are. Three memory steps, Remember something, Recall what I remember and Forget a note, can be used only by an agent, never as a flow step. See Memory.

excerpt of a flow node
- id: bot
stepRef: {name: chat-agent}
config:
instructions: Answer the customer. Look the order up before you answer.
tools: [find-row, send-email]

Limit what a tool may do​

A tool you give an agent is a tool it can use on its own. Guardrails put limits on a tool that Lumen checks on every call, before it runs. A call outside a limit does not run, and the agent is told why. The limits are per tool: for example, a send-email tool may send only to *@acme.example, and an HTTP tool may call only listed hosts and methods. Guardrails also hold rules in plain sentences the agent must follow, and kinds of text to mask in its answer.

A tool can also need a person's approval for each call. Mark it approval: required and the run pauses at every call of that tool until a person approves or rejects it: by default a workspace admin on the run page, or the WhatsApp numbers and email addresses you list in approvers. An approved call runs exactly as asked. A rejected call does not run, and the agent is told a person rejected it and continues. If nobody decides within approvalHours (1 to 168, default 24), the call is treated as rejected, or the step fails when you set onExpire: fail.

excerpt of a flow node
guardrails:
tools:
send-email:
approval: required
approvalHours: 4 # optional, 1 to 168, default 24
onExpire: fail # optional: reject (default) or fail
approvers: # optional: who is asked; the console when left out
- console
- whatsapp: {connection: support-whatsapp, to: ["972501234567"]}
- email: {to: ["ops@acme.example"]}

See Send the request to WhatsApp or email for what each approver gets and how they decide.

Approval also applies without a guardrail in one situation: after an agent has read a web page, or a file it downloaded from the web, a call that could carry data out asks for approval instead of running. That covers sending an email when the tool has no list of allowed recipients, an HTTP request, saving a memory note, and code that sends. Opening a page outside a browser connection's allowed domains is still refused. See Approve an agent's tool call for what admins see, who may decide, and what the audit log records.

What a tool call costs​

A successful tool call is charged the credit weight of its step, per call. A failed call costs nothing. The tokens the agent uses to decide and to read the result are charged at the model's rate, as for any agent turn. The memory tools weigh 0 and are never charged.

The Tools segment shows each step's cost on its chip. Try it on a saved agent lists the tools it called and the credits they cost. See Credits and budgets.

An agent's maxToolCredits caps tool spending in one run. The call that would pass it is not made and the agent stops with that reason. Without it, tool calls are bounded by the agent's maxTurns only. It is set in the agent step's definition, not per flow node. See Agents.

The Tools panel of an agent: a multi-select of Steps it may call with four chips, Read the text (1 credit), Rename the file (0.5 credits), Recall what I remember and Remember something.The Tools panel of an agent: a multi-select of Steps it may call with four chips, Read the text (1 credit), Rename the file (0.5 credits), Recall what I remember and Remember something.
An agent's tools, each with the credits one call costs.

MCP servers​

MCP (Model Context Protocol) is a standard way for a service to offer tools to an agent. In Lumen an MCP server is a connection. Connect it once, decide tool by tool what agents may use, and name the tools in an agent.

MCP is off by default

An installation turns MCP on in its settings. Where it is off, the Custom MCP server type shows as not set up and no mcp connection can be created. On a workspace in the Israel region, MCP stays off until an acknowledgement exists that data sent to an MCP server leaves Israel. The acknowledgement is planned, so for now it is refused there.

What works today​

FeatureState
Connect a server with no sign-in or a key in a headerWorks
Curated entries: Jira, GitHub (read-only) and DeepWikiWorks, with a token or no sign-in
Test connection (checks the address, the protocol and the first page of tools)Works
Tool sync: Lumen lists the server's tools and keeps each by its definitionWorks
Per-tool policy Allow and BlockWorks
Per-tool policy Ask first (a person approves each call)Works. An agent that names the tool, and the Call an MCP tool step, pause until an admin decides

Connect a server​

Add the connection​

  1. Open Connectors and add a connection of type Custom MCP server, or choose Jira, GitHub or DeepWiki from the gallery.
  2. For a custom server, enter its Server address (https only, no query) and How Lumen signs in: No sign-in or A key in a header. Paste the key; it is stored write-only and never shown again.
  3. Click Test connection.

Decide which tools are allowed​

  1. Open the connection. Under Tools Lumen lists what the server offers, each with a state: New, Changed, Refused, Gone, Allowed or Blocked.
  2. A tool with no decision is blocked. Choose Allow or Block for each. Only workspace admins can change them.
  3. Allowing a tool the server does not mark read-only asks you to type its name to confirm.
  4. On a curated connection, Apply suggestions allows the tools the server marks read-only and leaves everything else blocked. On a custom one, Allow all read-only tools that stay inside the server does the same. Nothing is allowed until you click it.
The Tools list of an MCP connection. search_docs and read_doc each show a green allowed mark, annotation icons and two buttons, Allow (highlighted) and Block. sync_notes shows a red refused mark and the reason: The schema refers to something outside itself.The Tools list of an MCP connection. search_docs and read_doc each show a green allowed mark, annotation icons and two buttons, Allow (highlighted) and Block. sync_notes shows a red refused mark and the reason: The schema refers to something outside itself.
Each tool carries its own state. A refused tool cannot be allowed.

Allowed means the agent may send run data to this server. Allow only what you are willing to send data to.

Who approves an Ask first tool​

A tool set to Ask first goes to the workspace admins by default. To send its calls to WhatsApp numbers or email addresses as well, add approvers to the tool's entry in the connection's settings. It is the same list as on a guardrail, and it applies to every agent and every Call an MCP tool step that calls the tool, unless they set their own.

excerpt of a connection
spec:
config:
tools:
create_refund:
policy: ask
hash: sha256:...
approvers:
- console
- email: {to: ["finance@acme.example"]}

approvers is accepted only on a tool set to ask.

Give an agent the tools​

  1. In the agent's settings, open the MCP tools picker. It offers only tools an admin has allowed, up to 16 per connection.
  2. Choose the tools. An agent has at most 32 MCP tools.
  3. Save. A run is refused to start if a named tool is no longer allowed, or its connection is paused or not ready.

In YAML the agent node names the connection and tools. The model calls a tool as orders-mcp/get_invoice:

excerpt of a flow node
- id: bot
stepRef: {name: chat-agent}
config:
instructions: Answer questions about invoices.
mcp:
- connector: orders-mcp
tools: [get_invoice, list_orders]

How Lumen keeps this safe​

  • Tools are pinned by their definition. When a server changes a tool after you approved it, the tool shows Changed and agents cannot use it until an admin approves the new definition. You see the old and new definitions side by side.
  • Unsafe definitions are refused. A tool whose name or schema holds hidden characters, references outside itself, or is too large is Refused and cannot be allowed.
  • Calls are checked before they are sent. Arguments are checked against the allowed definition, and each call is sent once.
  • Results are data. What a server returns reaches the model inside tags it cannot close, marked as data, capped at 20,000 characters. It is not instructions.
  • Limits. At most 20 MCP calls in one agent step. MCP calls themselves are not charged credits; the agent's tokens are.
  • What is recorded. The step's activity records the connection, the tool, the decision and the names of the arguments, never their values or the result.

Lumen lists a server's tools again after its own interval (6 hours when the server gives none) and when you press the refresh button, at most every 30 seconds. Admins get a notification when new, changed or refused tools wait for review.

Call an MCP tool from a flow, with no AI​

An agent is not the only way to use an MCP tool. The step Call an MCP tool calls one tool of an MCP connection with the values you give it, and no model decides anything. Use it when the flow already knows what to ask: look up a ticket, open an issue, fetch a record.

  1. Add the step and pick an MCP connection. Only MCP connections are listed.
  2. Pick the Tool. The list shows the tools an admin allowed, and tools set to Ask first. For an Ask first tool the step pauses before the call and waits for an admin to approve it; set Wait for approval at most (1 to 168 hours, 24 by default) to change how long. If an admin rejects the call, or nobody decides in time, the step fails with the reason, so the flow's error handling applies.
  3. Fill in the Arguments. The form follows what the tool takes: text, numbers, true or false, choices, and nested values and lists. Every field can take values from earlier steps, and Edit as JSON shows the whole thing at once.
excerpt of a flow node
- id: lookup
stepRef: {name: mcp-call}
config:
connection: orders-mcp
tool: get_invoice
arguments:
orderId: "{n1.orderNumber}"

For a tool set to Ask first, the step's own approvers list says who is asked, next to approvalHours; without it the connection's list for the tool applies, else the workspace admins. See Who approves an Ask first tool.

The step hands the next steps four values: result (the structured answer, or the text when it is JSON), text (the answer as text), isError and any images or files the tool returned, which are saved as the run's files. An answer larger than 1 MB fails the step.

How it behaves:

  • Testing. A tool that says it only reads runs for real when you test the step. Any other tool shows the call it would make and sends nothing. A retry of a flow asks before it repeats a tool that changes something, and does not ask for one that only reads.
  • The tool changed. The step remembers the version of the tool you set it up with. If the server changes the tool later, the step stops with a note to open it again and check the arguments.
  • Wrong arguments. The arguments are checked against what the tool takes before anything is sent.
  • The tool says it failed. The step fails with the server's message, so the flow's error handling applies.
  • Allowed tools only. A tool that is blocked, or has no decision yet, stops the flow from running, as it does for an agent. A tool set to Ask first runs once an admin approves that call.
  • Cost and limits. Each call costs 1 credit. A call waits 30 seconds by default and 120 at most, and is sent once. It is available where MCP is switched on, and so is off in the Israel region for now.

Browser and code tools​

Two more tools exist, and both are off until an installation enables them, because they need an isolated runtime:

  • Run code (run-code) runs a short JavaScript you or the agent write, in an isolated sandbox. It can call only the HTTP connections the step grants it. It weighs 1 credit.
  • Browser gives an agent a browser signed in to a website-login connection, for portals with no API. It acts on that connection's allowed domains only.

On a self-hosted installation these are the sandbox and browser settings in the chart, and each needs a gVisor runtime class. If a step says it is not available, your installation has not switched it on.

Next steps​