google-maps-link
Generate Google Maps links from coordinates to locate tram stations and stops in Zaragoza.
Instructions
Get a Google Maps link from coordinates to help people to find a station o stop
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| latitude | Yes | ||
| longitude | Yes |
Implementation Reference
- index.js:192-197 (handler)Handler function that generates and returns a Google Maps URL from latitude and longitude coordinates.async ({ latitude, longitude }) => { const mapsUrl = `https://www.google.com/maps?q=${latitude},${longitude}`; return { content: [{ type: "text", text: mapsUrl }], }; }
- index.js:188-191 (schema)Input schema using Zod for latitude and longitude as numbers.{ latitude: z.number(), longitude: z.number(), },
- index.js:185-198 (registration)Registration of the 'google-maps-link' tool with server.tool, including description, schema, and inline handler.server.tool( "google-maps-link", "Get a Google Maps link from coordinates to help people to find a station o stop", { latitude: z.number(), longitude: z.number(), }, async ({ latitude, longitude }) => { const mapsUrl = `https://www.google.com/maps?q=${latitude},${longitude}`; return { content: [{ type: "text", text: mapsUrl }], }; } );