tool-schemas.ts•4.77 kB
export const SearchNearbySchema = {
type: "object" as const,
properties: {
center: {
type: "object" as const,
properties: {
value: { type: "string" as const, description: "Address, place name or coordinates (format: lat,lng)" },
isCoordinates: { type: "boolean" as const, description: "Whether the value is coordinates" }
},
required: ["value"]
},
keyword: { type: "string" as const, description: "Search keyword (e.g., restaurant, coffee)" },
radius: { type: "number" as const, description: "Search radius in meters" },
openNow: { type: "boolean" as const, description: "Only show places that are currently open" },
minRating: { type: "number" as const, description: "Minimum rating requirement (0-5)", minimum: 0, maximum: 5 }
},
required: ["center"],
additionalProperties: false
};
export const PlaceDetailsSchema = {
type: "object" as const,
properties: {
placeId: { type: "string" as const, description: "Google Maps Place ID" }
},
required: ["placeId"],
additionalProperties: false
};
export const GeocodeSchema = {
type: "object" as const,
properties: {
address: { type: "string" as const, description: "Address or place name to convert" }
},
required: ["address"],
additionalProperties: false
};
export const ReverseGeocodeSchema = {
type: "object" as const,
properties: {
latitude: { type: "number" as const, description: "Latitude coordinate" },
longitude: { type: "number" as const, description: "Longitude coordinate" }
},
required: ["latitude", "longitude"],
additionalProperties: false
};
export const DistanceMatrixSchema = {
type: "object" as const,
properties: {
origins: {
type: "array" as const,
items: { type: "string" as const },
description: "List of origin addresses or coordinates"
},
destinations: {
type: "array" as const,
items: { type: "string" as const },
description: "List of destination addresses or coordinates"
},
mode: {
type: "string" as const,
enum: ["driving", "walking", "bicycling", "transit"] as const,
description: "Travel mode"
}
},
required: ["origins", "destinations"],
additionalProperties: false
};
export const DirectionsSchema = {
type: "object" as const,
properties: {
origin: { type: "string" as const, description: "Starting point address or coordinates" },
destination: { type: "string" as const, description: "Destination address or coordinates" },
mode: {
type: "string" as const,
enum: ["driving", "walking", "bicycling", "transit"] as const,
description: "Travel mode"
}
},
required: ["origin", "destination"],
additionalProperties: false
};
export const ElevationSchema = {
type: "object" as const,
properties: {
locations: {
type: "array" as const,
items: {
type: "object" as const,
properties: {
latitude: { type: "number" as const },
longitude: { type: "number" as const }
},
required: ["latitude", "longitude"]
},
description: "List of locations to get elevation data for"
}
},
required: ["locations"],
additionalProperties: false
};
export const MapWithDirectionsSchema = {
type: "object" as const,
properties: {
origin: {
type: "object" as const,
properties: {
address: { type: "string" as const },
lat: { type: "number" as const },
lng: { type: "number" as const }
},
required: ["address", "lat", "lng"]
},
destination: {
type: "object" as const,
properties: {
address: { type: "string" as const },
lat: { type: "number" as const },
lng: { type: "number" as const }
},
required: ["address", "lat", "lng"]
},
waypoints: {
type: "array" as const,
items: {
type: "object" as const,
properties: {
address: { type: "string" as const },
lat: { type: "number" as const },
lng: { type: "number" as const }
},
required: ["address", "lat", "lng"]
}
},
mode: {
type: "string" as const,
enum: ["driving", "walking", "bicycling", "transit"] as const,
description: "Travel mode"
},
size: {
type: "object" as const,
properties: {
width: { type: "number" as const },
height: { type: "number" as const }
},
required: ["width", "height"]
},
scale: { type: "number" as const },
mapType: {
type: "string" as const,
enum: ["roadmap", "satellite", "hybrid", "terrain"] as const
}
},
required: ["origin", "destination"],
additionalProperties: false
};