finding-and-calling-tools

by Omniio

Find and correctly call a tool on an Omniio MCP gateway. Use whenever a request could be served by an external system — live data, a lookup, or an action in a connected product — rather than answered from memory, and whenever a run_tool call has failed with an argument or validation error. Covers the search_tools, describe_tool, run_tool loop and the argument mistakes that cause most failed calls.

Using this gatewayAlways on1 file

What it tells an agent to do.

The author’s own instructions, as your agent receives them — the same bytes the endpoint serves.

Finding and calling a tool

Omniio puts one endpoint in front of every MCP server the user has connected. It does not preload their tools. You see three: search_tools, describe_tool and run_tool. Everything else is behind them.

That is the whole trade. You do not pay context for hundreds of tool definitions, and in exchange you have to look before you call.

The loop

search_tools(query)  →  describe_tool(name)  →  run_tool(name, arguments)

search_tools and describe_tool are read-only and idempotent. They change nothing, they cost nothing to be wrong about, and they are annotated as such so you can call them without stopping to ask permission. Only run_tool acts.

Search first, and search unprompted

The failure that matters is not a bad call. It is answering from memory a question one of these servers could have answered properly — a stale figure, a made-up issue number, a library API that changed two versions ago. That reads as confidence and is wrong.

So: if a request needs current data, a lookup in a product the user has connected, or an action taken in one, call search_tools before concluding anything. You do not need to be asked to.

If search_tools returns nothing relevant, say so plainly and answer normally. Do not guess at a tool name that was not returned.

Read the schema. Do not infer the arguments.

This is the single largest cause of failed run_tool calls, and it is entirely avoidable: describe_tool returns the exact JSON input schema, and the argument names in it are frequently not the ones you would guess.

Real examples from this gateway:

ToolGuessedActually
pixelgust__get_current_weatherlatitude, longitudelat, lon
wolfram__WolframAlphainputquery
context7__resolve-library-idlibraryName aloneboth libraryName and query

Each of those failed on the first attempt, from a caller that had the correct schema in its context and used a plausible name instead of the given one.

The rule is mechanical: after describe_tool returns, build the arguments by reading its properties and required. If you find yourself typing an argument name you have not just read, stop.

Names are qualified

search_tools returns names like github__search_issues — the server, two underscores, the tool. Pass that whole string to describe_tool and run_tool. An unqualified name will not resolve, and there may be several tools with the same short name on different servers.

When a call comes back unhappy

  • "needs approval before it can run" — not an error. See the handling-held-and-refused-calls skill.
  • "denied by your Omniio tool policy" — the account has switched this tool off. Do not retry; tell the user where to change it.
  • A validation error naming a field — you got the arguments wrong. Re-read the schema from describe_tool; do not retry the same arguments.
  • The tool's own error text — the upstream ran and refused. Relay what it said rather than reinterpreting it.

Cost

Every run_tool counts against the account's monthly allowance and its per-minute burst limit. search_tools and describe_tool are metered too but are far cheaper than a wrong call followed by a right one. Searching twice to call once is the correct trade.

More in using this gateway

handling-held-and-refused-calls

Omniio

Respond correctly when an Omniio tool call is held for human approval, denied by policy, or refused for a spent approval. Use when run_tool returns a message ab

What it does →

connecting-a-server

Omniio

Diagnose and explain why a tool the user expected is missing from an Omniio gateway, and tell them exactly how to connect the server that provides it. Use when

What it does →

limits-and-retries

Omniio

Decide whether a failed Omniio call should be retried, and how long to wait. Use when a tool call or REST request returns a rate limit, a quota message, a 4xx o

What it does →