Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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.'
      };
    }
  • 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;
  • The CANONICAL_COUNTRIES constant that provides the static data (Canada and USA) returned by the get_countries tool.
    export const CANONICAL_COUNTRIES = [
      'Canada', 'USA'
    ];
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It adds valuable behavioral context by disclosing the limited dataset ('Currently supports Canada and USA'). However, it omits other behavioral traits like caching, return format structure, or whether results are static/dynamic.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero waste: first establishes purpose and usage context, second provides current limitations. Information is front-loaded and appropriately sized for a simple enumeration tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter lookup tool, the description adequately covers purpose and data constraints. Minor gap: does not specify return format (e.g., ISO codes vs full names) despite lack of output schema, though 'Canada and USA' provides a reasonable hint.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema contains zero parameters, establishing a baseline of 4. The description appropriately does not mention parameters since none exist, maintaining the baseline without adding or subtracting value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses specific verb 'List' with resource 'countries of origin' and explicitly distinguishes from sibling get_categories by specifying the domain (countries vs categories). The scope is further clarified by 'Currently supports Canada and USA'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides implied usage context by stating countries 'can be used to filter products and brands,' which hints at using this before search_products/search_brands. However, lacks explicit when-to-use vs when-not-to-use guidance or direct comparison to sibling tools like get_categories.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/chhavimishra/originselect-mcp-server'

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