@serpbit/ai-sdk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +1 -1
  2. package/package.json +1 -1
  3. package/tools.js +5 -5
package/index.js CHANGED
@@ -5,7 +5,7 @@ import { jsonSchema, tool } from "ai";
5
5
  import { Serpbit } from "serpbit";
6
6
  import { TOOLS } from "./tools.js";
7
7
 
8
- export const VERSION = "0.1.0";
8
+ export const VERSION = "0.1.1";
9
9
 
10
10
  // A page read's most characters when the model names none: a model's context is smaller than an API client's buffer
11
11
  // (the MCP server's mcpReadChars).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serpbit/ai-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Google Search, News, Shopping, Images, Videos, Maps, Autocomplete and AI Mode as tools for the Vercel AI SDK, through Serpbit.",
5
5
  "type": "module",
6
6
  "exports": {
package/tools.js CHANGED
@@ -95,7 +95,7 @@ export const TOOLS = [
95
95
  "title": "Google Search"
96
96
  },
97
97
  {
98
- "description": "Google's News tab: articles with their publisher, date, snippet and story; with content, the first articles' text. 1 credit per page, and 1 per article read.",
98
+ "description": "Searches Google's News tab and returns articles with their publisher, date (and published_at in UTC), snippet and story_id, which is the same on every article of one story; with content=N, also the first N articles' text as Markdown. Use it for news and recent events, or to follow one story across publishers; for the web at large use google_search, and for a written answer, google_ai_mode. sort=date puts the newest first and tbs limits the time (qdr:d is the past day). pages asks pages 1 to N in one call, start one later page alone; the two do not combine. 1 credit per page and 1 per article read; failed calls are free.",
99
99
  "inputSchema": {
100
100
  "additionalProperties": false,
101
101
  "properties": {
@@ -170,7 +170,7 @@ export const TOOLS = [
170
170
  "title": "Google News"
171
171
  },
172
172
  {
173
- "description": "Google's Shopping tab: products with price, store, rating, reviews and a product_id for google_shopping_product, and the tab's filters. 2 credits per page.",
173
+ "description": "Searches Google's Shopping tab and returns products, without sponsored ones, each with price, store, rating, reviews, delivery and a product_id, plus the tab's filters (price ranges, brands...). Use it to find products and compare them across the market; then, for every store's offer on one product, pass its product_id to google_shopping_product. To apply a filter, call again with that option's q and shoprs together, both taken from filters. 2 credits per page; failed calls are free.",
174
174
  "inputSchema": {
175
175
  "additionalProperties": false,
176
176
  "properties": {
@@ -350,7 +350,7 @@ export const TOOLS = [
350
350
  "title": "Google Images"
351
351
  },
352
352
  {
353
- "description": "Google's Videos tab: videos with duration, platform, channel, date and thumbnail. 1 credit per page.",
353
+ "description": "Searches Google's Videos tab and returns ten videos a page, each with its link, duration, platform (YouTube, TikTok...), channel, date, thumbnail and, for YouTube, the video_id. Use it when the answer is a video, from any platform; for pages use google_search, for pictures google_images. The duration filter keeps short (under 4 minutes), medium (4 to 20) or long videos, and tbs limits the date (qdr:w is the past week). 1 credit per page; failed calls are free.",
354
354
  "inputSchema": {
355
355
  "additionalProperties": false,
356
356
  "properties": {
@@ -408,7 +408,7 @@ export const TOOLS = [
408
408
  "title": "Google Videos"
409
409
  },
410
410
  {
411
- "description": "Places as Google Maps lists them for a query: rating, reviews, type, address, hours, phone, website, coordinates and Google's ids. Place the search with location. 1 credit per page of 20.",
411
+ "description": "Searches Google Maps and returns the places it lists, 20 a page, each with type, rating, reviews, price, address, hours, phone, website, coordinates and Google's place ids. Use it to find businesses or places of a kind in an area (coffee shops, dentists, hotels); for web pages about a place use google_search, and for an answer in prose about places, google_ai_mode. Put the kind of place in q and the area in location (Austin,Texas,United States); start=20 is page 2, up to 180. 1 credit per page; failed calls are free.",
412
412
  "inputSchema": {
413
413
  "additionalProperties": false,
414
414
  "properties": {
@@ -496,7 +496,7 @@ export const TOOLS = [
496
496
  "title": "Google Autocomplete"
497
497
  },
498
498
  {
499
- "description": "Google's AI Mode answer to a question, with the sources it cites and the places it names. Takes 5 to 60 seconds. 2 credits.",
499
+ "description": "Asks Google's AI Mode a question and returns its written answer, with the sources it cites and the places it names (rating, address, phone). Use it for a synthesized answer with citations, or to see which sites Google's AI cites for a question; for the results page itself, links and the AI Overview, use google_search, which is faster and costs 1 credit. location asks from a place, which matters for questions about things nearby; format=json gives the answer in blocks, each with its citations. Takes 5 to 60 seconds. 2 credits an answer; a call that gets no answer is free.",
500
500
  "inputSchema": {
501
501
  "additionalProperties": false,
502
502
  "properties": {