icon_autocomplete
Get autocomplete suggestions for icon search terms to help users discover related keywords and improve search accuracy.
Instructions
Get autocomplete suggestions for icon search terms. Useful for helping users discover related terms.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Partial search term to get suggestions for | |
| limit | No | Maximum number of suggestions to return |
Implementation Reference
- src/api.ts:161-176 (handler)The core handler function implementing the icon_autocomplete tool logic by making an authenticated GET request to the Noun Project autocomplete API endpoint.async autocomplete(params: AutocompleteParams) { const queryParams = new URLSearchParams({ query: params.query, ...(params.limit ? { limit: String(params.limit) } : {}), }); const url = `${BASE_URL}/v2/icon/autocomplete?${queryParams}`; const headers = this.oauth.getHeaders(url); const response = await this.client.get('/v2/icon/autocomplete', { params: Object.fromEntries(queryParams), headers, }); return response.data; }
- src/index.ts:102-112 (handler)MCP server handler dispatch for the icon_autocomplete tool, calling the API method and formatting the response.case 'icon_autocomplete': { const result = await api.autocomplete(args as any); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/tools.ts:130-148 (schema)Tool schema definition including name, description, and input schema for the icon_autocomplete tool.{ name: 'icon_autocomplete', description: 'Get autocomplete suggestions for icon search terms. Useful for helping users discover related terms.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Partial search term to get suggestions for', }, limit: { type: 'number', description: 'Maximum number of suggestions to return', }, }, required: ['query'], }, },
- src/api.ts:38-41 (schema)TypeScript interface defining the parameters for the autocomplete function.export interface AutocompleteParams { query: string; limit?: number; }