batch_predict
Pack: nationalize · Endpoint: https://gateway.pipeworx.io/nationalize/mcp
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/batch_predict for the schema, then POST the same URL with its arguments for the data.
Predict nationalities for multiple first names at once (up to 10). Returns country codes with probability scores for each name. Use to process name lists efficiently.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
names | array | yes | Array of first names to predict nationality for (maximum 10). |
items | string | no |
Example call
Arguments
{
"names": [
"Anna",
"Giuseppe",
"Fatima",
"James"
]
}
curl
curl -X POST https://gateway.pipeworx.io/nationalize/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"batch_predict","arguments":{"names":["Anna","Giuseppe","Fatima","James"]}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('batch_predict', {
"names": [
"Anna",
"Giuseppe",
"Fatima",
"James"
]
});
More examples
{
"names": [
"Jean",
"Sofia",
"Ahmed",
"Kenji",
"Lars"
]
}
Response shape
Always returns: results
| Field | Type | Description |
|---|---|---|
results | array | Array of nationality predictions for each input name |
Full JSON Schema
{
"type": "object",
"properties": {
"results": {
"type": "array",
"description": "Array of nationality predictions for each input name",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The input first name"
},
"sample_size": {
"type": "number",
"description": "Sample size from nationalize.io dataset"
},
"nationalities": {
"type": "array",
"description": "List of predicted nationalities ranked by probability",
"items": {
"type": "object",
"properties": {
"country_code": {
"type": "string",
"description": "ISO country code"
},
"probability": {
"type": "number",
"description": "Probability score between 0.0 and 1.0"
}
},
"required": [
"country_code",
"probability"
]
}
}
},
"required": [
"name",
"sample_size",
"nationalities"
]
}
}
},
"required": [
"results"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"nationalize": {
"url": "https://gateway.pipeworx.io/nationalize/mcp"
}
}
}
See Getting Started for client-specific install steps.