Skip to main content
Glama
mattjegan

eBird MCP Server

by mattjegan

get_notable_observations

Retrieve recent notable and rare bird sightings in a specified region using eBird data. Filter by date range, location type, and detail level to track uncommon species observations.

Instructions

Get recent notable/rare bird observations in a region. Notable observations are for locally or nationally rare species.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_codeYesCountry, subnational1, subnational2, or location code
backNoNumber of days back to fetch
detailNoLevel of detail in responsesimple
hotspotNoOnly fetch from hotspots
max_resultsNoMaximum observations to return
spp_localeNoLanguage for common namesen

Implementation Reference

  • The handler function executes the tool logic by constructing parameters and calling the makeRequest helper to fetch notable observations from the eBird API, then returns the JSON-formatted result.
    async (args) => {
      const params: Record<string, string | number | boolean> = {
        back: args.back,
        detail: args.detail,
        hotspot: args.hotspot,
        sppLocale: args.spp_locale,
      };
      if (args.max_results) params.maxResults = args.max_results;
    
      const result = await makeRequest(`/data/obs/${args.region_code}/recent/notable`, params);
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • Zod schema defining the input parameters for the get_notable_observations tool.
    {
      region_code: z.string().describe("Country, subnational1, subnational2, or location code"),
      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 in response"),
      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:74-97 (registration)
    Registration of the 'get_notable_observations' tool on the MCP server, including name, description, schema, and handler.
    server.tool(
      "get_notable_observations",
      "Get recent notable/rare bird observations in a region. Notable observations are for locally or nationally rare species.",
      {
        region_code: z.string().describe("Country, subnational1, subnational2, or location code"),
        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 in response"),
        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> = {
          back: args.back,
          detail: args.detail,
          hotspot: args.hotspot,
          sppLocale: args.spp_locale,
        };
        if (args.max_results) params.maxResults = args.max_results;
    
        const result = await makeRequest(`/data/obs/${args.region_code}/recent/notable`, params);
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      }
    );
  • Shared helper function used by the tool to make authenticated HTTP requests to the eBird API.
    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 full burden. It mentions 'recent' and defines 'notable observations' but doesn't disclose critical behavioral traits: whether this is a read-only operation, rate limits, authentication needs, pagination behavior, or what format the response returns. For a tool with 6 parameters and no output schema, this is inadequate.

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 efficiently structured in two sentences: the first states the core purpose, the second defines 'notable observations'. There's no wasted text, though it could be more front-loaded with additional context.

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 (6 parameters, no output schema, no annotations), the description is incomplete. It doesn't explain what constitutes 'notable/rare', how results are sorted/limited, error conditions, or return format. The agent lacks sufficient context to use this tool effectively beyond basic parameter passing.

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%, so all parameters are documented in the schema. The description adds no parameter-specific information beyond what's already in the schema (e.g., it doesn't clarify 'region_code' formats or 'notable' criteria). Baseline 3 is appropriate when 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 recent notable/rare bird observations in a region' with a specific verb ('Get'), resource ('notable/rare bird observations'), and scope ('in a region'). It distinguishes from generic observation tools by specifying 'notable/rare' but doesn't explicitly differentiate from sibling 'get_nearby_notable_observations'.

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. It doesn't mention any of the 22 sibling tools, nor does it specify prerequisites, exclusions, or comparative contexts. The agent must infer usage from the tool name alone.

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