Give Claude five TrendsAGI tools with Anthropic input_schema definitions, then answer each tool_use block with runAnthropicTool. The package returns plain data and never imports the Anthropic SDK at runtime. This page lists the required credentials, setup example, mapped endpoints, and production notes.
Base URL
https://staging-api.trendsagi.com115
Routes
23
Guides
3
Languages
Claude tool definitions and a dispatcher
Give Claude five TrendsAGI tools with Anthropic input_schema definitions, then answer each tool_use block with runAnthropicTool. The package returns plain data and never imports the Anthropic SDK at runtime.
Install
npm install @trendsagi/anthropic @trendsagi/core @anthropic-ai/sdkRequired credentials
import Anthropic from "@anthropic-ai/sdk";
import { TrendsAGI } from "@trendsagi/core";
import { createAnthropicTools, runAnthropicTool } from "@trendsagi/anthropic";
const anthropic = new Anthropic();
const trendsagi = new TrendsAGI();
const message = await anthropic.messages.create({
model: "claude-sonnet-4-5",
max_tokens: 1024,
messages: [{ role: "user", content: "Find a rising skincare trend." }],
tools: createAnthropicTools(trendsagi),
});
for (const block of message.content) {
if (block.type !== "tool_use") continue;
const result = await runAnthropicTool(trendsagi, block.name, block.input);
console.log(block.id, result);
}# Save as quickstart.mjs
node quickstart.mjs1. Install
Add SDK/dependency for this integration path.
2. Authenticate
Set API key and any provider-specific credentials.
3. Map endpoints
Use mapped endpoints below to build deterministic flow.
4. Harden
Add rate-limit backoff, idempotency, and safety gates.
Endpoint Mapping
Each integration is mapped to specific API endpoints so teams can compose deterministic workflows.
Production notes