Skip to main content
Glama

Predict Nationality

predict_nationality
Read-onlyIdempotent

Predict likely nationalities from a first name. Returns up to 5 country codes ranked by probability (0.0-1.0). Use when inferring someone's origin from their given name.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "Maria"
    },
    "name": "predict_nationality"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesFirst name to predict nationality for.

Output Schema

NameRequiredDescriptionDefault
nameYesThe input first name
sample_sizeYesSample size from nationalize.io dataset
nationalitiesYesList of predicted nationalities ranked by probability

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "name": {
      +      "description": "The input first name",
      +      "type": "string"
      +    },
      +    "nationalities": {
      +      "description": "List of predicted nationalities ranked by probability",
      +      "items": {
      +        "properties": {
      +          "country_code": {
      +            "description": "ISO country code",
      +            "type": "string"
      +          },
      +          "probability": {
      +            "description": "Probability score between 0.0 and 1.0",
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "country_code",
      +          "probability"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "sample_size": {
      +      "description": "Sample size from nationalize.io dataset",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "sample_size",
      +    "nationalities"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "name": "Maria"
      +  },
      +  {
      +    "name": "Yuki"
      +  }
      +]
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, open-world, and non-destructive behavior. The description adds useful output behavior: up to five country codes ranked by probability on a 0.0-1.0 scale, which goes beyond the annotations. It could additionally note accuracy or probabilistic limitations, but the core behavior is disclosed.

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?

The description is two sentences, front-loaded with the purpose and followed by output shape and usage guidance. Every sentence contributes useful information with no redundancy.

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

Completeness5/5

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

For a simple one-parameter prediction tool with annotations and an output schema, the description covers purpose, input type, output range, and when to use it. Nothing essential for correct invocation is missing.

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

Parameters3/5

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

The single parameter is fully documented in the schema (100% coverage), and both schema and description say it is a first name. The description adds no extra meaning such as format expectations, casing, or full-name handling, so baseline 3 is appropriate.

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

Purpose4/5

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

The description states a specific verb and resource ('Predict likely nationalities from a first name') and clarifies the input is a given name. It does not explicitly distinguish this tool from the sibling 'batch_predict', leaving minor ambiguity about single vs. batch use.

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

Usage Guidelines4/5

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

It gives a clear usage context ('Use when inferring someone's origin from their given name') but does not mention when not to use it or name alternatives such as batch_predict. The guidance is sufficient for a single-purpose utility, though not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.