Skip to main content
Glama

Search GDELT Sentences

gdelt_search_sentences
Read-only

Search the sentences of the last 72 hours of English-language news coverage with the GDELT Context 2.0 API, to read what coverage actually said. Every query term must fall inside one sentence; each match returns that sentence, the text around it, and its article URL, title, domain, and seen date — one sentence per article. Matches come newest first (dateDesc) or oldest first (dateAsc); there is no relevance ranking. maxRecords counts matching sentences before GDELT keeps one per article, so pages run short, and a page that is not every match hands back continuationWindow, the startDatetime/endDatetime that reaches the next matches. GDELT reads window bounds only to the minute, so a page whose matches all fall in one minute cannot be continued inside it: raise maxRecords, and at its 200 ceiling continuationWindow skips past that minute. Query operators: phrases ("bird flu"), OR groups ((ukraine OR gaza) ceasefire), -term to exclude an exact word, near5:"trump putin", and repeat2:"ukraine"; quotesOnly keeps sentences holding a quotation mark. For the DOC-only filters (sourcecountry:, sourcelang:, theme:, tone), domain filtering, other languages, or coverage older than 72 hours, use gdelt_search_articles.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "gdelt_search_sentences"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNodateDesc (default) returns the newest matches first, dateAsc the oldest. The Context API has no relevance order.dateDesc
queryYesWords and phrases that must all appear in one sentence. Supports phrases ("bird flu"), OR groups ((ukraine OR gaza) ceasefire), -term to exclude an exact word (-russia still matches "Russian"), near5:"trump putin" (words within about five words of each other), and repeat2:"ukraine" (a word at least twice). GDELT refuses the DOC-only operators sourcecountry:, sourcelang:, theme:, and tone here.
timespanNoWindow counting back from now: a whole number followed by min, h, hours, d, or days, in any case, from 31min to 72h (e.g. "6h", "3days"). A longer one runs as 72h with a windowClamp disclosure; a shorter one, or another unit such as w or m, is refused. Defaults to 72h. Ignored when startDatetime/endDatetime are set.
maxRecordsNoMatching sentences to request. Defaults to 25. GDELT counts sentences before keeping one per article, so a page usually holds fewer matches; follow continuationWindow for the rest. Values above 200 run at 200 with a limitClamp disclosure unless clamping is disabled.
quotesOnlyNoKeep only sentences holding a quotation mark. The sentence may hold only part of a longer quotation.
endDatetimeNoEnd of an explicit window in GDELT format YYYYMMDDHHMMSS (UTC, exactly 14 digits). Must pair with startDatetime. A window ending before the last 72 hours is refused.
startDatetimeNoStart of an explicit window in GDELT format YYYYMMDDHHMMSS (UTC, exactly 14 digits). Must pair with endDatetime. A start older than 72 hours runs from 5 minutes inside the reach, disclosed in windowClamp. A window under 60 minutes goes upstream widened, and matches outside it are dropped.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoWhen the query's terms were joined by OR outside parentheses, the grouped query that ran. Guidance on this page: when nothing matched, how to broaden the query or window; when GDELT returned matches outside an explicit window — it reads window bounds only to the minute, and a window under 60 minutes goes out widened — how many were dropped; when continuationWindow is present, that this page is not every match; when the page reached past the far edge of its window, that it holds every match in it; and when no narrower window reaches further matches, why, and whether a larger maxRecords helps — or, at the 200 ceiling, that continuationWindow skips the rest of the one minute every match on the page fell in.
matchesNoOne matching sentence per article, in the requested date order.
timespanNoThe timespan the request ran with: the one sent, trimmed, or 72h when none was sent or a longer one was clamped. Absent when startDatetime/endDatetime were used.
limitClampNoPresent only when the requested count exceeded the per-call cap: the call ran exactly as a call at the cap, and every count, notice, and continuation in this response reflects the applied value.
totalCountNoNumber of matches returned in this response.
windowClampNoPresent only when the requested window reached further back than the API searches: the search ran on the applied window instead, and every count, notice, and continuation in this response reflects it. Absent when the search ran on the window requested.
staleResponseNoPresent only when the refetch of this exact request was refused, failed, or came back empty, and the response is GDELT's stored answer from fetchedAt instead. It holds nothing published after fetchedAt; a relative timespan covers the window ending at fetchedAt, not now. Absent on a live answer.
effectiveQueryNoThe query the call ran, for use in follow-up calls: the query given or, when it only joins terms with OR outside parentheses, those terms as one group.
continuationWindowNoThe window that reaches the next matches: re-run the same call with these as startDatetime and endDatetime. GDELT reads window bounds only to the minute, so under dateDesc it ends on the whole minute at or after the oldest match on this page and under dateAsc starts on the whole minute at or before the newest; matches seen in that minute can repeat — de-duplicate by url. On a page at the 200 maxRecords ceiling whose matches all fall in one minute, it skips past that minute instead, since no window reaches the rest of it. Absent on an empty page, on a page that holds every match in its window, and when no narrower window reaches further matches.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / effectiveQuery / description
      Previous value: -"Echoed query string for use in follow-up calls."New value: +"The query the call ran, for use in follow-up calls: the query given or, when it only joins terms with OR outside parentheses, those terms as one group."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `invalid_date_range`: Only one of startDatetime / endDatetime was supplied, one of them is not a real UTC calendar timestamp, startDatetime is not earlier than endDatetime or not in the past, or the window ends before the last 72 hours the Context API searches. `invalid_query`: GDELT rejected the query — a DOC-only operator, sourcelang:, an overly short, long, or common keyword, or malformed syntax — or the timespan is not a whole number followed by min, h, hours, d, or days, or is shorter than 31 minutes. `gdelt_rate_limited`: GDELT rejected the request for its one-request-per-five-seconds limit, or too many requests were already queued for this one to start in time. `gdelt_unavailable`: GDELT Context API is unreachable or temporarily returned no usable data. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `invalid_date_range`: Only one of startDatetime / endDatetime was supplied, one of them is not a real UTC calendar timestamp, startDatetime is not earlier than endDatetime or not in the past, or the window ends before the last 72 hours the Context API searches. `invalid_query`: The query has OR outside parentheses with no single reading, GDELT rejected the query — a DOC-only operator, sourcelang:, an overly short, long, or common keyword, or malformed syntax — or the timespan is not a whole number followed by min, h, hours, d, or days, or is shorter than 31 minutes. `gdelt_rate_limited`: GDELT rejected the request for its one-request-per-five-seconds limit, or too many requests were already queued for this one to start in time. `gdelt_unavailable`: GDELT Context API is unreachable or temporarily returned no usable data. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance on this page: when nothing matched, how to broaden the query or window; when GDELT returned matches outside an explicit window — it reads window bounds only to the minute, and a window under 60 minutes goes out widened — how many were dropped; when continuationWindow is present, that this page is not every match; when the page reached past the far edge of its window, that it holds every match in it; and when no narrower window reaches further matches, why, and whether a larger maxRecords helps — or, at the 200 ceiling, that continuationWindow skips the rest of the one minute every match on the page fell in."New value: +"When the query's terms were joined by OR outside parentheses, the grouped query that ran. Guidance on this page: when nothing matched, how to broaden the query or window; when GDELT returned matches outside an explicit window — it reads window bounds only to the minute, and a window under 60 minutes goes out widened — how many were dropped; when continuationWindow is present, that this page is not every match; when the page reached past the far edge of its window, that it holds every match in it; and when no narrower window reaches further matches, why, and whether a larger maxRecords helps — or, at the 200 ceiling, that continuationWindow skips the rest of the one minute every match on the page fell in."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say read-only and open-world; the description adds substantial operational detail beyond that: maxRecords counts sentences before one-per-article deduplication so pages run short, continuationWindow supplies the next window, minute-granularity bounds block continuation inside a single minute, and the 200 ceiling causes the continuation to skip that minute. These are real behavioral constraints an agent must know to page correctly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then query semantics, then pagination mechanics, then operator syntax, then routing. Every sentence carries information, but it is a dense single paragraph that repeats some schema content (timespan, startDatetime/endDatetime clamping), which costs a little tightness.

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?

An output schema exists, yet the description still summarizes the returned fields (sentence, surrounding text, article URL, title, domain, seen date), and it covers the window limits, paging caveats, and operator set. For a 7-parameter, 72-hour-window search tool, an agent has everything needed to call and page it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents each parameter's syntax and clamping. The description still adds value by explaining cross-parameter interaction — how maxRecords and continuationWindow combine, and the failure mode when all matches fall in one minute — which no single field description conveys. Some sentences, such as the operator list, largely restate the query field.

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?

States a specific verb and resource — searching sentence-level matches in the last 72 hours of English-language news via the GDELT Context 2.0 API — and makes the sentence-level scope explicit ('Every query term must fall inside one sentence'). It also distinguishes itself from gdelt_search_articles by naming the exact conditions that route there.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit alternative and the conditions selecting it: DOC-only filters (sourcecountry:, sourcelang:, theme:, tone), domain filtering, other languages, or coverage older than 72 hours go to gdelt_search_articles. It also warns there is no relevance ranking, so the agent knows what this tool cannot do.

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.