nextbillion-mcp 0.1.9 → 0.1.11

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 (2) hide show
  1. package/dist/index.js +47 -37
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5305,6 +5305,14 @@ function object(shape, params) {
5305
5305
  };
5306
5306
  return new ZodObject(def);
5307
5307
  }
5308
+ function strictObject(shape, params) {
5309
+ return new ZodObject({
5310
+ type: "object",
5311
+ shape,
5312
+ catchall: never(),
5313
+ ...util_exports.normalizeParams(params)
5314
+ });
5315
+ }
5308
5316
  function looseObject(shape, params) {
5309
5317
  return new ZodObject({
5310
5318
  type: "object",
@@ -20347,7 +20355,7 @@ ${JSON.stringify(structuredContent)}`;
20347
20355
  }
20348
20356
 
20349
20357
  // src/tools/shared/geo.ts
20350
- var CoordinateSchema = object({
20358
+ var CoordinateSchema = strictObject({
20351
20359
  latitude: number2().min(-90).max(90),
20352
20360
  longitude: number2().min(-180).max(180)
20353
20361
  });
@@ -20357,7 +20365,7 @@ function toLatLng(coordinate) {
20357
20365
  function toLatLngList(coordinates) {
20358
20366
  return coordinates.map(toLatLng).join("|");
20359
20367
  }
20360
- var BoundingBoxSchema = object({
20368
+ var BoundingBoxSchema = strictObject({
20361
20369
  west: number2().min(-180).max(180).describe("Western longitude"),
20362
20370
  south: number2().min(-90).max(90).describe("Southern latitude"),
20363
20371
  east: number2().min(-180).max(180).describe("Eastern longitude"),
@@ -20426,7 +20434,7 @@ ${lines.join("\n")}${more}`;
20426
20434
  }
20427
20435
 
20428
20436
  // src/tools/places/text-search.ts
20429
- var TextSearchSchema = object({
20437
+ var TextSearchSchema = strictObject({
20430
20438
  query: string2().min(1).describe("Free-text search query"),
20431
20439
  ...PlacesFilterShape
20432
20440
  });
@@ -20446,7 +20454,7 @@ function textSearchTool(options) {
20446
20454
  }
20447
20455
  };
20448
20456
  }
20449
- var ForwardGeocodeSchema = object({
20457
+ var ForwardGeocodeSchema = strictObject({
20450
20458
  query: string2().min(1).describe("Free-text search query"),
20451
20459
  ...PlacesFilterShape,
20452
20460
  types: PlaceTypesSchema.optional()
@@ -20454,7 +20462,7 @@ var ForwardGeocodeSchema = object({
20454
20462
  var geocodeForward = {
20455
20463
  name: "geocode_forward",
20456
20464
  title: "Forward Geocode",
20457
- description: "Convert a free-text address, place name, locality, or administrative area into geographic coordinates and a complete postal address. Tolerates incomplete or partly incorrect queries. Provide `near`, `country_codes`, or `bounding_box` for more relevant results. For many addresses at once use geocode_batch; for POI/business search use place_search.",
20465
+ description: 'Convert a free-text address, place name, locality or administrative area into coordinates and a full postal address; tolerates incomplete or partly wrong input. Use geocode_batch for many addresses, place_search for POIs/businesses, geocode_structured when the address components are already separated. Parameters: query (required); optional near {latitude, longitude} or country_codes (strongly recommended - landmark names rank poorly without a location bias), radius_m (with near), bounding_box {west, south, east, north}, limit, language, view, types (houseNumber | addressBlock | street | intersection | place | area). Example: {"query": "1600 Pennsylvania Avenue NW, Washington DC", "country_codes": ["USA"], "limit": 1}',
20458
20466
  inputSchema: ForwardGeocodeSchema,
20459
20467
  annotations: READ_ONLY,
20460
20468
  async run(args, nb) {
@@ -20469,38 +20477,41 @@ var geocodeForward = {
20469
20477
  var placeSearch = textSearchTool({
20470
20478
  name: "place_search",
20471
20479
  title: "Search Places",
20472
- description: 'Search for places, points of interest, and businesses with a free-text query (e.g. "gas station", "coffee near the station"), ranked by relevance. Provide `near`, `country_codes`, or `bounding_box` to anchor the search. For plain address-to-coordinates conversion use geocode_forward instead.',
20480
+ description: 'Search for places, points of interest and businesses with a free-text query (e.g. "gas station", "coffee"), ranked by relevance around a location. Use geocode_forward for plain address-to-coordinates conversion. Parameters: query (required); optional near {latitude, longitude} (recommended), radius_m (with near), country_codes, bounding_box {west, south, east, north}, limit, language, view. Example: {"query": "coffee", "near": {"latitude": 37.7749, "longitude": -122.4194}, "radius_m": 1000, "limit": 5}',
20473
20481
  path: "/discover",
20474
20482
  noun: "place"
20475
20483
  });
20476
20484
  var autosuggest = textSearchTool({
20477
20485
  name: "autosuggest",
20478
20486
  title: "Autosuggest",
20479
- description: 'Suggest address and place candidates from an incomplete or misspelled query (typo-tolerant, e.g. "aqaurium" still matches aquariums). Intended for search-as-you-type experiences. For prefix completion of valid addresses use autocomplete.',
20487
+ description: 'Suggest address and place candidates from an incomplete or misspelled query (typo-tolerant, e.g. "aqaurium" still matches aquariums). Use for search-as-you-type; use autocomplete for strict prefix completion of valid addresses. Parameters: query (required); optional near {latitude, longitude}, radius_m (with near), country_codes, bounding_box {west, south, east, north}, limit, language, view. Example: {"query": "aqauriums", "near": {"latitude": 42.3501, "longitude": -71.0689}, "limit": 5}',
20480
20488
  path: "/autosuggest",
20481
20489
  noun: "suggestion"
20482
20490
  });
20483
20491
  var autocomplete = textSearchTool({
20484
20492
  name: "autocomplete",
20485
20493
  title: "Autocomplete",
20486
- description: 'Complete valid street addresses and administrative areas from a partial query prefix (e.g. "stat" \u2192 "State Capitol\u2026"). For typo-tolerant fuzzy suggestions use autosuggest.',
20494
+ description: 'Complete a partial address or administrative-area prefix into full valid addresses (e.g. "stat" -> "State Capitol, ..."). Use for prefix completion as the user types; use autosuggest for typo-tolerant fuzzy suggestions and geocode_forward for a full address. Parameters: query (required); optional near {latitude, longitude}, radius_m (with near), country_codes, bounding_box {west, south, east, north}, limit, language, view. Example: {"query": "stat", "near": {"latitude": 35.4769, "longitude": -97.4872}, "limit": 5}',
20487
20495
  path: "/autocomplete",
20488
20496
  noun: "completion"
20489
20497
  });
20490
20498
 
20491
20499
  // src/tools/places/geocode-batch.ts
20492
- var BatchQuerySchema = object({
20500
+ var BatchQuerySchema = strictObject({
20493
20501
  query: string2().min(1).describe("Free-text search query for this entry"),
20494
20502
  ...PlacesFilterShape,
20495
20503
  types: PlaceTypesSchema.optional()
20496
20504
  });
20497
- var Schema = object({
20498
- queries: array(BatchQuerySchema).min(1).max(100).describe("Up to 100 forward-geocode queries resolved in a single request")
20505
+ var Schema = strictObject({
20506
+ queries: array(BatchQuerySchema).min(1).max(100).describe("Up to 100 forward-geocode queries resolved in a single request"),
20507
+ types: PlaceTypesSchema.optional().describe(
20508
+ "Default result-type filter applied to every query that does not set its own `types` (houseNumber, addressBlock, street, intersection, place, area)"
20509
+ )
20499
20510
  });
20500
20511
  var geocodeBatch = {
20501
20512
  name: "geocode_batch",
20502
20513
  title: "Batch Geocode",
20503
- description: "Forward-geocode up to 100 free-text queries in one request; returns one ranked result set per query, in input order. Strongly prefer this over repeated geocode_forward calls when resolving several addresses \u2014 this endpoint has a dedicated (low) rate limit of 60 requests per minute, so batch as much as possible into each call.",
20514
+ description: 'Forward-geocode up to 100 free-text queries in one request; returns one ranked result set per query, in input order. Prefer this over repeated geocode_forward calls - this endpoint has its own low rate limit (60 requests per minute), so batch as much as possible into each call. Parameters: queries (required array; each item: query (required), optional near {latitude, longitude}, radius_m, country_codes, bounding_box, limit, language, view, types); optional top-level types (houseNumber | addressBlock | street | intersection | place | area) as the default for all queries (a per-query types overrides it). Example: {"queries": [{"query": "600-699 Golden Gate Ave, San Francisco, CA", "types": ["addressBlock"]}, {"query": "Empire State Building", "country_codes": ["USA"]}]}',
20504
20515
  inputSchema: Schema,
20505
20516
  annotations: READ_ONLY,
20506
20517
  async run(args, nb) {
@@ -20512,7 +20523,7 @@ var geocodeBatch = {
20512
20523
  in: filters.in,
20513
20524
  limit: filters.limit,
20514
20525
  lang: filters.lang,
20515
- types: entry.types?.join(",")
20526
+ types: (entry.types ?? args.types)?.join(",")
20516
20527
  };
20517
20528
  });
20518
20529
  const response = await nb.postJson("/geocode/batch", {}, body);
@@ -20533,7 +20544,7 @@ ${lines.join("\n")}`, {
20533
20544
  };
20534
20545
 
20535
20546
  // src/tools/places/geocode-reverse.ts
20536
- var Schema2 = object({
20547
+ var Schema2 = strictObject({
20537
20548
  coordinate: CoordinateSchema.describe("The location to reverse geocode"),
20538
20549
  country_codes: CountryCodesSchema.optional(),
20539
20550
  bounding_box: BoundingBoxSchema.optional().describe("Hard-limit results to this bounding box"),
@@ -20543,7 +20554,7 @@ var Schema2 = object({
20543
20554
  var geocodeReverse = {
20544
20555
  name: "geocode_reverse",
20545
20556
  title: "Reverse Geocode",
20546
- description: "Find the nearest address for a geographic coordinate. Returns the full postal address, the matched position, and a bounding box.",
20557
+ description: 'Find the nearest address for a coordinate; returns the full postal address, the matched position and a bounding box. Parameters: coordinate {latitude, longitude} (required); optional country_codes, bounding_box {west, south, east, north}, language, view. Example: {"coordinate": {"latitude": 48.8566, "longitude": 2.3522}}',
20547
20558
  inputSchema: Schema2,
20548
20559
  annotations: READ_ONLY,
20549
20560
  async run(args, nb) {
@@ -20559,7 +20570,7 @@ var geocodeReverse = {
20559
20570
  };
20560
20571
 
20561
20572
  // src/tools/places/geocode-structured.ts
20562
- var Schema3 = object({
20573
+ var Schema3 = strictObject({
20563
20574
  country_code: string2().regex(/^[A-Za-z]{3}$/, "ISO 3166-1 alpha-3 code, e.g. USA").describe('Country of the address (required, ISO 3166-1 alpha-3, e.g. "USA")'),
20564
20575
  state: string2().optional(),
20565
20576
  county: string2().optional(),
@@ -20577,7 +20588,7 @@ var Schema3 = object({
20577
20588
  var geocodeStructured = {
20578
20589
  name: "geocode_structured",
20579
20590
  title: "Structured Geocode",
20580
- description: "Geocode an address given as separate structured fields (country, state, city, street, house number, postal code) instead of one free-text string. Searches addresses and administrative areas only \u2014 no POIs. Use when the address components are already known and precision matters; otherwise use geocode_forward.",
20591
+ description: 'Geocode an address given as separate fields instead of one string; searches addresses and administrative areas only, never POIs. Use when the components are already known and precision matters; otherwise use geocode_forward. Parameters: country_code (required, ISO 3166-1 alpha-3) plus at least one of state, county, city, suburb, neighborhood, street, house_number, postal_code; optional near {latitude, longitude}, limit, types, view. Example: {"country_code": "GBR", "city": "London", "street": "Baker Street", "house_number": "221B"}',
20581
20592
  inputSchema: Schema3,
20582
20593
  annotations: READ_ONLY,
20583
20594
  async run(args, nb) {
@@ -20607,14 +20618,14 @@ var geocodeStructured = {
20607
20618
  };
20608
20619
 
20609
20620
  // src/tools/places/place-lookup.ts
20610
- var Schema4 = object({
20621
+ var Schema4 = strictObject({
20611
20622
  id: string2().min(1).describe("Unique place id, as returned by the other place/geocoding tools"),
20612
20623
  view: ViewSchema.optional()
20613
20624
  });
20614
20625
  var placeLookup = {
20615
20626
  name: "place_lookup",
20616
20627
  title: "Place Lookup",
20617
- description: "Fetch the full details (address, position, access points, categories, contacts) of a place by its unique id. Ids come from the results of place_search, geocode_forward, autosuggest, autocomplete, or search_along_route.",
20628
+ description: 'Fetch the full details of a place (address, position, access points, categories, contacts) by its unique id, as returned by place_search, geocode_forward, autosuggest, autocomplete or search_along_route. Parameters: id (required); optional view. Example: {"id": "2EmBgAmFpR9dg0D89EBzNA"}',
20618
20629
  inputSchema: Schema4,
20619
20630
  annotations: READ_ONLY,
20620
20631
  async run(args, nb) {
@@ -20627,7 +20638,7 @@ var placeLookup = {
20627
20638
  };
20628
20639
 
20629
20640
  // src/tools/places/postcode-lookup.ts
20630
- var Schema5 = object({
20641
+ var Schema5 = strictObject({
20631
20642
  postal_code: string2().optional().describe("Postal/ZIP code to look up (requires `country`; do not combine with `coordinate`)"),
20632
20643
  country: string2().optional().describe(
20633
20644
  "Country of the postal code \u2014 name, alpha-2, or alpha-3 ISO code. Required with `postal_code`"
@@ -20639,11 +20650,10 @@ var Schema5 = object({
20639
20650
  "Return the boundary polygon in GeoJSON format instead of the default point-list format"
20640
20651
  )
20641
20652
  });
20642
- var SUPPORTED_COUNTRIES = "USA, India, UK, Netherlands, Austria, Germany, Indonesia, France, Singapore, Philippines, Canada, Australia, New Zealand, Italy, Brazil, Mexico, Spain";
20643
20653
  var postcodeLookup = {
20644
20654
  name: "postcode_lookup",
20645
20655
  title: "Postcode Lookup",
20646
- description: `Get the centroid and boundary polygon of a postal/ZIP code, or find which postal code a coordinate belongs to. One lookup per call. Supported countries: ${SUPPORTED_COUNTRIES}.`,
20656
+ description: 'Get the centroid and boundary polygon of a postal/ZIP code, or find the postal code that contains a coordinate; one lookup per call. Supported countries: USA, India, UK, Netherlands, Austria, Germany, Indonesia, France, Singapore, Philippines, Canada, Australia, New Zealand, Italy, Brazil, Mexico, Spain. Parameters: either postal_code plus country (name, alpha-2 or alpha-3 code), or coordinate {latitude, longitude}; optional geojson_boundary (true for a GeoJSON boundary). Example: {"postal_code": "90011", "country": "USA"}',
20647
20657
  inputSchema: Schema5,
20648
20658
  annotations: READ_ONLY,
20649
20659
  async run(args, nb) {
@@ -20687,7 +20697,7 @@ var AVOID_VALUES = [
20687
20697
  "tunnel",
20688
20698
  "none"
20689
20699
  ];
20690
- var Schema6 = object({
20700
+ var Schema6 = strictObject({
20691
20701
  origin: CoordinateSchema.describe("Route start (must be a routable land location)"),
20692
20702
  destination: CoordinateSchema.describe("Route end (must be a routable land location)"),
20693
20703
  waypoints: array(CoordinateSchema).max(200).optional().describe("Intermediate stops visited in order (max 200)"),
@@ -20710,13 +20720,13 @@ var Schema6 = object({
20710
20720
  geometry: _enum(["polyline", "polyline6"]).optional().describe(
20711
20721
  "Route geometry encoding (default polyline, precision 5 \u2014 directly usable with static_route_map)"
20712
20722
  ),
20713
- truck_size_cm: object({ height: number2(), width: number2(), length: number2() }).optional().describe("Truck dimensions in cm (flexible + mode=truck only)"),
20723
+ truck_size_cm: strictObject({ height: number2(), width: number2(), length: number2() }).optional().describe("Truck dimensions in cm (flexible + mode=truck only)"),
20714
20724
  truck_weight_kg: number2().int().max(1e5).optional().describe("Truck gross weight in kg (flexible + mode=truck only)")
20715
20725
  });
20716
20726
  var directions = {
20717
20727
  name: "directions",
20718
20728
  title: "Directions",
20719
- description: "Calculate a route between two points with optional intermediate waypoints. Returns distance (meters), duration (seconds), and encoded polyline geometry per route; pass the geometry to static_route_map to render it. Traffic-aware.",
20729
+ description: 'Calculate a route between an origin and a destination with optional waypoints; returns distance (meters), duration (seconds) and an encoded polyline per route - pass the polyline to static_route_map to draw it. Use distance_matrix for many origin/destination pairs. Parameters: origin, destination {latitude, longitude} (required); optional waypoints (array of {latitude, longitude}, max 200), mode (car | truck | motorcycle | bike | walk), service ("flexible" default: all modes, route_type, departure_time, full avoid list and truck options; "fast": car/truck only, lower latency), route_type, departure_time (UNIX seconds), avoid (array), honor_restrictions, alternatives, steps (fast only), geometry (polyline default | polyline6), truck_size_cm {height, width, length}, truck_weight_kg. Example: {"origin": {"latitude": 37.7749, "longitude": -122.4194}, "destination": {"latitude": 34.0522, "longitude": -118.2437}, "mode": "car"}',
20720
20730
  inputSchema: Schema6,
20721
20731
  annotations: READ_ONLY,
20722
20732
  async run(args, nb) {
@@ -20759,7 +20769,7 @@ Geometry (encoded polyline) is in structured content.` : "No route found.",
20759
20769
  };
20760
20770
 
20761
20771
  // src/tools/routing/distance-matrix.ts
20762
- var Schema7 = object({
20772
+ var Schema7 = strictObject({
20763
20773
  origins: array(CoordinateSchema).min(1).max(1e3).describe("Start points (matrix rows)"),
20764
20774
  destinations: array(CoordinateSchema).min(1).max(1e3).describe("End points (matrix columns)"),
20765
20775
  mode: _enum(["car", "truck", "motorcycle", "bike", "walk"]).optional().describe("Travel mode (default car). Modes other than car/truck require service=flexible"),
@@ -20774,13 +20784,13 @@ var Schema7 = object({
20774
20784
  honor_restrictions: boolean2().optional().describe(
20775
20785
  "When true, enforce restricted-area rules for origin/destination points instead of routing through with a warning (flexible service only)"
20776
20786
  ),
20777
- truck_size_cm: object({ height: number2(), width: number2(), length: number2() }).optional().describe("Truck dimensions in cm (flexible + mode=truck only)"),
20787
+ truck_size_cm: strictObject({ height: number2(), width: number2(), length: number2() }).optional().describe("Truck dimensions in cm (flexible + mode=truck only)"),
20778
20788
  truck_weight_kg: number2().int().max(1e5).optional().describe("Truck gross weight in kg (flexible + mode=truck only)")
20779
20789
  });
20780
20790
  var distanceMatrix = {
20781
20791
  name: "distance_matrix",
20782
20792
  title: "Distance Matrix",
20783
- description: "Compute travel distances (meters) and durations (seconds) for every origin\u2192destination pair in one call (one-to-many or many-to-many). Far more efficient than repeated directions calls \u2014 always prefer this for multiple pairs. Response has one row per origin with one element per destination, in input order.",
20793
+ description: 'Compute travel distance (meters) and duration (seconds) for every origin-to-destination pair in one call; one row per origin with one element per destination, in input order. Always prefer this over repeated directions calls for multiple pairs. Parameters: origins, destinations (arrays of {latitude, longitude}, required); optional mode, service ("fast" default: up to 1000x1000 points; "flexible": departure_time, route_type, truck options and more modes, max 50x50), route_type, departure_time, avoid, honor_restrictions, truck_size_cm {height, width, length}, truck_weight_kg. Example: {"origins": [{"latitude": 1.29, "longitude": 103.85}], "destinations": [{"latitude": 1.35, "longitude": 103.99}, {"latitude": 1.3, "longitude": 103.77}]}',
20784
20794
  inputSchema: Schema7,
20785
20795
  annotations: READ_ONLY,
20786
20796
  async run(args, nb) {
@@ -20817,7 +20827,7 @@ var distanceMatrix = {
20817
20827
  };
20818
20828
 
20819
20829
  // src/tools/routing/isochrone.ts
20820
- var Schema8 = object({
20830
+ var Schema8 = strictObject({
20821
20831
  origin: CoordinateSchema.describe("Starting point of the reachability analysis"),
20822
20832
  contours_minutes: array(number2().int().min(1).max(40)).max(4).optional().describe("Travel times in minutes, one contour each (max 4 values, increasing, max 40)"),
20823
20833
  contours_meters: array(number2().int().min(1).max(6e4)).max(4).optional().describe("Travel distances in meters, one contour each (max 4 values, increasing, max 60000)"),
@@ -20831,7 +20841,7 @@ var Schema8 = object({
20831
20841
  var isochrone = {
20832
20842
  name: "isochrone",
20833
20843
  title: "Isochrone",
20834
- description: "Calculate the area reachable from a point within given travel time(s) or distance(s). Returns a GeoJSON FeatureCollection of contours. Note: contour geometry coordinates are GeoJSON [longitude, latitude] order.",
20844
+ description: 'Calculate the area reachable from a point within given travel times or distances; returns a GeoJSON FeatureCollection of contours (geometry coordinates are in GeoJSON [longitude, latitude] order). Parameters: origin {latitude, longitude} (required); exactly one of contours_minutes (array, up to 4 values, max 40) or contours_meters (array, up to 4 values, max 60000); optional mode, polygons (true for Polygon geometry instead of LineString), denoise, departure_time. Example: {"origin": {"latitude": 37.7749, "longitude": -122.4194}, "contours_minutes": [5, 10], "polygons": true}',
20835
20845
  inputSchema: Schema8,
20836
20846
  annotations: READ_ONLY,
20837
20847
  async run(args, nb) {
@@ -20861,7 +20871,7 @@ var isochrone = {
20861
20871
  };
20862
20872
 
20863
20873
  // src/tools/routing/search-along-route.ts
20864
- var Schema9 = object({
20874
+ var Schema9 = strictObject({
20865
20875
  route_points: array(CoordinateSchema).min(2).describe("Waypoints defining the route to search along, in travel order"),
20866
20876
  query: string2().min(1).describe('What to find along the route, e.g. "gas station", "coffee"'),
20867
20877
  max_detour_seconds: number2().int().min(1).max(3600).optional().describe("Max driving time to reach a result after leaving the route (default 900 = 15 min)"),
@@ -20871,7 +20881,7 @@ var Schema9 = object({
20871
20881
  var searchAlongRoute = {
20872
20882
  name: "search_along_route",
20873
20883
  title: "Search Along Route",
20874
- description: 'Find places (POIs) matching a text query along a driving route, with the detour time and distance each stop adds. Pass the route as an ordered list of waypoints \u2014 e.g. the origin/waypoints/destination used with the directions tool. Ideal for "find X on the way" questions.',
20884
+ description: 'Find places matching a text query along a driving route, with the detour time and distance each stop adds - for "find X on the way" questions. Pass the route as an ordered list of waypoints, e.g. the origin, waypoints and destination used with directions. Parameters: route_points (array of {latitude, longitude}, at least 2, required), query (required); optional max_detour_seconds (default 900, max 3600), sort_by (detour_time | detour_offset), limit (max 20). Example: {"route_points": [{"latitude": 34.0493, "longitude": -118.2557}, {"latitude": 34.0415, "longitude": -118.231}], "query": "gas station", "max_detour_seconds": 600}',
20875
20885
  inputSchema: Schema9,
20876
20886
  annotations: READ_ONLY,
20877
20887
  async run(args, nb) {
@@ -20969,7 +20979,7 @@ async function saveImage(data, prefix, ext) {
20969
20979
  }
20970
20980
 
20971
20981
  // src/tools/maps/static-map-image.ts
20972
- var Schema10 = object({
20982
+ var Schema10 = strictObject({
20973
20983
  center: CoordinateSchema.describe("Center of the map view"),
20974
20984
  zoom: number2().min(0).max(22).describe("Zoom level (0 = world, ~10 = city, ~15 = streets; fractional values allowed)"),
20975
20985
  markers: array(CoordinateSchema.extend({ color: string2().optional() })).optional().describe('Markers to draw, each with optional color (e.g. "red", "#0000ff")'),
@@ -20978,7 +20988,7 @@ var Schema10 = object({
20978
20988
  var staticMapImage = {
20979
20989
  name: "static_map_image",
20980
20990
  title: "Static Map Image",
20981
- description: "Render a static map image centered on a location, with optional markers. Returns the image directly. To draw a route on a map use static_route_map instead.",
20991
+ description: 'Render a static map image centered on a location, optionally with markers; returns the image inline and also saves it to a local file (path in the result text) for clients that cannot display images. To draw a route, use static_route_map. Parameters: center {latitude, longitude} and zoom (0-22) (required); optional markers (array of {latitude, longitude, color}), width, height (default 512), style (streets | light | dark | hybrid), format (png | jpg | webp), retina. Example: {"center": {"latitude": 48.8566, "longitude": 2.3522}, "zoom": 14, "style": "dark", "markers": [{"latitude": 48.8584, "longitude": 2.2945, "color": "red"}]}',
20982
20992
  inputSchema: Schema10,
20983
20993
  annotations: READ_ONLY,
20984
20994
  async run(args, nb) {
@@ -21099,7 +21109,7 @@ function fitPolylineToBudget(points, maxEncodedChars) {
21099
21109
  }
21100
21110
 
21101
21111
  // src/tools/maps/static-route-map.ts
21102
- var Schema11 = object({
21112
+ var Schema11 = strictObject({
21103
21113
  encoded_polyline: string2().optional().describe(
21104
21114
  "Route geometry as a Google encoded polyline (precision 5) \u2014 exactly what the directions tool returns with its default geometry setting"
21105
21115
  ),
@@ -21115,7 +21125,7 @@ var ENCODED_CHAR_BUDGETS = [4e3, 3e3, 2e3, 1200, 600, 200];
21115
21125
  var staticRouteMap = {
21116
21126
  name: "static_route_map",
21117
21127
  title: "Static Route Map",
21118
- description: "Render a static map image with a route drawn on it, auto-fitted to show the whole route. Pass the encoded polyline from the directions tool (preferred), or a list of route points. Returns the image directly.",
21128
+ description: 'Render a static map with a route drawn on it, auto-fitted to show the whole route; very long routes are simplified automatically to fit the map API URL limit (distances are unaffected). Returns the image inline and also saves it to a local file (path in the result text). Parameters: exactly one of encoded_polyline (the geometry string from directions, preferred) or route_points (array of {latitude, longitude}); optional markers (array of {latitude, longitude, color}, e.g. origin and destination), stroke_color, stroke_width, padding, width, height, style, format, retina. Example: {"encoded_polyline": "<geometry from directions>", "markers": [{"latitude": 37.7749, "longitude": -122.4194, "color": "green"}, {"latitude": 34.0522, "longitude": -118.2437, "color": "red"}]}',
21119
21129
  inputSchema: Schema11,
21120
21130
  annotations: READ_ONLY,
21121
21131
  async run(args, nb) {
@@ -21343,7 +21353,7 @@ function extractApiMessage(bodyText) {
21343
21353
  }
21344
21354
 
21345
21355
  // src/index.ts
21346
- var pkg = true ? { version: "0.1.9" } : createRequire(import.meta.url)("../package.json");
21356
+ var pkg = true ? { version: "0.1.11" } : createRequire(import.meta.url)("../package.json");
21347
21357
  function main() {
21348
21358
  const args = process.argv.slice(2);
21349
21359
  if (args.includes("--version") || args.includes("-v")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextbillion-mcp",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "MCP server exposing NextBillion.ai location APIs (geocoding, places, routing, maps) as tools for AI agents",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",