Skip to main content
Glama
mattjegan

eBird MCP Server

by mattjegan

get_nearby_hotspots

Find birding hotspots near specific coordinates using eBird data. Specify location, search radius, and recent activity to discover optimal birdwatching sites.

Instructions

Get birding hotspots near a location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYesLatitude
lngYesLongitude
backNoOnly hotspots visited in last N days
distNoSearch radius in kilometers
fmtNoResponse formatjson

Implementation Reference

  • The asynchronous handler function for the 'get_nearby_hotspots' tool. It constructs query parameters from the input arguments (lat, lng, dist, fmt, and optional back), makes an HTTP request to the '/ref/hotspot/geo' endpoint using the makeRequest helper, and returns the result as a JSON-formatted text content block.
    async (args) => { const params: Record<string, string | number | boolean> = { lat: args.lat, lng: args.lng, dist: args.dist, fmt: args.fmt, }; if (args.back) params.back = args.back; const result = await makeRequest("/ref/hotspot/geo", params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; }
  • Zod input schema validating and describing the tool parameters: latitude, longitude, optional back days, distance radius (default 25km), and response format (json or csv, default json).
    { lat: z.number().min(-90).max(90).describe("Latitude"), lng: z.number().min(-180).max(180).describe("Longitude"), back: z.number().min(1).max(30).optional().describe("Only hotspots visited in last N days"), dist: z.number().min(0).max(500).default(25).describe("Search radius in kilometers"), fmt: z.enum(["json", "csv"]).default("json").describe("Response format"), },
  • src/index.ts:417-438 (registration)
    The server.tool() call that registers the 'get_nearby_hotspots' tool with its name, description, input schema, and handler function.
    "get_nearby_hotspots", "Get birding hotspots near a location.", { lat: z.number().min(-90).max(90).describe("Latitude"), lng: z.number().min(-180).max(180).describe("Longitude"), back: z.number().min(1).max(30).optional().describe("Only hotspots visited in last N days"), dist: z.number().min(0).max(500).default(25).describe("Search radius in kilometers"), fmt: z.enum(["json", "csv"]).default("json").describe("Response format"), }, async (args) => { const params: Record<string, string | number | boolean> = { lat: args.lat, lng: args.lng, dist: args.dist, fmt: args.fmt, }; if (args.back) params.back = args.back; const result = await makeRequest("/ref/hotspot/geo", params); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } );

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/mattjegan/ebird-mcp'

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