Call from code

Every tool your agent uses over MCP is also an HTTP operation — same name, same arguments, same result — for your own scripts, dashboards and approval pages.

Early access — the Tool API is open on request, contact us.

What your agent calls in a conversation, your code calls by the same name with the same arguments. So your agent can build you your own tools on it — a live dashboard, a listing tool, an approval page — whose buttons act on Amazon exactly as the agent does in chat.

EndpointPOST https://api.sellersheetai.com/api/v1/tools/{tool}
AuthAuthorization: Bearer <API key> — an API key, not an MCP key (Keys & store access)
Bodythe tool's arguments as a JSON object
Resultthe same envelope the MCP tool returns (Responses & errors)
CatalogGET https://api.sellersheetai.com/api/v1/tools
OpenAPI 3.1https://api.sellersheetai.com/api/v1/openapi.json

One call

Start where an agent starts — get_user_context returns your store refs:

In an AI client (MCP)

tools/call
{
  "name": "get_user_context",
  "arguments": {}
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/get_user_context \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Early access — the Tool API is open on request, contact us.

Then pass one of its store_refs verbatim as the store of every store-scoped tool:

In an AI client (MCP)

tools/call
{
  "name": "fbaInventory_getInventorySummaries",
  "arguments": {
    "store": "myStore-US",
    "seller_skus": [
      "SKU-A",
      "SKU-B"
    ]
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/fbaInventory_getInventorySummaries \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store":"myStore-US","seller_skus":["SKU-A","SKU-B"]}'
Early access — the Tool API is open on request, contact us.

Every tool is a POST: a tool is an operation with arguments, not a resource. Whether it reads, writes or destroys is its access label in the catalog (see Read, write & destructive).

Keep the key out of your code

Save it once as SELLERSHEET_API_KEY — in your shell, or a .env file next to your script that is listed in .gitignore — and read it from there, as the snippets above do. A browser page has no .env: ask for the key when the page opens and keep it in sessionStorage under the same name — never in the HTML, never in a page you share.

What to know before you build

  • The status code tells you whether it ran. 200 means the call was carried out; a 4xx means it was not; 503 means Amazon, noon or the backend could not answer — retry after Retry-After. Details: Responses & errors.
  • Paging is your loop. A list tool returns a token for the next page; call again with it. See Paging.
  • Show before you write. A write should happen because a person pressed a button: show what will be sent first, and confirm explicitly before a destructive tool.
  • Long calls belong on MCP. The public edge cuts an HTTP call still running after about 100 seconds. A long workflow — a whole FBA plan, a large A+ library — runs over MCP, whose streamed response is not cut.
  • Same limits as MCP. API calls count under the same plan windows as your agent's calls; a 429 carries Retry-After. See Credits & limits.
  • Browser pages are allowed. The API accepts calls from any origin with the Authorization and Content-Type headers and no cookies. A page hosted inside an AI client may be blocked from calling other hosts — run it as a local file, on localhost, or on your own host.

Every tool, with its arguments and a ready call: the tool reference.

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude