Skip to main content
Glama

get_taxonomy_versions

Retrieve available taxonomy versions from the eBird API to ensure accurate bird species identification and data consistency.

Instructions

Get all available taxonomy versions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the get_taxonomy_versions tool. It makes an API request to fetch taxonomy versions and returns the result as JSON-formatted text content.
    async () => { const result = await makeRequest("/ref/taxonomy/versions"); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; }
  • Empty Zod schema indicating the tool takes no input parameters.
    {},
  • src/index.ts:502-510 (registration)
    Registration of the get_taxonomy_versions tool using McpServer.tool() with description, schema, and inline handler.
    server.tool( "get_taxonomy_versions", "Get all available taxonomy versions.", {}, async () => { const result = await makeRequest("/ref/taxonomy/versions"); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } );
  • Shared helper function used by the handler 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(); }

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