get_countries
Retrieve supported origin countries to filter ethical products and brands. Access Canada and USA options for origin-verified shopping results.
Instructions
List all supported countries of origin that can be used to filter products and brands. Currently supports Canada and USA.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_countries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/staticData.js:54-60 (handler)The handleGetCountries function that executes the tool logic. Returns an object containing the list of canonical countries, total count, and usage instructions.
export function handleGetCountries() { return { countries: CANONICAL_COUNTRIES, total: CANONICAL_COUNTRIES.length, usage: 'Pass a country name in the "country" field when calling search_products or search_brands.' }; } - src/tools/staticData.js:45-52 (schema)The getCountriesTool object defining the tool schema with name, description, and inputSchema for the get_countries tool.
export const getCountriesTool = { name: 'get_countries', description: 'List all supported countries of origin that can be used to filter products and brands. Currently supports Canada and USA.', inputSchema: { type: 'object', properties: {} } }; - src/index.js:59-68 (registration)Registration of getCountriesTool in the ListTools handler, making it available to MCP clients.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ searchProductsTool, searchBrandsTool, refineSearchTool, getValuesTool, getCategoriesTool, getCountriesTool ] })); - src/index.js:98-100 (registration)The switch case in CallTool handler that routes get_countries calls to handleGetCountries function.
case 'get_countries': result = handleGetCountries(); break; - src/types.js:13-15 (helper)The CANONICAL_COUNTRIES constant that provides the static data (Canada and USA) returned by the get_countries tool.
export const CANONICAL_COUNTRIES = [ 'Canada', 'USA' ];