Skip to main content
Glama
blake365

Macrostrat MCP Server

by blake365

Mineral Information

mineral-info

Retrieve detailed information about minerals by specifying a mineral name, type, or constituent element. Access comprehensive geological data from the Macrostrat database to identify mineral properties and characteristics.

Instructions

Get information about a mineral, use one property

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mineralNoThe name of the mineral
mineral_typeNoThe type of mineral
elementNoAn element that the mineral is made of

Implementation Reference

  • The handler function for the 'mineral-info' tool. It takes input parameters (mineral, mineral_type, or element), constructs a query to the Macrostrat API /defs/minerals endpoint, fetches the data, and returns it as a formatted JSON text response.
    async (request) => {
      const { mineral, mineral_type, element } = request;
      const params = new URLSearchParams();
      if (mineral) params.append("mineral", mineral);
      if (mineral_type) params.append("mineral_type", mineral_type);
      if (element) params.append("element", element);
      const response = await fetch(`${getApiEndpoint("base")}/defs/minerals?${params}`);
      const data = await response.json();
    
      return {
        content: [{
          type: "text" as const,
          text: JSON.stringify(data, null, 2)
        }]
      };
    }
  • Input schema definition using Zod for validating tool parameters: mineral name, type, or composing element.
    inputSchema: {
      mineral: z.string().optional().describe("The name of the mineral"),
      mineral_type: z.string().optional().describe("The type of mineral"),
      element: z.string().optional().describe("An element that the mineral is made of"),
    }
  • src/index.ts:1025-1052 (registration)
    Registration of the 'mineral-info' tool with server.registerTool, including name, metadata/schema, and inline handler function.
    server.registerTool(
      "mineral-info",
      {
        title: "Mineral Information",
        description: "Get information about a mineral, use one property",
        inputSchema: {
          mineral: z.string().optional().describe("The name of the mineral"),
          mineral_type: z.string().optional().describe("The type of mineral"),
          element: z.string().optional().describe("An element that the mineral is made of"),
        }
      },
      async (request) => {
        const { mineral, mineral_type, element } = request;
        const params = new URLSearchParams();
        if (mineral) params.append("mineral", mineral);
        if (mineral_type) params.append("mineral_type", mineral_type);
        if (element) params.append("element", element);
        const response = await fetch(`${getApiEndpoint("base")}/defs/minerals?${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 'Get information,' which implies a read-only operation, but doesn't specify if it's a lookup, search, or detailed retrieval. There's no information on error handling, rate limits, authentication needs, or what the output might contain, which is a significant gap for a tool with no annotations.

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 concise with a single sentence: 'Get information about a mineral, use one property.' It's front-loaded with the main purpose, and there's no wasted text. However, it could be slightly more structured by explicitly listing the parameters or usage scenarios, but it's efficient overall.

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

Completeness2/5

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

Given the complexity (3 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what 'information' includes, how results are returned, or any constraints like data sources or limitations. Without annotations or an output schema, the description should provide more context to guide effective use, but it falls short.

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?

The input schema has 100% description coverage, with clear parameter descriptions in the schema itself. The description adds minimal value beyond the schema by implying 'use one property,' suggesting that parameters might be mutually exclusive, but it doesn't clarify which property to prioritize or how they interact. Since schema coverage is high, the baseline is 3, and the description doesn't significantly enhance parameter understanding.

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: 'Get information about a mineral, use one property.' It specifies the verb ('Get information') and resource ('mineral'), making the intent understandable. However, it doesn't distinguish this tool from potential siblings like 'defs' or 'find-columns,' which might also retrieve information, so it lacks explicit differentiation.

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

Usage Guidelines2/5

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

The description provides minimal guidance with 'use one property,' implying that only one of the three parameters should be used, but it doesn't specify when to use this tool versus alternatives like 'defs' or 'find-columns.' There's no explicit context on when or when not to use it, and no mention of prerequisites or exclusions, leaving usage unclear.

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