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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFirst name to predict nationality for.

Output Schema

TableJSON 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.3/5.0
Behavior4/5

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

The annotations already declare readOnly, openWorld, idempotent, and non-destructive behavior. The description adds valuable context about the output format (ranked country codes with probability range), which is not captured by the annotations.

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, directly states the primary function, and includes critical output details. No unnecessary words or repetition.

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?

Given the tool's simplicity (single parameter) and the presence of an output schema, the description is complete. It covers purpose, usage, and output format, while annotations cover safety. No additional context is needed.

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?

Schema coverage is 100%, so the schema fully documents the 'name' parameter. The description does not add additional semantic meaning beyond the schema, but it does reinforce that the input is a first name, matching the schema description. This aligns with the baseline of 3 for full schema coverage.

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 clearly states the tool's action ('Predict likely nationalities from a first name') and specifies the output (up to 5 country codes ranked by probability). This is a specific verb+resource combination that distinguishes it from other tools in the sibling list.

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?

The description includes a direct usage instruction: 'Use when inferring someone's origin from their given name.' This provides clear context for when to use the tool, though it does not mention specific alternatives or exclusions.

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.