Skip to main content
Glama
KyrieTangSheng

National Parks MCP Server

getParkDetails

Retrieve comprehensive details about U.S. National Parks using park codes to access information about facilities, alerts, and visitor resources.

Instructions

Get detailed information about a specific national park

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parkCodeYesThe park code of the national park (e.g., "yose" for Yosemite, "grca" for Grand Canyon)

Implementation Reference

  • The main handler function implementing the getParkDetails tool. Fetches park details from NPS API using parkCode, handles not found cases, formats the data, and returns as JSON text content.
    export async function getParkDetailsHandler(args: z.infer<typeof GetParkDetailsSchema>) {
      const response = await npsApiClient.getParkByCode(args.parkCode);
      
      // Check if park was found
      if (!response.data || response.data.length === 0) {
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify({
              error: 'Park not found',
              message: `No park found with park code: ${args.parkCode}`
            }, null, 2)
          }]
        };
      }
      
      // Format the response for better readability by the AI
      const parkDetails = formatParkDetails(response.data[0]);
      
      return {
        content: [{ 
          type: "text", 
          text: JSON.stringify(parkDetails, null, 2)
        }]
      };
    } 
  • Zod input schema for the getParkDetails tool, requiring a parkCode string.
    export const GetParkDetailsSchema = z.object({
      parkCode: z.string().describe('The park code of the national park (e.g., "yose" for Yosemite, "grca" for Grand Canyon)')
    });
  • src/server.ts:48-52 (registration)
    Tool registration in the ListTools handler, defining name, description, and input schema for getParkDetails.
    {
      name: "getParkDetails",
      description: "Get detailed information about a specific national park",
      inputSchema: zodToJsonSchema(GetParkDetailsSchema),
    },
  • src/server.ts:90-93 (registration)
    Tool dispatch in the CallTool handler, parsing arguments with schema and calling the getParkDetailsHandler.
    case "getParkDetails": {
      const args = GetParkDetailsSchema.parse(request.params.arguments);
      return await getParkDetailsHandler(args);
    }
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 states the tool retrieves information, implying a read-only operation, but doesn't specify aspects like rate limits, authentication needs, error handling, or what 'detailed information' entails (e.g., format, fields). For a tool with zero annotation coverage, 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.

Conciseness5/5

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

The description is a single, clear sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy to understand at a glance.

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 low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose but lacks details on behavior, output format, or usage context beyond implied distinctions. With no output schema, it should ideally hint at return values, but the simplicity keeps it from being incomplete.

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%, with the parameter 'parkCode' well-documented in the schema (including examples like 'yose' and 'grca'). The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 without compensating for any gaps.

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 verb 'Get' and resource 'detailed information about a specific national park', making the purpose evident. It distinguishes from siblings like 'findParks' (which likely lists multiple parks) by focusing on a single park's details. However, it doesn't explicitly contrast with other siblings like 'getAlerts' or 'getCampgrounds', which prevents a perfect score.

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 implies usage when detailed info for a specific park is needed, as opposed to 'findParks' for broader searches. However, it lacks explicit guidance on when to use this tool versus alternatives like 'getAlerts' or 'getVisitorCenters', and no exclusions or prerequisites are mentioned. This leaves some ambiguity in context.

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/KyrieTangSheng/mcp-server-nationalparks'

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