DocsDevelopers

The jade object

Every function a script app can call, with its signature, what it returns, and the permission it needs.

On this page
How calls workPermissionsInternet: jade.fetchSign-ins to websites: jade.signInSaved data: jade.storageClipboard: jade.clipboardCalendar: jade.calendarReminders: jade.remindersNotes: jade.notesContacts, photos, location, shortcutsAI models: jade.ai and jade.modelsThe web: jade.webNotifications and Live ActivitiesOther tools and appsCards: jade.cards.showLocal servers and interactive cardsThe app’s own settings: jade.settingsEntitlementsErrors

This is the reference for the jade object that a script app gets inside its tool code. Every signature below was checked against the app’s source. The module file format is on the marketplace page.

How calls work

A script app’s tool is the body of an async function of args. Inside it, a global jade object reaches the phone, but only through the permissions the app listed in script.permissions and the person allowed. Nothing runs when an app is added, and every run asks first (unless the person chose otherwise).

Async
Every call returns a promise. Use await.
Two ways to pass arguments
One object, jade.ai.ask({prompt: "Hi", maxTokens: 50}), or positional, jade.ai.ask("Hi", {maxTokens: 50}). The positional order is the one in each signature below, and is also how jade.calendar.events(3) means {days: 3}. Dates are ISO 8601 strings, like 2026-10-05T14:00:00.
Results
JSON values: objects, arrays, strings. A call that gives nothing back resolves to null.
Errors
A refused or failed call throws a JadeError with a code. See Errors. Catch it and say what is missing.
Facts about the app
jade.app is {id, name}. jade.permissions is what the person chose, like {calendar: {decision: "ask", access: "read"}}. jade.entitlements says which entitlements are on, like {anyNetwork: false}. A script can read these to explain what is missing instead of failing.
Run limits
A run makes at most 300 calls to Jade and 20 model requests (5,000 and 200 with the highVolume entitlement). The time limit pauses while a call waits for the person or for a model, so only the script’s own work counts.
// A tool body: read today's events, catch a refusal.
let events;
try {
  events = await jade.calendar.events({ days: 1 });
} catch (e) {
  if (e.code === 'denied') return 'Allow the calendar to see your day.';
  throw e;
}
return events.map((ev) => `${ev.start}: ${ev.title}`).join('\n') || 'Nothing today.';

Permissions

Each permission has an id and an access level: read or change. A call that changes things needs "access": "change" in the manifest. Without the permission listed, the call throws undeclared.

idAccessCalls
networkchange (always)jade.fetch
sessionchange (always)jade.signIn, jade.session.*, jade.fetch with session: true
calendarread, changejade.calendar.*
remindersread, changejade.reminders.*
notesread, changejade.notes.*
clipboardread, changejade.clipboard.*
contacts, photos, location, shortcutsread (shortcuts: change)jade.contacts.* and others
modelsreadjade.ai.*, jade.models.*
webreadjade.web.*
notificationschange (always)jade.notify, jade.notifications.*, jade.activity.*
toolschange (always)jade.tools.*, jade.apps.*
nonejade.storage.*, jade.settings.*, jade.device.info, jade.cards.show, jade.server.fetch

When an app is added, the person picks Ask first, Allowed or Blocked for each permission. Ask first asks once per run, and Allowed never asks. A permission starts Allowed unless the manifest says "default": "ask" (session always starts as Ask first, whatever default says). Blocked throws denied. A permission also stops working when its connector is switched off in Settings (off).

"permissions": [
  { "id": "calendar", "access": "read", "reason": "To see what is on today.",
    "warning": "Without your calendar it has nothing to summarize." },
  { "id": "network", "domains": ["api.example.com"], "reason": "To read the feed." }
]

Internet: jade.fetch

One HTTPS request from the phone. Needs the network permission.

jade.fetch(url, options?)CHANGE

Returns {status, ok, url, headers, contentType, text, json, base64, truncated}

Makes one request and gives back the whole answer. headers has lower-case names. text is set for text, JSON and XML bodies, and json too when it parses. Anything else arrives as base64. url is where the answer came from after redirects. truncated is true when the answer was cut at the size limit. A non-2xx status is an answer (ok: false), not an error.

