search_countries
Find country information by searching with partial names. Returns paginated results for geographic data lookup.
Instructions
Search countries by name (e.g. "arg" finds Argentina). Returns paginated matches.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Search query (partial name match) | |
| page | No | ||
| limit | No |
Implementation Reference
- src/tools/countries.ts:39-54 (handler)The 'search_countries' tool implementation, including schema definition and request handler that calls the geo search API.
server.tool( 'search_countries', 'Search countries by name (e.g. "arg" finds Argentina). Returns paginated matches.', { q: z.string().min(1).describe('Search query (partial name match)'), page: z.number().int().positive().optional(), limit: z.number().int().min(1).max(100).optional(), }, async ({ q, page, limit }) => { const params = new URLSearchParams({ q }); if (page) params.set('page', String(page)); if (limit) params.set('limit', String(limit)); const data = await apiGet(`/v1/api/geo/countries/search?${params}`); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] }; } );