Contents
AI Tools API
List and run the Nucleo tools of one module for an AI client acting on behalf of a user.
Every Nucleo module (Brain, Catalog, Commerce, Intelligence) exposes the same two endpoints:
GET /api/v1/ai-tools returns the tools the signed-in person may use in a company, and
POST /api/v1/ai-tools/{name} runs one of them and returns an MCP CallToolResult.
This is the contract the Nucleo MCP connector (https://mcp.nucleoplatform.com) uses behind the
scenes. Most integrations should simply connect an MCP client to the connector (see the MCP
connector API). Call these endpoints directly only if you build your own agent runtime and need
tool definitions and results without MCP.
Authentication: an OAuth access token from Nucleo issued to a self-registered client (it carries
the scope nucleo.ai_tools). These endpoints accept only such tokens, and such tokens are accepted
only here (plus userinfo and the company context). Every call runs inside one company
(X-Nucleo-Company) with the person's own permissions. Delete tools are not exposed; the few writes
that cannot be undone (merges, forgetting a memory) carry destructiveHint: true.
Authentication
nucleoOAuthOAuth 2.0 · authorizationCodeRegister your client with
POST https://auth.nucleoplatform.com/oauth/register(RFC 7591), then run the authorization code flow with PKCE. Tokens of self-registered clients always includenucleo.ai_tools. Tokens of Nucleo's own apps are refused here.authorize: https://auth.nucleoplatform.com/oauth/authorizetoken: https://auth.nucleoplatform.com/oauth/tokenscopes: openid, profile, email, offline_access, nucleo.ai_tools
- Base URL
- https://{host}The module's API host. Tools of each module live on its own host.
- Who calls it
- AI assistants, Partners
- Endpoints
- 4
- OpenAPI 3.1 specification
- ai-tools.yaml
{host} — api-brain = Brain (CRM, inbox, knowledge, documents, CMS), api-catalog = Catalog (PIM, DAM),
api-commerce = Commerce (customer care, POS, orders), api-intelligence = Intelligence (sales
analytics). The same list, per company, is returned by GET /api/mcp/context (api_base_url).
(examples use api-catalog.nucleoplatform.com; full URL https://api-catalog.nucleoplatform.com)Context
Served by Nucleo Core (auth.nucleoplatform.com): which companies the person can work in, which
modules each company exposes to AI clients and their API hosts, and the active company.
/api/mcp/contextGet companies, modules and active company
The companies of the signed-in person in canonical order, with the modules each one can reach
through AI clients (connector_enabled) and the base URL of each module's API, plus the
active company used by the MCP connector.
active_company_source tells how it was chosen: claim (the org_id hint you passed),
only (the person has one company), preference (saved with PUT /api/mcp/company or the
connector tool nucleo_switch_company), default (first company).
A module with connector_enabled: false has been switched off for AI clients by that company
(or has no tools API): do not call it.
Query parameters
org_idintegerPreferred company id; used as active company only if the person belongs to it.
Example:7
Responses
200Context.application/json
userobjectChild attributes
idintegernamestringemailstring (email)languagestringOne ofenitis_internalboolean
companiesarray of objectAttributes of each item
idintegerslugstringnamestringis_internalbooleanis_demobooleandisabled_sectionsarray of stringmodulesarray of objectAttributes of each item
slugstringOne ofbraincatalogcommerceintelligencenamestringrolestringapi_base_urlstring (uri) | nullconnector_enabledboolean
active_company_idinteger | nullactive_company_sourcestring | nullOne ofclaimonlypreferencedefaultnull
401Missing, expired or revoked token — or a token that is not from a self-registered client. Body:
{"message":"Unauthenticated."}; Intelligence answers withapplication/problem+json. application/jsonmessagestring
curl -X GET 'https://auth.nucleoplatform.com/api/mcp/context?org_id=7' \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Accept: application/json'const res = await fetch("https://auth.nucleoplatform.com/api/mcp/context?org_id=7", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
Accept: "application/json",
},
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://auth.nucleoplatform.com/api/mcp/context?org_id=7', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
'Accept' => 'application/json',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"user": {
"id": 42,
"name": "Giulia Rossi",
"email": "giulia.rossi@acme.example",
"language": "it",
"is_internal": false
},
"companies": [
{
"id": 7,
"slug": "acme",
"name": "Acme Apparel",
"is_internal": false,
"is_demo": false,
"disabled_sections": [
"pos"
],
"modules": [
{
"slug": "catalog",
"name": "Catalog",
"role": "editor",
"api_base_url": "https://api-catalog.nucleoplatform.com",
"connector_enabled": true
},
{
"slug": "commerce",
"name": "Commerce",
"role": "viewer",
"api_base_url": "https://api-commerce.nucleoplatform.com",
"connector_enabled": true
},
{
"slug": "intelligence",
"name": "Intelligence",
"role": "viewer",
"api_base_url": "https://api-intelligence.nucleoplatform.com",
"connector_enabled": false
}
]
}
],
"active_company_id": 7,
"active_company_source": "only"
}{
"message": "Unauthenticated."
}/api/mcp/companySet the active company
Saves the active company of the person for AI clients (one value per person, shared by every AI client they connect, including the MCP connector) and returns the updated context.
Request bodyapplication/json
organization_idintegerrequiredCompany id from
companies[].id.
Responses
200Updated context (same shape as
GET /api/mcp/context).application/jsonuserobjectChild attributes
idintegernamestringemailstring (email)languagestringOne ofenitis_internalboolean
companiesarray of objectAttributes of each item
idintegerslugstringnamestringis_internalbooleanis_demobooleandisabled_sectionsarray of stringmodulesarray of objectAttributes of each item
slugstringOne ofbraincatalogcommerceintelligencenamestringrolestringapi_base_urlstring (uri) | nullconnector_enabledboolean
active_company_idinteger | nullactive_company_sourcestring | nullOne ofclaimonlypreferencedefaultnull
401Missing, expired or revoked token — or a token that is not from a self-registered client. Body:
{"message":"Unauthenticated."}; Intelligence answers withapplication/problem+json. application/jsonmessagestring
403The person has no access to that company.application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
422Validation failed.application/json
messagestringerrorsobject
curl -X PUT https://auth.nucleoplatform.com/api/mcp/company \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d '{
"organization_id": 7
}'const res = await fetch("https://auth.nucleoplatform.com/api/mcp/company", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"organization_id": 7
}),
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('PUT', 'https://auth.nucleoplatform.com/api/mcp/company', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
],
'json' => [
'organization_id' => 7,
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"user": {
"id": 1,
"name": "string",
"email": "jane@example.com",
"language": "en",
"is_internal": true
},
"companies": [
{
"id": 1,
"slug": "string",
"name": "string",
"is_internal": true,
"is_demo": true,
"disabled_sections": [
"string"
],
"modules": [
{
"slug": "brain",
"name": "string",
"role": "string",
"api_base_url": "https://shop.acme.example",
"connector_enabled": true
}
]
}
],
"active_company_id": 1,
"active_company_source": "claim"
}{
"message": "Unauthenticated."
}{
"error": "company_forbidden",
"message": "You have no access to this company."
}{
"message": "The organization id field is required.",
"errors": {
"organization_id": [
"The organization id field is required."
]
}
}Tools
Served by each module. Tool names have no module prefix here (search_orders); the MCP
connector adds one (commerce_search_orders). The full catalogue per module is in the MCP
connector API (x-nucleo-tools).
/api/v1/ai-toolsList the tools available in a company
The tools the person may use in the company of X-Nucleo-Company, already filtered by their
permissions and roles in that module, sorted by name. Definitions do not change between a list
and a call unless the company or the person's permissions change.
Caching: responses carry ETag and Cache-Control: private, max-age=60; send the ETag back
in If-None-Match to get 304 Not Modified.
Company errors (400 company_required, 403 company_forbidden, 409 company_not_ready)
mean the module is not usable for this person in this company: hide it.
Catalog only: a company can have several catalogs. X-Nucleo-Store (id or slug) picks one;
without it the first ready catalog the person can access is used, and company.store says which.
Module differences. On Brain, company errors are
plain {"message": "..."} bodies (400 no company, 403 no access, 404 Brain not set up for the
company — no 409), and it does not echo X-Nucleo-Request-Id. Intelligence checks the company
before the contract version.
Rate limit: 120 requests per minute per user on Catalog, Commerce and Intelligence (separate bucket from tool calls). Brain applies no specific limit today.
Headers
X-Nucleo-CompanystringrequiredNumeric company id (
companies[].idfrom the context, ororgs[].idfrom userinfo).pattern ^[1-9][0-9]{0,18}$Example:7X-Nucleo-LanguagestringLanguage of human-readable texts in results and errors (
enorit, defaulten). Tool descriptions stay in English.One ofenitdefault enExample:enX-Nucleo-AI-Tools-VersionstringContract version. Missing = 1. Any other value →
406.One of1default 1Example:1X-Nucleo-Request-IdstringYour id for the call (UUID recommended), echoed back and written in Nucleo's logs. Pattern
^[A-Za-z0-9._:-]{1,128}$, otherwise a new UUID is used.max length 128Example:2f9c1e4a-7b3d-4c5e-9f8a-1b2c3d4e5f6aX-Nucleo-StorestringCatalog only — id or slug of the catalog (store) to use within the company.
Example:acme-euIf-None-MatchstringExample:"5f1d3b0c9a4e2b7d8c6f1a0e3b2d4c5a6f7e8d9c"
Responses
200Tool list.application/json
HeadersETagCache-ControlX-Nucleo-Request-IdEcho of the request id (or a generated one). Not sent by Brain.
version1requiredmodulestringrequiredOne ofbraincatalogcommerceintelligencecompanyobjectChild attributes
idinteger | nullslugstring | nullnamestring | nullstoreobjectCatalog only — the catalog in use.
Child attributes
idintegerslugstringnamestring
languagestringinstructionsstringModule-level guidance for the model (English).
toolsarray of ToolDefinitionrequiredAttributes of each item
namestringrequiredpattern ^[a-z][a-z0-9_]{1,47}$titlestringmax length 60descriptionstringrequiredEnglish
max length 1024inputSchemaobjectrequiredJSON Schema of
type object(no$ref,oneOf/anyOf/allOforadditionalProperties).permissionstring | nullModule permission the tool requires (informational).
side_effectsstringrequiredOne ofreadwriteannotationsobjectChild attributes
readOnlyHintbooleandestructiveHintbooleantrue only for a write that cannot be undone (for example a merge of two records, or forgetting a memory). The gateway passes every hint unchanged to the AI client.
idempotentHintbooleanopenWorldHintboolean
tagsarray of string
generated_atstring (date-time)
304Not modified (
If-None-Matchmatched).400
X-Nucleo-Companymissing or not a positive integer.application/jsonerrorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
401Missing, expired or revoked token — or a token that is not from a self-registered client. Body:
{"message":"Unauthenticated."}; Intelligence answers withapplication/problem+json. application/jsonmessagestring
403The person cannot use this module in this company (no access, or no catalog they belong to).application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
404Brain only — Brain is not set up for this company.application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
406Unknown contract version.application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
409The person has access but the module is not set up yet for this company.application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
429More than 120 requests per minute for this user on this endpoint. Default body; Intelligence answers with
application/problem+json. application/jsonHeadersRetry-AfterX-RateLimit-LimitX-RateLimit-Remaining
messagestring
curl -X GET https://api-catalog.nucleoplatform.com/api/v1/ai-tools \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'X-Nucleo-Company: 7' \
-H 'X-Nucleo-Language: en' \
-H 'X-Nucleo-AI-Tools-Version: 1' \
-H 'X-Nucleo-Request-Id: 2f9c1e4a-7b3d-4c5e-9f8a-1b2c3d4e5f6a' \
-H 'X-Nucleo-Store: acme-eu' \
-H 'If-None-Match: "5f1d3b0c9a4e2b7d8c6f1a0e3b2d4c5a6f7e8d9c"' \
-H 'Accept: application/json'const res = await fetch("https://api-catalog.nucleoplatform.com/api/v1/ai-tools", {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
"X-Nucleo-Company": "7",
"X-Nucleo-Language": "en",
"X-Nucleo-AI-Tools-Version": "1",
"X-Nucleo-Request-Id": "2f9c1e4a-7b3d-4c5e-9f8a-1b2c3d4e5f6a",
"X-Nucleo-Store": "acme-eu",
"If-None-Match": "\"5f1d3b0c9a4e2b7d8c6f1a0e3b2d4c5a6f7e8d9c\"",
Accept: "application/json",
},
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('GET', 'https://api-catalog.nucleoplatform.com/api/v1/ai-tools', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
'X-Nucleo-Company' => '7',
'X-Nucleo-Language' => 'en',
'X-Nucleo-AI-Tools-Version' => '1',
'X-Nucleo-Request-Id' => '2f9c1e4a-7b3d-4c5e-9f8a-1b2c3d4e5f6a',
'X-Nucleo-Store' => 'acme-eu',
'If-None-Match' => '"5f1d3b0c9a4e2b7d8c6f1a0e3b2d4c5a6f7e8d9c"',
'Accept' => 'application/json',
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"version": 1,
"module": "commerce",
"company": {
"id": 7,
"slug": "acme",
"name": "Acme Apparel"
},
"language": "en",
"instructions": "Nucleo Commerce: Customer care (internal tickets between Customer Service, Logistics and the other teams; customer requests from the helpdesk, for the Customer Service team only), POS (points of sale, on-hand stock, inbound deliveries, transfers and returns) and Orders (the OMS: orders, customers, returns, shipments, sellable stock, routing, anomalies, fulfillment KPIs). Ticket codes look like TK-0029. Start from search_tickets or list_customer_requests (search_orders for orders), then read the detail. Everything here is read-only: nothing changes data, and reading a ticket does not mark it as read.",
"tools": [
{
"name": "get_order",
"title": "Get order",
"description": "Orders (Nucleo OMS). One order in full: customer, address, items, ship-from location, holds, shipments with tracking, returns and anomalies.",
"inputSchema": {
"type": "object",
"properties": {
"order": {
"type": "string",
"maxLength": 120,
"description": "Order number (e.g. #1042) or id."
}
},
"required": [
"order"
]
},
"permission": "oms.read",
"side_effects": "read",
"annotations": {
"readOnlyHint": true,
"destructiveHint": false,
"idempotentHint": true,
"openWorldHint": false
},
"tags": [
"oms",
"orders"
]
}
],
"generated_at": "2026-10-04T09:15:00+02:00"
}{
"error": "company_required",
"message": "Missing or invalid X-Nucleo-Company header."
}{
"message": "Azienda attiva mancante (header X-Nucleo-Company)."
}{
"message": "Unauthenticated."
}{
"error": "company_forbidden",
"message": "Nucleo Commerce is not available to you in this company."
}{
"message": "Hub is not provisioned for this company."
}{
"error": "unsupported_version",
"message": "Unsupported ai-tools contract version.",
"supported": [
1
]
}{
"error": "company_not_ready",
"message": "Nucleo Intelligence is not set up yet for this company: open it once in the Nucleo app."
}{
"message": "Too Many Attempts."
}/api/v1/ai-tools/{name}Run a tool
Runs one tool with arguments (validated against its inputSchema) and returns an MCP
CallToolResult:
content[0].text— readable result (JSON text, cut at 50,000 characters with a "truncated" note: refine the query);structuredContent— the same result as JSON;isError: true— a domain error the model can act on (record not found, no data source, a write that needs confirmation in the Nucleo app…). HTTP status stays200.
Protocol errors use HTTP statuses: 404 unknown_tool, 403 permission_denied (+ permission),
422 invalid_arguments, and the company errors of the list endpoint.
Writes. Commerce and Intelligence tools are read-only. Brain and Catalog have write tools
(side_effects: write): announce the change to the user before calling them. Catalog applies
only small, reversible writes from AI clients (up to 3 writes / 5 products within 10 minutes per
person and catalog); deletions, whole-object replacements, bulk, storefront-facing changes,
imports and publishing come back as a preview (will_do) with isError: true and
error: confirmation_required_in_app — nothing is changed, the user confirms inside Nucleo.
Idempotency. Send a fresh X-Nucleo-Request-Id per logical call and reuse it on retries;
Brain uses it to deduplicate record writes.
Responses should arrive within 25 seconds; long jobs return an id to poll with a companion tool.
Brain does not validate arguments with 422: invalid arguments come back as a domain error
(isError: true).
Rate limit: 120 calls per minute per user on Catalog, Commerce and Intelligence; Brain applies no specific limit today.
Path parameters
namestringrequiredTool name from the list, without module prefix.
max length 48pattern ^[a-z0-9_]+$Example:search_orders
Headers
X-Nucleo-CompanystringrequiredNumeric company id (
companies[].idfrom the context, ororgs[].idfrom userinfo).pattern ^[1-9][0-9]{0,18}$Example:7X-Nucleo-LanguagestringLanguage of human-readable texts in results and errors (
enorit, defaulten). Tool descriptions stay in English.One ofenitdefault enExample:enX-Nucleo-AI-Tools-VersionstringContract version. Missing = 1. Any other value →
406.One of1default 1Example:1X-Nucleo-Request-IdstringYour id for the call (UUID recommended), echoed back and written in Nucleo's logs. Pattern
^[A-Za-z0-9._:-]{1,128}$, otherwise a new UUID is used.max length 128Example:2f9c1e4a-7b3d-4c5e-9f8a-1b2c3d4e5f6aX-Nucleo-StorestringCatalog only — id or slug of the catalog (store) to use within the company.
Example:acme-euX-Nucleo-ClientstringInformational
name/versionof your client, used in Nucleo's logs and saved conversations.Example:acme-agent/1.4
Request bodyapplication/json
argumentsobjectTool arguments (if omitted, the root keys except
contextare used as arguments).contextobjectOptional, informational.
Child attributes
clientobjectChild attributes
namestringversionstring
session_idstring
Responses
200Tool result (success or domain error).application/json
HeadersX-Nucleo-Request-Id
contentarray of objectrequiredAttributes of each item
typestringrequiredOne oftextresource_linkimagetextstringmax length 50000
structuredContentobjectisErrorbooleanrequired
400
X-Nucleo-Companymissing or not a positive integer.application/jsonerrorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
401Missing, expired or revoked token — or a token that is not from a self-registered client. Body:
{"message":"Unauthenticated."}; Intelligence answers withapplication/problem+json. application/jsonmessagestring
403Permission denied for this tool, or no access to the module in this company.application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
404Unknown tool, or not visible to this person.application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
406Unknown contract version.application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
409The person has access but the module is not set up yet for this company.application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
422Arguments do not match the tool's input schema.application/json
errorstringOne ofcompany_requiredcompany_forbiddencompany_not_readyunsupported_versionunknown_toolpermission_deniedinvalid_argumentsmessagestringrequiredIn the language of
X-Nucleo-Languagewhere translated.permissionstringpermission_deniedonly.supportedarray of integerunsupported_versiononly.errorsobjectinvalid_argumentson Brain, Commerce and Intelligence (standard validation shape).detailsarray of objectinvalid_argumentson Catalog.Attributes of each item
fieldstringerrorstring
429More than 120 requests per minute for this user on this endpoint. Default body; Intelligence answers with
application/problem+json. application/jsonHeadersRetry-AfterX-RateLimit-LimitX-RateLimit-Remaining
messagestring
curl -X POST https://api-catalog.nucleoplatform.com/api/v1/ai-tools/search_orders \
-H "Authorization: Bearer $NUCLEO_ACCESS_TOKEN" \
-H 'X-Nucleo-Company: 7' \
-H 'X-Nucleo-Language: en' \
-H 'X-Nucleo-AI-Tools-Version: 1' \
-H 'X-Nucleo-Request-Id: 2f9c1e4a-7b3d-4c5e-9f8a-1b2c3d4e5f6a' \
-H 'X-Nucleo-Store: acme-eu' \
-H 'X-Nucleo-Client: acme-agent/1.4' \
-H 'Content-Type: application/json' \
-d '{
"arguments": {
"query": "giulia.rossi@acme.example",
"status": "shipped",
"per_page": 5
},
"context": {
"client": {
"name": "acme-agent",
"version": "1.4"
}
}
}'const res = await fetch("https://api-catalog.nucleoplatform.com/api/v1/ai-tools/search_orders", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.NUCLEO_ACCESS_TOKEN}`,
"X-Nucleo-Company": "7",
"X-Nucleo-Language": "en",
"X-Nucleo-AI-Tools-Version": "1",
"X-Nucleo-Request-Id": "2f9c1e4a-7b3d-4c5e-9f8a-1b2c3d4e5f6a",
"X-Nucleo-Store": "acme-eu",
"X-Nucleo-Client": "acme-agent/1.4",
"Content-Type": "application/json",
},
body: JSON.stringify({
"arguments": {
"query": "giulia.rossi@acme.example",
"status": "shipped",
"per_page": 5
},
"context": {
"client": {
"name": "acme-agent",
"version": "1.4"
}
}
}),
});
const data = await res.json();
console.log(res.status, data);<?php
require 'vendor/autoload.php';
$client = new GuzzleHttp\Client();
$response = $client->request('POST', 'https://api-catalog.nucleoplatform.com/api/v1/ai-tools/search_orders', [
'headers' => [
'Authorization' => 'Bearer ' . getenv('NUCLEO_ACCESS_TOKEN'),
'X-Nucleo-Company' => '7',
'X-Nucleo-Language' => 'en',
'X-Nucleo-AI-Tools-Version' => '1',
'X-Nucleo-Request-Id' => '2f9c1e4a-7b3d-4c5e-9f8a-1b2c3d4e5f6a',
'X-Nucleo-Store' => 'acme-eu',
'X-Nucleo-Client' => 'acme-agent/1.4',
],
'json' => [
'arguments' => [
'query' => 'giulia.rossi@acme.example',
'status' => 'shipped',
'per_page' => 5,
],
'context' => [
'client' => [
'name' => 'acme-agent',
'version' => '1.4',
],
],
],
'http_errors' => false,
]);
echo $response->getStatusCode(), PHP_EOL;
echo $response->getBody();{
"content": [
{
"type": "text",
"text": "{\n \"total\": 1,\n \"orders\": [ { \"number\": \"#1042\", \"status\": \"shipped\" } ]\n}"
}
],
"structuredContent": {
"total": 1,
"orders": [
{
"number": "#1042",
"status": "shipped",
"customer": "Giulia Rossi",
"total": "89.00 EUR",
"url": "https://app.nucleoplatform.com/commerce/orders/1042"
}
]
},
"isError": false
}{
"content": [
{
"type": "text",
"text": "{\n \"error\": \"not_found\",\n \"message\": \"Order #1099 not found.\"\n}"
}
],
"structuredContent": {
"error": "not_found",
"message": "Order #1099 not found."
},
"isError": true
}{
"content": [
{
"type": "text",
"text": "{ \"error\": \"confirmation_required_in_app\", \"applied\": false, ... }"
}
],
"structuredContent": {
"error": "confirmation_required_in_app",
"applied": false,
"message": "Nothing was changed. This change needs an explicit confirmation that only happens inside Nucleo Catalog (deletions, whole-object replacements, bulk or storefront-facing changes, imports, publishing, or more than 3 writes / 5 products within 10 minutes). `will_do` is the preview: show it to the user and ask them to run it with Atomo in Nucleo Catalog, or split it into smaller changes.",
"will_do": {
"summary": "Set price 29.90 EUR on 40 products in price list Retail EU"
}
},
"isError": true
}{
"error": "company_required",
"message": "Missing or invalid X-Nucleo-Company header."
}{
"message": "Azienda attiva mancante (header X-Nucleo-Company)."
}{
"message": "Unauthenticated."
}{
"error": "permission_denied",
"permission": "dashboard.private",
"message": "This dashboard is private: only its owner and Intelligence admins can open it."
}{
"error": "company_forbidden",
"message": "Nucleo Commerce is not available to you in this company."
}{
"error": "unknown_tool",
"message": "Unknown tool: search_invoices"
}{
"error": "unsupported_version",
"message": "Unsupported ai-tools contract version.",
"supported": [
1
]
}{
"error": "company_not_ready",
"message": "Nucleo Intelligence is not set up yet for this company: open it once in the Nucleo app."
}{
"error": "invalid_arguments",
"message": "The per page field must not be greater than 50.",
"errors": {
"per_page": [
"The per page field must not be greater than 50."
]
}
}{
"error": "invalid_arguments",
"message": "Invalid arguments for this tool.",
"details": [
{
"field": "product",
"error": "required"
}
]
}{
"message": "Too Many Attempts."
}