find-units
Identify geological formations, rock units, and mineral details for any global location using latitude and longitude. Provides lithology, age dating, and geological analysis for research or queries.
Instructions
Find geological rock units, formations, bedrock geology, and mineral information for any location worldwide. Use for geology questions, rock types, age dating, lithology, and geological analysis.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | Yes | A valid latitude in decimal degrees | |
| lng | Yes | A valid longitude in decimal degrees | |
| responseType | Yes | The length of response long or short. Long provides lots of good details | long |
Implementation Reference
- src/index.ts:957-973 (handler)Handler function that takes lat, lng, and responseType, constructs API query params, fetches geological units data from Macrostrat API endpoint, and returns the JSON data as text content.async (request) => { const { lat, lng, responseType } = request; const params = new URLSearchParams({ lat: lat.toString(), lng: lng.toString(), response: responseType, }); const response = await fetch(`${getApiEndpoint("units")}?${params}`); const data = await response.json(); return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; }
- src/index.ts:948-956 (schema)Schema defining the tool's title, description, and input parameters (lat, lng, responseType) with Zod validation.{ title: "Find Units", description: "Find geological rock units, formations, bedrock geology, and mineral information for any location worldwide. Use for geology questions, rock types, age dating, lithology, and geological analysis.", inputSchema: { lat: z.number().describe("A valid latitude in decimal degrees"), lng: z.number().describe("A valid longitude in decimal degrees"), responseType: z.enum(["long", "short"]).default("long").describe("The length of response long or short. Long provides lots of good details"), } },
- src/index.ts:946-974 (registration)Registration of the 'find-units' tool, including schema and inline handler implementation.server.registerTool( "find-units", { title: "Find Units", description: "Find geological rock units, formations, bedrock geology, and mineral information for any location worldwide. Use for geology questions, rock types, age dating, lithology, and geological analysis.", inputSchema: { lat: z.number().describe("A valid latitude in decimal degrees"), lng: z.number().describe("A valid longitude in decimal degrees"), responseType: z.enum(["long", "short"]).default("long").describe("The length of response long or short. Long provides lots of good details"), } }, async (request) => { const { lat, lng, responseType } = request; const params = new URLSearchParams({ lat: lat.toString(), lng: lng.toString(), response: responseType, }); const response = await fetch(`${getApiEndpoint("units")}?${params}`); const data = await response.json(); return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] }; } );