🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@buywhere/paperclip

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buywhere/paperclip

BuyWhere tools for Paperclip agents — search and compare products across Singapore, SEA, and US markets. Product catalog and price comparison for AI agent commerce.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

@buywhere/paperclip

npm version License: MIT

BuyWhere tools for Paperclip agents — search and compare products across Singapore, SEA, and US markets. Part of the BuyWhere product catalog API for AI agent commerce.

Installation

npm install @buywhere/paperclip

Quick Start

import { createToolHandlers } from "@buywhere/paperclip";

// Requires BUYWHERE_API_KEY env var
const tools = createToolHandlers();

const result = await tools.search_products.handler({
  q: "wireless headphones",
  limit: 5,
});
console.log(result);

Using with Paperclip Agents

Paperclip agents can use BuyWhere tools in two ways:

1. Direct Function Calls (for custom agent code)

import { BuyWhereClient, createToolHandlers } from "@buywhere/paperclip";

const client = new BuyWhereClient({ apiKey: "bw_live_xxxx" });
const tools = createToolHandlers(client);

// Search products
const results = await tools.search_products.handler({
  q: "mechanical keyboard",
  country_code: "SG",
  limit: 10,
 });

2. MCP Server Integration (for any Paperclip agent)

Add this to your Paperclip agent's configuration:

{
  "mcpServers": {
    "buywhere": {
      "command": "npx",
      "args": ["-y", "@buywhere/mcp-server"],
      "env": {
        "BUYWHERE_API_KEY": "bw_live_xxxx"
      }
    }
  }
}

The @buywhere/mcp-server package is already published and maintained separately.

Tools

ToolDescription
search_productsSearch catalog by keyword, price range, region
get_productGet full product details by ID
compare_productsCompare 2-10 products side-by-side
get_dealsGet discounted products sorted by discount
list_categoriesList top-level product categories

API

BuyWhereClient

const client = new BuyWhereClient({ apiKey: string, baseUrl?: string, timeout?: number });

BuyWhereClient.fromEnv()

Creates a client using BUYWHERE_API_KEY and optional BUYWHERE_API_URL environment variables.

createToolHandlers(client?: BuyWhereClient): ToolHandlerMap

Returns an object with named ToolHandler entries, each having:

  • name — tool name
  • description — tool description
  • inputSchema — JSON Schema for input validation
  • handler(args) — async function that calls the BuyWhere API

Environment Variables

VariableDescription
BUYWHERE_API_KEYYour BuyWhere API key (required)
BUYWHERE_API_URLCustom API base URL (optional, default: https://api.buywhere.ai)

Get your API key at https://buywhere.ai.

Requirements

  • Node.js >= 18

License

MIT

Keywords

buywhere

FAQs

Package last updated on 03 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts