Skip to main content
Glama
mattjegan

eBird MCP Server

by mattjegan

get_nearby_notable_observations

Find rare bird sightings near your location using eBird data. Specify coordinates, search radius, and time frame to discover notable observations in your area.

Instructions

Get notable/rare observations near a location.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
latYesLatitude
lngYesLongitude
backNoNumber of days back to fetch
detailNoLevel of detailsimple
distNoSearch radius in kilometers
hotspotNoOnly fetch from hotspots
max_resultsNoMaximum observations to return
spp_localeNoLanguage for common namesen

Implementation Reference

  • The handler function for the 'get_nearby_notable_observations' tool. It constructs parameters from input args, calls the shared makeRequest function to fetch notable observations near the given lat/lng from the eBird API, and returns the JSON-formatted result.
    async (args) => {
      const params: Record<string, string | number | boolean> = {
        lat: args.lat,
        lng: args.lng,
        back: args.back,
        detail: args.detail,
        dist: args.dist,
        hotspot: args.hotspot,
        sppLocale: args.spp_locale,
      };
      if (args.max_results) params.maxResults = args.max_results;
    
      const result = await makeRequest("/data/obs/geo/recent/notable", params);
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • Zod schema defining the input parameters for the tool, including required lat/lng, optional back days, detail level, distance radius, hotspot filter, max results, and species locale.
    {
      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).default(14).describe("Number of days back to fetch"),
      detail: z.enum(["simple", "full"]).default("simple").describe("Level of detail"),
      dist: z.number().min(0).max(50).default(25).describe("Search radius in kilometers"),
      hotspot: z.boolean().default(false).describe("Only fetch from hotspots"),
      max_results: z.number().min(1).max(10000).optional().describe("Maximum observations to return"),
      spp_locale: z.string().default("en").describe("Language for common names"),
    },
  • src/index.ts:221-249 (registration)
    Registration of the 'get_nearby_notable_observations' tool using McpServer.tool(), including name, description, input schema, and inline handler function.
    server.tool(
      "get_nearby_notable_observations",
      "Get notable/rare observations 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).default(14).describe("Number of days back to fetch"),
        detail: z.enum(["simple", "full"]).default("simple").describe("Level of detail"),
        dist: z.number().min(0).max(50).default(25).describe("Search radius in kilometers"),
        hotspot: z.boolean().default(false).describe("Only fetch from hotspots"),
        max_results: z.number().min(1).max(10000).optional().describe("Maximum observations to return"),
        spp_locale: z.string().default("en").describe("Language for common names"),
      },
      async (args) => {
        const params: Record<string, string | number | boolean> = {
          lat: args.lat,
          lng: args.lng,
          back: args.back,
          detail: args.detail,
          dist: args.dist,
          hotspot: args.hotspot,
          sppLocale: args.spp_locale,
        };
        if (args.max_results) params.maxResults = args.max_results;
    
        const result = await makeRequest("/data/obs/geo/recent/notable", params);
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      }
    );
  • Shared utility function used by all tools, including this one, to construct and make authenticated GET requests to the eBird API endpoints.
    async function makeRequest(endpoint: string, params: Record<string, string | number | boolean> = {}): Promise<unknown> {
      const url = new URL(`${BASE_URL}${endpoint}`);
      Object.entries(params).forEach(([key, value]) => {
        if (value !== undefined && value !== null) {
          url.searchParams.append(key, String(value));
        }
      });
    
      const response = await fetch(url.toString(), {
        headers: { "X-eBirdApiToken": API_KEY! },
      });
    
      if (!response.ok) {
        throw new Error(`eBird API error: ${response.status} ${response.statusText}`);
      }
    
      return response.json();
    }
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 'notable/rare observations' but doesn't explain what qualifies as notable/rare, how results are sorted, whether there are rate limits, or what the output format looks like. For a tool with 8 parameters and no output schema, 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, efficient sentence: 'Get notable/rare observations near a location.' It's front-loaded with the core purpose and contains no unnecessary words, making it highly concise and well-structured.

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 tool's complexity (8 parameters, no annotations, no output schema), the description is incomplete. It doesn't explain what 'notable/rare' means, how observations are returned, or any behavioral traits like pagination or error handling. For a data-fetching tool with many parameters, this leaves critical context 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?

The input schema has 100% description coverage, so parameters like 'lat', 'lng', 'back', 'detail', 'dist', 'hotspot', 'max_results', and 'spp_locale' are well-documented in the schema. The description adds no additional parameter semantics beyond implying location-based filtering. Baseline 3 is appropriate since 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: 'Get notable/rare observations near a location.' It specifies the verb ('get'), resource ('notable/rare observations'), and scope ('near a location'). However, it doesn't explicitly differentiate from sibling tools like 'get_nearby_observations' or 'get_notable_observations', which reduces clarity about its unique role.

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 no guidance on when to use this tool versus alternatives. With many sibling tools (e.g., 'get_nearby_observations', 'get_notable_observations'), there's no indication of how this tool differs in context, such as filtering for rarity or specific location-based queries. This leaves the agent without clear usage direction.

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

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