Available ActionsEach successful request consumes credits as outlined below.
query_trade_data5cr
Details
Access World Bank trade and competitiveness data from TCdata360 (2,400+ indicators, 46 sources) for 200+ countries. Get merchandise exports/imports, trade balances, tariff rates, high-tech and ICT export shares, Logistics Performance Index rankings, Ease of Doing Business scores, and trade-to-GDP ratios. Includes CAGR trend analysis, regional comparisons, and SDG 17 alignment tracking.
Fetch trade and competitiveness data for a country or region from the World Bank. Returns merchandise exports/imports, trade balance, tariff rates, high-tech/ICT export shares, Logistics Performance Index, Ease of Doing Business scores, trade openness ratios, CAGR trend analysis, and regional comparisons.
Fetch trade and competitiveness data for a country or region from the World Bank. Returns merchandise exports/imports, trade balance, tariff rates, high-tech/ICT export shares, Logistics Performance Index, Ease of Doing Business scores, trade openness ratios, CAGR trend analysis, and regional comparisons.
country_or_regionrequiredstring
Country or region name in English (e.g., 'China', 'Japan', 'Vietnam', 'Sub-Saharan Africa'). Also accepts partial matches and income groups ('High Income', 'OECD'). Unicode names are not supported.
trade_topicstring
Trade topic to query. Options: exports, imports, competitiveness, logistics, tariffs, trade_costs, or all.
Calculate trade balance (exports minus imports) if both merchandise export and import data are available.
Default: true
include_doing_businessboolean
Include Doing Business rankings and ease of doing business scores. Setting to false also filters out time-to-export/import and cost-to-export/import indicators.
Default: true
include_lpiboolean
Include Logistics Performance Index (LPI) scores and rankings.
Default: true
time_periodstring
Time period: 'latest' (most recent), 'last_5_years', 'last_10_years', or specific range 'YYYY:YYYY' (e.g., '2015:2020').
Default: latest
include_regional_comparisonboolean
Include regional and global comparison data (World, High Income, Upper Middle Income, Lower Middle Income) for key indicators.
Default: true
include_trendsboolean
Include trend analysis with absolute change, percent change, direction, and CAGR for indicators with multiple data points.
Login to view your API and budget keys. The example above uses placeholder values. Sign in to see personalized code with your bearer token.
Autonomous agents can access this tool through AgentAddress credit balances or direct x402 payments. Use the Autonomous Agent API reference for endpoint shapes after choosing the access pattern below.
Recommended
Credit-Based Access Using AgentAddress
AgentAddress is preferred when an autonomous agent needs persistent file access, stored platform state, or maximum tool use ability across repeated calls.
Use direct x402 for independent one-off tool calls that do not require shared files or stored platform state.
Accepted public payments
Stablecoin
USDC
Chains
Base, Arbitrum, Optimism, Polygon, and Avalanche
Direct x402 payments are not enabled for this product; use AgentAddress credit access instead.
Usage Instructions
Usage guidance provided directly by the developer for this product.
Commerce and Trade Competitiveness Data Hub
Overview
Natural language interface to World Bank trade and competitiveness data. Query exports, imports, trade balance, logistics performance, tariffs, and trade costs by country or region. Uses English country names only -- no indicator codes needed.
Data sourced from World Bank World Development Indicators (WDI) and TCdata360 (2,400+ indicators from 46 sources). Covers merchandise and service trade volumes, exports/imports as % of GDP, trade openness, Ease of Doing Business rankings, Logistics Performance Index (LPI), tariff rates, time and cost to trade, high-tech and ICT exports, and CAGR trend analysis. Includes regional/global comparisons, trade balance calculations, human-readable insights, and SDG 17 (Partnerships through Trade) alignment.
Actions
query_trade_data
Fetches trade and competitiveness data for a country or region from the World Bank.
Required parameters:
country_or_region (string): Country or region name in English (e.g., "China", "Japan", "Vietnam", "Sub-Saharan Africa"). Also accepts partial matches and income groups ("High Income", "OECD"). Unicode names are not supported. Unrecognized names return an error with a suggestion.
Optional parameters:
trade_topic (string): One of "exports", "imports", "competitiveness", "logistics", "tariffs", "trade_costs", or "all". Defaults to "all".
calculate_trade_balance (boolean): Calculate trade balance (exports minus imports) if both merchandise export and import data are available. Defaults to true.
include_doing_business (boolean): Include Doing Business rankings and ease of doing business scores. Defaults to true. Setting to false also filters out time-to-export/import and cost-to-export/import indicators.
include_lpi (boolean): Include Logistics Performance Index scores. Defaults to true. Setting to false filters out the logistics_performance indicator.
time_period (string): "latest" (most recent available), "last_5_years", "last_10_years", or a specific range "YYYY:YYYY" (e.g., "2015:2020"). Also accepts "YYYY-YYYY" format (converted to "YYYY:YYYY"). Defaults to "latest".
include_regional_comparison (boolean): Include regional and global comparison data (World, High Income, Upper Middle Income, Lower Middle Income) for key indicators. Defaults to true.
include_trends (boolean): Include trend analysis with absolute change, percent change, direction, and CAGR for indicators with multiple data points. Defaults to true.
Call query_trade_data with a country and trade_topic: "all" for a comprehensive trade overview.
Review the insights array for human-readable analysis of trade patterns.
Check trade_balance for surplus/deficit status.
Review regional_comparison to see how the country compares to World, High Income, Upper Middle Income, and Lower Middle Income averages.
Trade Balance Analysis
Call query_trade_data with calculate_trade_balance: true (default).
The response includes a trade_balance section with exports, imports, balance amount, and surplus/deficit classification for each year.
Currency values are formatted in human-readable units (millions, billions, trillions).
Competitiveness Benchmarking
Call query_trade_data with trade_topic: "competitiveness".
Review Ease of Doing Business rank (1 = best, lower is better) and LPI score (1-5 scale, higher is better).
Trade openness (trade as % of GDP) indicates how integrated the economy is with global trade.
Historical Trend Analysis
Call query_trade_data with time_period: "last_10_years" and include_trends: true.
Review the trends section for each indicator showing oldest/newest values, absolute and percent change, direction (improving/declining/stable), and CAGR.
For exports and competitiveness indicators, positive change means "improving". For tariffs, time, and cost indicators, negative change means "improving" (lower is better).
Notes
Supported countries: 100+ countries by full English name (e.g., "Vietnam", "Japan", "Germany"), plus partial name matching. Also supports 2-3 letter ISO codes if they match known World Bank codes.
Special values: "World" or "Global" for worldwide data.
Country name input longer than 100 characters is rejected.
If country_or_region is empty, defaults to "World" (WLD).
Trade topics and their indicators:
exports: merchandise exports, exports % of GDP, high-tech exports, ICT exports, service exports, time to export, cost to export
imports: merchandise imports, imports % of GDP, service imports, time to import, cost to import
competitiveness: Ease of Doing Business rank, LPI, trade % of GDP, exports/imports % of GDP
logistics: LPI score, time to export/import
tariffs: simple mean tariff rate, weighted mean tariff rate
trade_costs: time to export/import, cost to export/import, simple and weighted mean tariff rates
all: all available trade indicators
Trade balance calculation: Exports minus imports. Positive = surplus, negative = deficit, zero = balanced. Calculated by matching merchandise export and import data by year.
Currency formatting: Large values displayed in millions, billions, or trillions (e.g., "$1.23 trillion").
CAGR (Compound Annual Growth Rate): Calculated when multi-year data is available and both start and end values are positive.
Trend direction interpretation: For exports/competitiveness/logistics, positive change = "improving". For tariffs/time/cost/ease of doing business, negative change = "improving" (lower is better).
Insights generated automatically: Trade surplus/deficit, export orientation (% of GDP), trade openness, LPI interpretation (world-class/strong/moderate/developing/challenges), Doing Business rank tier, tariff level, export process efficiency, ICT export strength, export growth trends, and comparison to global averages.
Ease of Doing Business interpretation: Rank 1-30 = top-tier, 31-100 = competitive, 100+ = challenges present. Note: Doing Business project was discontinued in 2021; latest data from 2020.
Regional comparison: Compares key indicators (exports % of GDP, imports % of GDP, trade % of GDP, LPI, Ease of Doing Business) against World, High Income, Upper Middle Income, and Lower Middle Income averages.
Data availability varies by country and indicator. Most recent data is typically 1-2 years behind the current year.
SDG alignment: SDG 17 (Partnerships for the Goals), SDG 17.10 (universal trading system), SDG 17.11 (increase developing country exports).
Frequently Asked Questions
How do I connect this tool to an external agent?
You can install the local MCP server by opening a terminal and running:
After the external agent is connected to an Agent Group that can use this tool, paste this prompt into the agent:
Agent prompt
Use the AgentPMT-Tool-Search-and-Execution tool. First call action 'get_instructions' so you know how to use the tool search interface. Then call action 'get_schema' with tool_id 6980db6a71cad8f61bf5b1d4 ("Commerce and Trade Competitiveness Data Hub"). After reading the schema and any returned instructions, tell me what this tool can do, we are going to be using it
The agent should fetch the tool schema first, collect the required parameters for your request, and then call the tool through AgentPMT.
Looking for help integrating AI into your business? Set up a free consultation.