api.tools

Overview

Fifteen tools the platform performs for you. Six are ordinary functions you can call today; all fifteen are declarations you hand to an agent or to a workflow step.

15 tools6 callable1 credit each, media apart
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

This resource exists because the same capability is wanted in two places: directly, from your own code, and indirectly, as something a model may decide to use. Rather than two inventories that drift apart, each tool is one object that serves both — a function with a declaration attached.

The six you can call

CallDoesCosts
api.tools.search(options)Searches through IaGenify’s SearXNG service.1 credit per uncached result page
api.tools.fetch(options)Opens a page and reads it as text.1 credit
api.tools.fetch({ type: "screenshot" })Captures a viewport or full page as an image.1 credit
api.tools.convert(options)Converts a document between 244 pairs of formats.1 credit
api.tools.listDocuments()Lists the account's files.free
api.tools.readDocument(sourceId)Reads one back.free
const found = await api.tools.search({ query: "ISO 8601 week numbering", maxResults: 5 });
const page = await api.tools.fetch({ url: found.results[0].url });

console.log(page.title, page.markdown.slice(0, 400));
found = api.tools.search({"query": "ISO 8601 week numbering", "maxResults": 5})
page = api.tools.fetch({"url": found["results"][0]["url"]})

print(page["title"], page["markdown"][:400])

The nine that are declarations only

These nine have nothing to call: what they do happens inside a run — on the caller's computer, against the run's storages, or through a model session the run was given. Calling one directly returns nothing, on purpose.

DeclarationPerformedWhere it runs
writeDocument · createFolder · moveDocument · deleteDocumentin a runthe caller's computer
queryStoragein a runthe run's connected storages
image · video · voice · musicin a runa named model session

Declaring them

tools is an object. The key is the name the model sees; the value is the tool.

const agent = api.agents.create({
  model: { main: session, image: picture },      // a session per media role
  storages: [database],
  tools: {
    search: api.tools.search,
    fetch: api.tools.fetch,
    query_storage: api.tools.queryStorage,
    image: api.tools.image,
  },
  maxSteps: 8,
  budget: 200,
});

const result = await agent.run({ inputs: [{ type: "text", content: "Chart last month's signups." }] });
agent = api.agents.create(
    model={"main": session, "image": picture},    # a session per media role
    storages=[database],
    tools={
        "search": api.tools.search,
        "fetch": api.tools.fetch,
        "query_storage": api.tools.query_storage,
        "image": api.tools.image,
    },
    max_steps=8,
    budget=200,
)

result = agent.run(inputs=[{"type": "text", "content": "Chart last month's signups."}])

Three things you can change per tool

tools: {
  // Rename it: the model is told "recherche", the platform still runs search
  recherche: api.tools.search,

  // Describe it in your own words, fix its options, set its declared cost
  web: {
    run: api.tools.search,
    description: "Search French-language news from the last week.",
    options: { maxResults: 5, recencyDays: 7, language: "fr" },
    cost: 1,
  },

  // Turn one off without rebuilding the object
  fetch: false,
}
tools = {
    # Rename it: the model is told "recherche", the platform still runs search
    "recherche": api.tools.search,

    # Describe it in your own words, fix its options, raise its declared cost
    "web": {
        "run": api.tools.search,
        "description": "Search French-language news from the last week.",
        "options": {"engines": ["searxng", "google"], "recencyDays": 7, "language": "fr"},
        "cost": 5,
    },

    # Turn one off without rebuilding the dict
    "fetch": False,
}
the keystring

The name declared to the model. Rename freely — the behaviour follows the tool, not the name.

runfunction

The tool. api.tools.search and the rest.

descriptionstring

Replaces the default description. This is what steers the model towards calling it well.

optionsobject

Fixed arguments, merged over whatever the model sent. Your value is the one that applies.

costinteger

What the budget guard counts before the call.

the value falseboolean

Leaves the tool out entirely — fetch: false.

A declared cost must over-estimate, never under-estimate

The guard refuses a call whose declared cost would pass the budget — so it decides on the declared number, not on the real one. A cost set too low lets a run overspend; the defaults are deliberately above what the tool usually costs. For search the platform also raises your number to the real engine price.

Options are fixed, arguments are the model's

Each declaration gives the model named parameters — query, url, path, request, prompt. What arrives is merged with your options, yours winning, so you can pin a language or a resolution without taking the decision away from the model.

Three refusals that happen before a tool is reached

RefusalWhen
Unknown toolThe model named something you did not declare. The refusal lists what is available.
Missing argumentA tool that needs one was called without it.
Already doneThe same tool with the same argument, twice. It is told to read the first result instead.
Over budgetThe declared cost would pass budget. Nothing is called and nothing is charged.

Each comes back as the step's error, so the run continues and the model can change course — a refusal is information, not a crash.

api.tools.all is a different thing

api.tools.all is not a bundle of these fifteen: it is the frozen list of the 35 tool names of the local engine, which is a far larger inventory — reading, editing, shells, todos, questions, memory, services, media. You pass it as names, not as objects.

const agent = api.agents.create({
  runtime: "local",
  machine: pc,
  model: "gemini-3.5-flash",
  tools: api.tools.all,              // the 35 names
});

api.tools.all.length;                // 35
api.tools.all.includes("bash");      // true
agent = api.agents.create(
    runtime="local",
    machine=pc,
    model="gemini-3.5-flash",
    tools=list(api.tools.all),     # every tool the Python engine declares
)

len(api.tools.all)          # 33 — the JavaScript engine also has iagenify_docs and mcp
"bash" in api.tools.all     # True
Two inventories, and the one to reach for

api.tools is what the platform performs for you. The local engine's tools are what your own machine performs, in your process, under your permission callback. For anything agent-shaped, start with the local engine — see Agent tools.

The same declarations in a workflow

An agent.run step declares its tools exactly as above, so a tool set written for an agent can be moved into a workflow without being rewritten.