Skip to main content
Glama
knustx

ITIS MCP Server

by knustx

autocomplete_search

Find organisms in the ITIS database by entering partial scientific names to get autocomplete suggestions for accurate taxonomic searches.

Instructions

Search for organisms with autocomplete functionality using partial names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
partialNameYesPartial scientific name for autocomplete (e.g., "Homo", "Quer")
rowsNoNumber of results to return (default: 10)

Implementation Reference

  • Handler for executing the autocomplete_search tool: extracts parameters, calls ITIS client method, formats response with suggestions.
    case 'autocomplete_search': { const { partialName, rows } = args as any; const result = await itisClient.searchWithAutocomplete(partialName, { rows }); return { content: [ { type: 'text', text: JSON.stringify({ partialName, totalResults: result.response.numFound, suggestions: result.response.docs.map((doc: any) => ({ tsn: doc.tsn, name: doc.nameWInd, kingdom: doc.kingdom, rank: doc.rank, })), }, null, 2), }, ], }; }
  • Tool schema defining name, description, and input parameters for autocomplete_search.
    { name: 'autocomplete_search', description: 'Search for organisms with autocomplete functionality using partial names.', inputSchema: { type: 'object', properties: { partialName: { type: 'string', description: 'Partial scientific name for autocomplete (e.g., "Homo", "Quer")', }, rows: { type: 'number', description: 'Number of results to return (default: 10)', }, }, required: ['partialName'], }, },
  • Core helper method implementing autocomplete logic by constructing SOLR wildcard query on scientific names.
    async searchWithAutocomplete(partialName: string, options: Partial<ITISSearchOptions> = {}): Promise<ITISResponse> { return this.search({ ...options, query: `nameWInd:${partialName}*`, sort: 'nameWInd asc' }); }
  • src/tools.ts:261-265 (registration)
    Registration of available tools list including autocomplete_search for MCP ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/knustx/itis-mcp-server'

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