Skip to main content
Glama
mattjegan

eBird MCP Server

by mattjegan

get_top_100

Retrieve the top 100 bird observation contributors for a specific date and region, ranking by species or checklist counts using eBird data.

Instructions

Get the top 100 contributors on a given date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
region_codeYesCountry or subnational1 code
yearYesYear
monthYesMonth
dayYesDay of month
ranked_byNo'spp' for species count, 'cl' for checklist countspp
max_resultsNoLimit results

Implementation Reference

  • The handler function for the 'get_top_100' tool. It constructs parameters, makes an API request to retrieve top 100 contributors for a specific date and region, and returns the result as formatted JSON.
    async (args) => {
      const params: Record<string, string | number | boolean> = { rankedBy: args.ranked_by };
      if (args.max_results) params.maxResults = args.max_results;
    
      const result = await makeRequest(`/product/top100/${args.region_code}/${args.year}/${args.month}/${args.day}`, params);
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • Zod schema defining the input parameters for the 'get_top_100' tool, including region, date components, ranking metric, and optional max results.
    {
      region_code: z.string().describe("Country or subnational1 code"),
      year: z.number().min(1800).describe("Year"),
      month: z.number().min(1).max(12).describe("Month"),
      day: z.number().min(1).max(31).describe("Day of month"),
      ranked_by: z.enum(["spp", "cl"]).default("spp").describe("'spp' for species count, 'cl' for checklist count"),
      max_results: z.number().min(1).max(100).optional().describe("Limit results"),
    },
  • src/index.ts:287-305 (registration)
    The server.tool call that registers the 'get_top_100' tool with its description, input schema, and handler function.
    server.tool(
      "get_top_100",
      "Get the top 100 contributors on a given date.",
      {
        region_code: z.string().describe("Country or subnational1 code"),
        year: z.number().min(1800).describe("Year"),
        month: z.number().min(1).max(12).describe("Month"),
        day: z.number().min(1).max(31).describe("Day of month"),
        ranked_by: z.enum(["spp", "cl"]).default("spp").describe("'spp' for species count, 'cl' for checklist count"),
        max_results: z.number().min(1).max(100).optional().describe("Limit results"),
      },
      async (args) => {
        const params: Record<string, string | number | boolean> = { rankedBy: args.ranked_by };
        if (args.max_results) params.maxResults = args.max_results;
    
        const result = await makeRequest(`/product/top100/${args.region_code}/${args.year}/${args.month}/${args.day}`, 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