Skip to main content
Glama
blake365

Macrostrat MCP Server

by blake365

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
NameRequiredDescriptionDefault
latYesA valid latitude in decimal degrees
lngYesA valid longitude in decimal degrees
responseTypeYesThe length of response long or short. Long provides lots of good detailslong

Implementation Reference

  • 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) }] }; }
  • 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) }] }; } );

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/blake365/macrostrat-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server