search_players
Pack: nba · Endpoint: https://gateway.pipeworx.io/nba/mcp
Search for NBA players by name. Returns position, height, weight, college, and current team. Use get_player with the player ID for detailed stats and career history.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Player name or partial name to search for |
limit | number | no | Number of results to return (default: 10, max: 100) |
_apiKey | string | yes | BallDontLie API key |
Example call
Arguments
{
"query": "LeBron James",
"_apiKey": "your-nba-api-key"
}
curl
curl -X POST https://gateway.pipeworx.io/nba/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_players","arguments":{"query":"LeBron James","_apiKey":"your-nba-api-key"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('search_players', {
"query": "LeBron James",
"_apiKey": "your-nba-api-key"
});
More examples
{
"query": "Luka",
"limit": 5,
"_apiKey": "your-nba-api-key"
}
Response shape
Always returns: query, total, returned, players
| Field | Type | Description |
|---|---|---|
query | string | Search query for player names |
total | number | Total count of matching players |
returned | number | Number of players returned in this response |
players | array | List of matching players |
Full JSON Schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query for player names"
},
"total": {
"type": "number",
"description": "Total count of matching players"
},
"returned": {
"type": "number",
"description": "Number of players returned in this response"
},
"players": {
"type": "array",
"description": "List of matching players",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Player ID"
},
"name": {
"type": "string",
"description": "Full name (first + last)"
},
"position": {
"type": [
"string",
"null"
],
"description": "Player position"
},
"height": {
"type": [
"string",
"null"
],
"description": "Player height"
},
"weight": {
"type": [
"string",
"null"
],
"description": "Player weight"
},
"jersey_number": {
"type": [
"string",
"null"
],
"description": "Jersey number"
},
"college": {
"type": [
"string",
"null"
],
"description": "College attended"
},
"country": {
"type": [
"string",
"null"
],
"description": "Country of origin"
},
"draft_year": {
"type": [
"number",
"null"
],
"description": "Year drafted"
},
"draft_round": {
"type": [
"number",
"null"
],
"description": "Draft round"
},
"draft_number": {
"type": [
"number",
"null"
],
"description": "Draft pick number"
},
"team": {
"type": [
"object",
"null"
],
"description": "Current team information",
"properties": {
"id": {
"type": "number",
"description": "Team ID"
},
"full_name": {
"type": "string",
"description": "Full team name"
},
"abbreviation": {
"type": "string",
"description": "Team abbreviation"
},
"city": {
"type": "string",
"description": "Team city"
},
"name": {
"type": "string",
"description": "Team name"
},
"conference": {
"type": "string",
"description": "Conference (East/West)"
},
"division": {
"type": "string",
"description": "Division name"
}
}
}
}
}
}
},
"required": [
"query",
"total",
"returned",
"players"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"nba": {
"url": "https://gateway.pipeworx.io/nba/mcp"
}
}
}
See Getting Started for client-specific install steps.