google-maps-link
Generate a Google Maps link using latitude and longitude coordinates to locate tram stations or stops on the Zaragoza tram system for easy navigation.
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 takes latitude and longitude, constructs a Google Maps URL, and returns it as text content.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 parameters.{ latitude: z.number(), longitude: z.number(), },
- index.js:185-198 (registration)Registration of the 'google-maps-link' tool using server.tool, including name, description, schema, and 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 }], }; } );