Overview
Theget_resource tool fetches specific GDELT table schemas or code references on demand. It’s designed for answering user questions about tables, columns, or valid codes without needing to call prepare_gdelt_query.
This tool provides quick access to individual resources. For building queries, use
prepare_gdelt_query which bundles multiple resources together.When to use
Useget_resource when:
- A user asks “What columns are in the events table?”
- A user asks “What does event code 14 mean?”
- A user asks “Show me all country codes”
- You need to reference a specific schema or code catalog
- Answering documentation or reference questions
prepare_gdelt_query instead, which provides targeted schemas and codes based on your query needs.
Parameters
Resource to fetch. Choose from 19 available resources: 9 table schemas + 10 code references.Table schemas:
gdelt_events- WHO-WHAT-WHERE-WHEN structured eventsgdelt_mentions- Event-to-article bridge tablemv_event_mention_stats- Pre-aggregated coverage metricsgdelt_gkg_themes_extracted- Topic/theme filteringgdelt_gkg_persons_extracted- Person mentionsgdelt_gkg_organizations_extracted- Organization mentionsgdelt_gkg_locations_extracted- Location mentions with coordinatesgdelt_persons_master- Historical person tracking (all-time)gdelt_organizations_master- Historical org tracking (all-time)
cameo_country_codes- ISO-3 country codes for actor filtering (USA, CHN, GBR)fips_country_codes- FIPS 2-char codes for location filtering (US, CH, UK)cameo_type_codes- Actor types (GOV, MIL, COP, EDU, etc.)cameo_known_groups- International organizations (NATO, UN, EU, etc.)cameo_ethnic_codes- Ethnic group classificationscameo_religion_codes- Religious affiliationscameo_event_codes- CAMEO event taxonomy (01-20 root codes)goldstein_scale- Event intensity mapping (-10 to +10)theme_gdelt_taxonomy- GDELT theme codes (ENV_, ECON_, etc.)theme_crisislex- Crisis/disaster terms
Response
Returns complete schema or code reference as a formatted string with: For table schemas:- Column names and data types
- Column descriptions
- Sample values
- Query patterns and tips
- Complete code lists
- Code descriptions
- Usage context
- Filtering examples
Resources are returned in full without truncation, making them ideal for comprehensive reference.
Usage examples
Common use cases
Answering schema questions
User asks: “What columns are available in the events table?”Explaining codes
User asks: “What event codes are available for filtering?”Understanding metrics
User asks: “How does the Goldstein scale work?”Exploring themes
User asks: “What themes can I filter by?”Resource catalog
Table Schemas (9 resources)
Table Schemas (9 resources)
gdelt_events
Core events table with WHO-WHAT-WHERE-WHEN structure. Includes actors, event codes, locations, dates, and Goldstein scale.Key columns: event_id, day, actor1_name, actor2_name, event_code, goldstein_scale, source_urlSpeed: Very fast (< 1s for recent queries)gdelt_mentions
Bridge table connecting events to GKG articles. Tracks which articles mention which events.Key columns: event_id, day, mention_identifier, mention_time_date, confidenceUse for: Coverage analysis, finding articles about specific eventsmv_event_mention_stats
Pre-aggregated materialized view with coverage metrics per event.Key columns: event_id, day, mention_count, source_count, avg_toneSpeed: Fastest (< 0.5s), use for trending/viral event detectiongdelt_gkg_themes_extracted
Theme codes extracted from GKG articles for topic filtering.Key columns: day, document_identifier, theme, toneUse for: Topic-based article filtering (ENV_, ECON_, HEALTH_*, etc.)gdelt_gkg_persons_extracted
Person names mentioned in articles.Key columns: day, document_identifier, person_name, char_offsetUse for: Tracking mentions of specific individualsgdelt_gkg_organizations_extracted
Organization names mentioned in articles.Key columns: day, document_identifier, organization_name, char_offsetUse for: Tracking mentions of companies, institutions, NGOsgdelt_gkg_locations_extracted
Geographic locations mentioned in articles with coordinates.Key columns: day, document_identifier, location_name, country_code, latitude, longitudeUse for: Geographic analysis, mapping article mentionsgdelt_persons_master
Historical person tracking across all time (no 30-day limit).Key columns: person_name, first_seen, last_seen, mention_countUse for: Long-term person tracking, historical analysisgdelt_organizations_master
Historical organization tracking across all time (no 30-day limit).Key columns: organization_name, first_seen, last_seen, mention_countUse for: Long-term org tracking, institutional analysisCode References (10 resources)
Code References (10 resources)
cameo_country_codes
ISO-3 country codes for filtering WHO (actors) in events.Format: USA, CHN, GBR, FRA, RUS, etc.Use with: actor1_country_code, actor2_country_code in gdelt_eventsfips_country_codes
FIPS 2-character country codes for filtering WHERE (locations).Format: US, CH, UK, FR, RS, etc.Use with: *_geo_country_code in gdelt_events, country_code in gdelt_gkg_locations_extractedcameo_type_codes
Actor classification codes for organizational types.Examples: GOV, MIL, COP, EDU, MED, BUS, REL, etc.Use with: actor_type1_code, actor_type2_code, actor*_type3_codecameo_known_groups
International organization and known group codes.Examples: NATO, UN, EU, ASEAN, BRICS, etc.Use with: actor*_known_group_code (high precision, low recall)cameo_ethnic_codes
Ethnic group classification codes.Note: Sparse field, use as secondary filterUse with: actor*_ethnic_codecameo_religion_codes
Religious affiliation codes.Note: Sparse field, use as secondary filterUse with: actor_religion1_code, actor_religion2_codecameo_event_codes
Complete CAMEO event taxonomy (01-20 root codes).Root codes:- 01: Make public statement
- 02: Appeal
- 03: Express intent to cooperate
- 04: Consult
- 05: Engage in diplomatic cooperation
- 06: Engage in material cooperation
- 07: Provide aid
- 08: Yield
- 09: Investigate
- 10: Demand
- 11: Disapprove
- 12: Reject
- 13: Threaten
- 14: Protest
- 15: Exhibit force posture
- 16: Reduce relations
- 17: Coerce
- 18: Assault
- 19: Fight
- 20: Use unconventional mass violence
goldstein_scale
Event intensity scale from -10 (most negative) to +10 (most positive).Natural language mapping:- -10 to -7: Violent conflict
- -6 to -4: Non-violent conflict
- -3 to -1: Mild conflict
- 0: Neutral
- +1 to +2: Mild cooperation
- +3 to +6: Material cooperation
- +7 to +10: Strong cooperation
theme_gdelt_taxonomy
GDELT Global Knowledge Graph theme taxonomy.Categories:- ENV_* - Environment (ENV_CLIMATECHANGE, ENV_DISASTER, etc.)
- ECON_* - Economy (ECON_INFLATION, ECON_TRADE, etc.)
- CONFLICT_* - Conflict (CONFLICT_MILITARY, CONFLICT_TERRORISM, etc.)
- GOV_* - Governance (GOV_ELECTION, GOV_CORRUPTION, etc.)
- HEALTH_* - Health (HEALTH_PANDEMIC, HEALTH_POLICY, etc.)
- WB_* - World Bank indicators
- UNGP_* - UN Global Pulse themes
theme_crisislex
CrisisLex terms for crisis and disaster event filtering.Coverage:- Casualties and injuries
- Evacuations and displacement
- Infrastructure damage
- Relief and aid efforts
- Emergency response
Resource URIs
Resources are also available directly via MCP resource URIs: Table schemas:gdelt://schema/eventsgdelt://schema/mentionsgdelt://schema/event-mention-statsgdelt://schema/themes-extractedgdelt://schema/persons-extractedgdelt://schema/organizations-extractedgdelt://schema/locations-extractedgdelt://schema/persons-mastergdelt://schema/organizations-master
gdelt://codes/cameo-countrygdelt://codes/fips-countrygdelt://codes/cameo-typegdelt://codes/cameo-known-groupsgdelt://codes/cameo-ethnicgdelt://codes/cameo-religiongdelt://codes/cameo-eventgdelt://codes/goldstein-scalegdelt://codes/theme-gdelt-taxonomygdelt://codes/theme-crisislex
Best practices
Resources are comprehensive - Every resource returns complete information without truncation or pagination.
Comparison with prepare_gdelt_query
| Feature | get_resource | prepare_gdelt_query |
|---|---|---|
| Purpose | Reference lookup | Query preparation |
| Returns | Single resource | Multiple resources + guidance |
| Use case | Answering questions | Building queries |
| Performance | Fast, targeted | Fast, bundled |
| JOIN guidance | No | Yes |
| Code filtering | No | Yes (via flags) |
Rule of thumb: Use
get_resource for documentation, use prepare_gdelt_query for query workflows.Example workflows
Documentation assistant
User: “What columns are in the themes table?”Code lookup
User: “What’s the event code for protests?”Scale interpretation
User: “How negative is a Goldstein scale of -8?”Theme exploration
User: “Can I filter by environmental themes?”Error handling
Invalid resource name
Invalid resource name
Error: Resource ‘xyz’ not foundSolution: Use only the 19 valid resource names listed in the parameters section. Check spelling carefully.Common mistakes:
events→ correct isgdelt_eventscountry_codes→ specify eithercameo_country_codesorfips_country_codesthemes→ correct isgdelt_gkg_themes_extracted(for schema) ortheme_gdelt_taxonomy(for codes)
Authentication error
Authentication error
Error: “Authentication required”Solution: Ensure your bearer token is properly configured. See authentication guide.