optionsRules
methodGET (default), HEAD, POST, PUT, PATCH or DELETE.
headersAn object, 20 at most, each value up to 4 KB with no line breaks. Jade sets Host, Content-Length, Cookie, Proxy-*, Sec-* and similar itself, and a request for one throws invalid. User-Agent defaults to Jade/1.0 (app <id>).
bodyText, or anything JSON can hold (sent as JSON, with a JSON content type unless one is set). Up to 256 KB. Not for GET or HEAD.
timeoutSeconds. 20 by default, 60 at most (120 with longRuns). Past it the call throws limit.
maxBytesHow much of the answer is read: 2 MB (2097152) by default. Lower it to read less, or raise it up to 10 MB (10485760) for a file. Past it, the answer is cut off with truncated: true.
as"base64" returns the body as base64 even when it is text. Without it, a body that isn’t text comes back as base64 anyway.
sessiontrue sends and keeps the cookies of a sign-in, only for the sites the session permission lists.
  • Websites. domains on the permission (up to 20) lists the sites the app talks to: example.com also covers its subdomains, *.example.com only the subdomains. Requests to those follow the permission’s choice. Any other website asks first, once per site per run, even when the permission is Allowed. Saying no throws denied. With the anyNetwork entitlement on, no site is asked about.
  • HTTPS only. Plain http:// is refused, except for devices on the person’s own network. A web address with a user name or password in it is refused: send an Authorization header.
  • The person’s own network. localhost, .local names, single-word hostnames, and private, loopback and link-local addresses (10.x, 172.16–31.x, 192.168.x, 169.254.x, 100.64–127.x, fc00::/7, fe80::/10, ::1), and any name that resolves to one, work only with the anyNetwork entitlement on; otherwise the call throws denied. That is how an app talks to a Home Assistant box, a printer or a NAS (http:// is allowed there). iOS also asks once for Local Network access.
  • Redirects are followed (5 at most) only to a site the app may reach without asking. Otherwise the 3xx comes back as the answer, with its location header. An Authorization header is dropped when a redirect changes host.
  • Limits. 100 requests a run (1,000 with highVolume), counted in the run’s call limit too. No cookies are sent or kept (unless session: true), nothing is cached, and there are no sockets, WebSockets or streams. A network failure throws failed.
const r = await jade.fetch('https://api.example.com/releases/latest',
  { headers: { Accept: 'application/json' }, timeout: 10 });
if (!r.ok) return `The server said ${r.status}`;
return r.json.tag_name;

// POST an object as JSON:
await jade.fetch('https://api.example.com/items', { method: 'POST', body: { name: 'Tea' } });

With calendar, contacts, notes or clipboard access too, jade.fetch can send what the app reads to the sites it lists. The permission’s text says so, and the preview shows the list.

Sign-ins to websites: jade.signIn

For a site that needs a login a key can’t do, like a school portal. Needs the session permission, with the sites it signs in to in domains (at least one; the same rules as network, and a name that covers a whole public suffix, like co.uk or *.com.au, is refused). The person signs in themselves, in a window that shows the site’s own page. The permission always starts as Ask first, whatever default says.

jade.signIn({url, doneWhenUrlMatches})CHANGE

Returns {signedIn, sites, cancelled}

Opens the sign-in window. url must be https and on a listed site; the window only opens listed sites, so list every host the login passes through. It closes as signed in when the person taps Done, or when the address matches doneWhenUrlMatches (a regular expression, 200 characters at most) after a page loads. The person is asked every time, even when the permission is Allowed; 3 windows a run at most. The password goes only to the site: the app never sees it, a cookie, or a Set-Cookie header.

jade.fetch(url, {session: true, …})CHANGE

Returns the same as jade.fetch

Sends the saved cookies, only to the listed sites over https (also on each redirect hop), and keeps what the site sets. Set-Cookie is removed from the headers the script gets, and a Cookie header set by the script is still refused. A URL outside domains, or http://, throws invalid. With Ask first the person is asked once per run.

jade.session.status()CHANGE

Returns {signedIn, sites}

Whether the person is signed in, and the host names only.

jade.session.clear()CHANGE

Returns {signedIn: false}

Signs out.

The cookies are in the Keychain of the person’s device, one jar for each app, never synced, never in a Jade Cloud task, and go away after 30 days without an end date. The person can sign out on the app’s page (Permissions → Signed in); removing the app forgets the sign-in.

"permissions": [
  { "id": "session", "access": "change", "domains": ["*.myschoolapp.com", "app.blackbaud.com", "id.blackbaud.com"],
    "reason": "To read your grades after you sign in", "warning": "Without it the app can’t see your account" }
]

Saved data: jade.storage

A small private store for each app, kept on the device and deleted with the app. No permission needed. Values are anything JSON can hold.

jade.storage.get(key)NO PERMISSION

Returns the saved value, or null

Reads one value back, as the same kind of JSON it was saved as.

jade.storage.set(key, value)NO PERMISSION

Returns null

Saves a value. A key is up to 100 characters. Throws limit when the value or the whole store is too big.

jade.storage.remove(key)NO PERMISSION

Returns null

Deletes one value. Removing a key that isn’t there is fine.

jade.storage.keys()NO PERMISSION

Returns a sorted array of keys

Lists what is saved.

LimitUsualWith moreStorage
Values2002,000
Size of one value64 KB1 MB
Everything saved512 KB8 MB
const seen = (await jade.storage.get('seen')) ?? [];
if (!seen.includes(item.id)) { seen.push(item.id); await jade.storage.set('seen', seen); }
jade.device.info()NO PERMISSION

Returns {platform, osVersion, locale, timeZone, now, uses24Hour}

Facts about the device: platform is ios or macos, now is an ISO 8601 time, timeZone and locale are identifiers like Europe/Lisbon and en_US.

Clipboard: jade.clipboard

jade.clipboard.read()READ

Returns {text}

The text on the clipboard (text is null when there is none). iOS may show its own paste notice.

jade.clipboard.write(text)CHANGE

Returns null

Puts text on the clipboard. Needs "access": "change".

Calendar: jade.calendar

Dates in and out are ISO 8601. Positional order is shown in each signature.

jade.calendar.calendars()READ

Returns [{id, title, writable, default}]

The calendars on the device. Subscribed and birthday calendars aren’t writable.

jade.calendar.events({days, from, to, text, calendar, limit})READ

Returns [{id, title, start, end, location, notes, calendar}]

Events from now for days (default 7, 1 to 366), or between from and to. text searches titles and notes. calendar is a calendar’s title. limit defaults to 50 (1 to 200). notes is cut at 500 characters. Positional: events(days, text).

jade.calendar.add({title, start, end, location, notes, calendar})CHANGE

Returns {id}

title and start are required. end defaults to an hour after start. calendar is a title or id from calendars(), and the default calendar when left out. Positional order: title, start, end, location, notes, calendar.

jade.calendar.update({id, title, start, end, location, notes, calendar})CHANGE

Returns {updated: true}

Changes only what is given. calendar moves the event. A calendar that can’t be changed throws failed. Positional: id first, then the same order as add.

jade.calendar.delete({id})CHANGE

Returns {deleted: true}

Deletes an event.

Reminders: jade.reminders

jade.reminders.lists()READ

Returns [{id, title, writable, default}]

The reminder lists.

jade.reminders.list({text, list, done, dueBefore, dueAfter, limit})READ

Returns [{id, title, done, due, list, notes}]

text searches titles. list is a list’s title. done keeps finished (true) or open (false) ones. dueBefore and dueAfter are dates. Every filter is optional. limit defaults to 25 (1 to 100). Positional: list(text, limit).

jade.reminders.add({title, due, notes, list})CHANGE

Returns {id}

title is required. due is optional. Positional order: title, due, notes, list.

jade.reminders.update({id, title, due, notes, done, list})CHANGE

Returns {updated: true}

Changes only what is given. due: null removes the due date. done: false reopens a finished reminder. Positional: id, title, due, notes, done, list.

jade.reminders.complete({id})CHANGE

Returns {result}

Marks a reminder done. result is a short sentence saying what happened.

jade.reminders.delete({id})CHANGE

Returns {deleted: true}

Deletes a reminder.

Notes: jade.notes

Apple gives apps no direct way into Notes, so both calls go through the person’s own Shortcuts, and each one briefly switches to the Shortcuts app. There is no update or delete.

jade.notes.search({query})READ

Returns {text}

The text of the matching notes, titles included.

jade.notes.create({title, body})CHANGE

Returns {result}

Makes a new note. title is required. Positional: create(title, body).

Contacts, photos, location, shortcuts

jade.contacts.search({query, limit})READ

Returns [{id, name, organization, phones, emails}]

query is required. limit defaults to 10 (1 to 50).

jade.photos.recent({limit, days, favoritesOnly})READ

Returns {description}

A description of recent photos: metadata only, never the pictures.

jade.location.current()READ

Returns {description}

Where the device is now, as text. jade.location.approximate() gives a rough area instead.

jade.shortcuts.run({name, input})CHANGE

Returns {output}

Runs a shortcut that the person listed in Settings. Needs "access": "change" (it always counts as change).

AI models: jade.ai and jade.models

Needs the models permission. model is an id from models.list() or a model’s name. Leave it out, or pass "default", for the person’s own default model. Every model of a switched-on provider is open, including ones hidden from the picker, except Jade AI’s Ultra level.

jade.models.list({provider, capability, local, search})READ

Returns [{id, name, provider, default, local, capabilities, contextWindow}]

Every filter is optional.

jade.models.default()READ

Returns {id, name, provider, local, capabilities, contextWindow} or null

The person’s default model.

jade.ai.ask(prompt, options?)READ

Returns {text, model, usage: {inputTokens, outputTokens}}

One question, one answer. options: model, system, maxTokens, temperature.

jade.ai.chat(messages, options?)READ

Returns the same

messages is [{role, content}] with role user, assistant or system.

jade.models.generate({model, prompt, messages, system, maxTokens, temperature})READ

Returns the same

Both of the above in one call with one object: a prompt, or messages.

  • maxTokens goes up to 4,096, or 16,000 with the anyModel entitlement.
  • One request carries up to 60,000 characters of text. A run makes 20 model requests (200 with highVolume); more throws limit.
  • The tokens count against whatever the person’s model costs, including a Jade plan’s allowance.

The web: jade.web

jade.web.search({query, count})READ

Returns {text, results: [{title, url, snippet}]}

A web search through the provider the person chose. count is up to 10. With the webSearch entitlement it goes to 20 and takes engine (duckDuckGo or bing, for the on-device provider), allowDomains and blockDomains (up to 50 host names each). Without it, those keys throw undeclared. An app’s own searches skip its own search hook. Positional: search(query, count).

jade.web.fetch({url})READ

Returns {text}

Reads a page as text. url must be http or https. For an API, use jade.fetch instead.

Notifications and Live Activities

Needs the notifications permission. iOS asks the person once. Nothing here bypasses Do Not Disturb or Focus. A notification that can’t be sent (iOS settings, a limit) throws off or limit.

jade.notify({title, body, silent})CHANGE

Returns {sent: true}

Sends a notification now. Title up to 80 characters and body up to 300. At most 3 a run and 20 a day for the app. Positional: notify(title, body, options).

jade.notifications.schedule({id, title, body, at, inSeconds, repeats, silent})CHANGE

Returns {id, at}

Sets one for later, as a system local notification, so it goes off while Jade is closed. Give at (ISO 8601) or inSeconds: at least 5 seconds and at most a year ahead. repeats is daily or weekly. The same id replaces the earlier one. An app can have 20 waiting and schedule 10 a run. Blocking the permission, or removing the app, cancels what was scheduled.

jade.notifications.pending()CHANGE

Returns [{id, title, body, at, repeats, silent}]

What is waiting to go off.

jade.notifications.cancel({id})CHANGE

Returns {cancelled: true}

Cancels one. With no id, it cancels all of the app’s.

jade.activity.start({title, status, progress, steps})CHANGE

Returns null

Starts one Live Activity on the Lock Screen and in the Dynamic Island. progress is 0 to 1. One start a run, two apps at once, iPhone only, and off when Tasks → On the Lock Screen is off.

jade.activity.update({status, progress, steps, phase})CHANGE

Returns null

phase is working, needsYou, done or failed.

jade.activity.end({status, phase})CHANGE

Returns null

Ends it. phase defaults to done.

Other tools and apps

Needs the tools permission. A call goes through the same switches and questions the assistant’s own call would: a tool that is turned off stays off, and one that needs the person’s OK asks. Another app’s own permissions still apply to it, never the caller’s. Tools that change Jade’s settings, memory or servers, skill_save and card_save, and the app’s own tools aren’t available. Calls nest 3 deep at most.

jade.tools.list()CHANGE

Returns [{name, description, parameters}]

What the assistant could use.

jade.tools.call(name, arguments)CHANGE

Returns {text, cardsShown}

Runs one. Cards the tool shows come out under the caller’s step.

jade.apps.list()CHANGE

Returns [{id, name, tools}]

The other script apps installed.

jade.apps.call(app, tool, arguments)CHANGE

Returns {text, cardsShown}

Runs another app’s tool.

jade.apps.fetch(app, path, options?)CHANGE

Returns {status, ok, contentType, text, json}

A request to another app’s local server. See Local servers.

Cards: jade.cards.show

jade.cards.show(card, data)NO PERMISSION

Returns null

Shows a card in the chat, under the tool’s step: one of Jade’s built-in cards or one of the app’s own templates. Up to 5 cards a run, 60 KB each. No permission, since the person sees the card and it reads nothing. An unknown name throws invalid and lists the ones that exist.

  • Built in: chart, weather, events, map, link, document, json, svg, html, grades, progress, contact, flight, shipment, ticker, convert, rating, definition, steps, proscons, budget, habits, workout, nutrition, daysuntil, changes, translation, itinerary, callout, gauge, leaderboard, scoreboard, playlist, receipt, readinglist, quote. For svg and html, data is a string.
  • The app’s own: script.cards ships up to 8 HTML templates with {{field}}, {{#list}}…{{/list}} and {{^field}}…{{/field}} (each up to 50,000 characters), and jade.cards.show('name', {fields}) fills one in. They run in a web view with no network.
jade.cards.show('chart', { type: 'bar', title: 'Steps', labels: ['Mon', 'Tue'], values: [3, 5] });
jade.cards.show('daily', { title: 'Daily brief', items: [{ text: 'Water the plants' }] });

Local servers and interactive cards

A script app can run a small web server on the device. It isn’t a network server: iOS stops listening sockets when an app goes to the background, and any other app or web page on the phone could reach one. It is a server inside Jade, with routes that each run one of the app’s own tools. No sockets are opened, so there is no port and nothing outside Jade can connect.

Requests reach it from three places:

An interactive card
A card with "interactive": true loads under its app’s own address (jade-app://<app>/). Its code uses plain fetch("/items") and reaches the app’s routes and nothing else: no other website, no other app. The card lives on in the chat, so a button tapped later still works. A tap counts as the person’s go-ahead for the route’s tool, so there is no “Run” question each time. Permissions inside the tool still follow Ask first, Allowed and Blocked.
The app’s own code
jade.server.fetch(path, options?). No permission needed.
Other apps
jade.apps.fetch(app, path, options?), with the tools permission.
jade.server.fetch(path, {method, body})NO PERMISSION

Returns {status, ok, contentType, text, json}

A request to the app’s own server. method defaults to GET, or POST when there is a body. An object body is sent as JSON, text as plain text. A missing route is an answer with ok: false, not an error. json is set when the answer is JSON.

Declaring routes

"script": {
  "tools": [ /* items, add, item … */ ],
  "server": { "routes": [
    { "method": "GET",  "path": "/items",     "tool": "items" },
    { "method": "POST", "path": "/items",     "tool": "add" },
    { "method": "GET",  "path": "/items/:id", "tool": "item" }
  ] },
  "cards": [
    { "name": "list", "interactive": true,
      "template": "<ul id='l'></ul><script>fetch('/items').then(r => r.json()).then(items => { /* draw */ })</script>",
      "sample": {} }
  ]
}
  • Routes (script.server.routes): 1 to 24. method is GET, POST, PUT, PATCH or DELETE (any method when left out). path starts with / and is up to 200 characters, and a segment with a colon (/items/:id) is a parameter. tool must be the name of one of the app’s tools.
  • What the tool receives. The query string, a JSON or form-encoded body (plain text arrives as body) and the path parameters (which win) are merged into args, with strings turned into numbers, booleans, arrays or objects as the tool’s parameters say.
  • What comes back. Whatever the tool returns: application/json when it reads as JSON, otherwise text.
  • Servers call servers. A route’s tool can call routes too, its own included, as deep as tools and apps may call each other (3 levels; deeper answers 508).
  • Limits. A request up to 256 KB, an answer up to 1 MB, 120 requests a minute per app. A page’s own requests start at the top level.
StatusMeaning (the body is {"error", "code"})
400invalid: the tool refused the arguments.
403denied or undeclared: a permission the tool needs was denied or isn’t listed.
404No such route (the message lists the ones the app serves), or the app runs no server.
405The path exists, but not for that method.
413, 429, 502, 508A limit: request size, requests a minute, answer size, nesting depth.
500, 503The tool failed, or a connector or tool it needs is switched off.

To talk to a device on the same network instead, such as a Home Assistant box, a printer or a NAS, use jade.fetch with the anyNetwork entitlement.

The app’s own settings: jade.settings

An app can bring a settings page of its own with script.settings in the manifest. The values it holds are read and written with jade.settings. It needs no permission, because the values are the app’s own. The person sees the page as a Settings row on the app and under Settings → Apps & tools → App settings, and the assistant doesn’t change these values for them. Removing the app removes its values.

jade.settings.get(key)NO PERMISSION

Returns the value

The person’s choice, or the item’s default when they haven’t chosen, so it always answers. A key the app didn’t declare throws invalid.

jade.settings.all()NO PERMISSION

Returns an object of every value

Every setting by id.

jade.settings.set(key, value)NO PERMISSION

Returns null

Changes one. A value of the wrong kind, such as a choice that isn’t one of its options, throws invalid. A number is clamped to its range and snapped to its step.

jade.settings.reset(key?)NO PERMISSION

Returns null

Back to the default, for one key or, with none, for all.

"settings": {
  "title": "Focus settings",
  "sections": [
    { "title": "Rounds", "footer": "Shown under the rows.",
      "items": [
        { "type": "number", "id": "focusMinutes", "title": "Focus", "default": 25, "min": 5, "max": 90, "step": 5 },
        { "type": "toggle", "id": "longBreaks", "title": "Longer break every fourth round", "default": true },
        { "type": "choice", "id": "mode", "title": "Mode", "default": "steady",
          "options": [ { "value": "steady", "title": "Steady" }, { "value": "deep", "title": "Deep work" } ] },
        { "type": "text", "id": "label", "title": "Working on", "placeholder": "What is this for?", "maxLength": 80 } ] },
    { "title": "Preview",
      "items": [ { "type": "html", "height": 160, "css": ".big { color: var(--jade-accent) }",
                   "html": "<div class='big' id='n'></div><script>jade.settings.get('focusMinutes').then(v => n.textContent = v)</script>" } ] }
  ]
}
  • Item types: toggle, choice (2 to 20 options of {value, title}), text (multiline, maxLength up to 2,000), number (min, max, step, slider) and html. Every item has title (60 characters), subtitle (200) and icon (an SF Symbol). Every type but html has an id of letters, digits and _, up to 40, unique in the app.
  • Size: 1 to 8 sections and 40 items in all. A page title is up to 60 characters.
  • HTML blocks (html up to 20,000 characters, css up to 10,000, height 40 to 800, growing with the content) run in a web view with no network and no other website. They get jade.settings.get, all, set and reset as promises, and jade.settings.onChange((key, value) => …), which also runs when the person changes a row above or below. {{id}} in the HTML is replaced with that setting’s value when the block loads (text is escaped). With script.server, fetch reaches the app’s own routes.
  • Colors follow light and dark mode: --jade-accent, --jade-accent-soft, --jade-text, --jade-secondary, --jade-tertiary, --jade-surface, --jade-background, --jade-hairline and --jade-radius.
  • Any change to the page sends the app back to review.

Entitlements

Permissions say what an app may reach. Entitlements say how far it may go past the usual limits. An app lists up to 7 in script.entitlements as {id, reason?}. Each one starts on and the person can switch it off (or on, if the entry says "default": "off"). They never override a Blocked permission, a connector’s switch or a disabled tool. jade.entitlements says which are on.

idWhat it lifts
highVolume5,000 calls and 200 model requests a run, instead of 300 and 20. 1,000 jade.fetch requests instead of 100.
longRunsA run may take up to 10 minutes. jade.fetch timeouts go up to 120 seconds.
anyNetworkjade.fetch may reach any website without asking, and devices on the person’s own network.
moreStoragejade.storage holds 8 MB in 2,000 values (1 MB each).
runsQuietlyThe app’s tools run without the usual OK before each run.
webSearchjade.web.search takes engine, allowDomains, blockDomains and up to 20 results. With a search hook (script.webSearch), the app can change or answer every web search Jade makes on the device.
anyModel“Longer answers”: maxTokens up to 16,000 instead of 4,096.

A search hook is a tool of the app that Jade calls before every web search with {query, count}. It answers with nothing (search as usual), a changed query, count, engine, allowDomains or blockDomains, or results to use instead. It gets 15 seconds. Hooks run in order of app id.

Errors

A failed call throws a JadeError (e.name), with e.code and a message written for a person.

codeMeaning
deniedThe person said no, or the permission is Blocked, or an unlisted website was declined.
undeclaredThe call isn’t covered by the manifest: the permission isn’t listed, or only read was listed and the call changes something.
offThe connector’s switch (Settings → Apps & tools → Apps) is off, or iOS doesn’t allow it.
invalidA missing or wrong argument. The message names it.
limitA limit was reached: calls, requests, model requests, size, time, notifications.
failedThe call was allowed but didn’t work: a network failure, a calendar that can’t be changed, a model that didn’t answer.

The module file’s own format (fields, sizes, review) is on the marketplace page, and a walk-through is in Modules and script apps.