Skip to main content
Glama

National Parks MCP Server

import { z } from 'zod'; import { GetParkDetailsSchema } from '../schemas.js'; import { npsApiClient } from '../utils/npsApiClient.js'; import { formatParkDetails } from '../formatters.js'; 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) }] }; }

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