Skip to main content
Glama
blake365

Macrostrat MCP Server

by blake365

Find Units

find-units

Find geological rock units, formations, bedrock geology, and mineral information for any location worldwide using latitude and longitude coordinates.

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
responseTypeNoThe length of response long or short. Long provides lots of good detailslong

Implementation Reference

  • The handler function for the 'find-units' tool. It takes lat, lng, and optional responseType ('long' or 'short'), queries the Macrostrat units API, 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)
        }]
      };
    }
  • The tool schema defining title, description, and inputSchema using Zod for validation of lat, lng (required numbers), and responseType (enum with default).
    {
      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)
    The server.registerTool call that registers the 'find-units' tool with its schema and inline handler function.
    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)
          }]
        };
      }
    );
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool finds information 'for any location worldwide' and hints at response types, but lacks details on rate limits, authentication needs, error handling, or what specific data is returned (e.g., format, depth). For a tool with no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences that are front-loaded: the first states the core purpose, and the second provides usage context. There's no wasted text, but it could be slightly more structured (e.g., bullet points) for clarity. Overall, it's efficient and earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, 100% schema coverage, no output schema), the description is adequate but incomplete. It covers purpose and usage but lacks behavioral details (e.g., return format, limitations) and doesn't compensate for the absence of annotations or output schema. This makes it minimally viable but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters (lat, lng, responseType) with clear descriptions and enums. The description adds no additional parameter semantics beyond what's in the schema, such as explaining coordinate systems or elaborating on 'long' vs 'short' responses. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: finding geological rock units, formations, bedrock geology, and mineral information for locations worldwide. It specifies the resource (geological data) and verb (find), and distinguishes itself from siblings like 'mineral-info' by mentioning broader geological analysis. However, it doesn't explicitly differentiate from 'find-columns' or other geological tools, keeping it at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides implied usage guidelines by stating 'Use for geology questions, rock types, age dating, lithology, and geological analysis,' which suggests contexts where this tool is appropriate. However, it doesn't explicitly state when to use this tool versus alternatives like 'mineral-info' or 'find-columns,' nor does it provide exclusions or prerequisites. This leaves some ambiguity for the agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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