Skip to main content
Glama

Get GDELT TV Context

gdelt_get_tv_context
Read-only

Get the top co-occurring words and phrases from TV news clips matching a query — the vocabulary framing a topic on television. Returns the most frequent non-stopword terms from matching clips, with relative frequency scores (0–100, where 100 = the query term itself). Use to understand narrative framing, identify related concepts mentioned alongside a topic, or generate follow-up search terms. TV data spans 2009–October 2024.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query for TV transcript content. Same TV operators as gdelt_search_tv: station:CNN, network:CBS, market:"National", show:"Anderson Cooper", context:"vaccine".
stationsNoStation IDs to filter to (e.g. ["CNN", "FOXNEWS"]). The GDELT TV API requires at least one station — supply it here, or embed a station: selector directly in query. Omitting both is rejected; it does not fall back to all stations. Use gdelt_list_tv_stations to see valid IDs.
timespanNoTime window, e.g. "1m", "6m". Ignored when startDatetime/endDatetime are set. TV data spans 2009–October 2024.
endDatetimeNoEnd datetime in GDELT format YYYYMMDDHHMMSS — exactly 14 digits, no separators (e.g. 20200131235959). Must pair with startDatetime; supplying only one of the two is rejected.
startDatetimeNoStart datetime in GDELT format YYYYMMDDHHMMSS — exactly 14 digits, no separators (e.g. 20200101000000). Must pair with endDatetime; supplying only one of the two is rejected. TV data spans 2009–October 2024.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
wordsNoCo-occurring terms sorted by score descending.
noticeNoGuidance when no clips matched, so there is no vocabulary to report — the resolved timespan window, the October 2024 archive cutoff, and how to broaden the query or check station coverage. Absent when terms were returned.
totalCountNoNumber of clips from which co-occurrences were computed. Absent when the upstream API does not return a clip count.
effectiveQueryNoEchoed query string for use in follow-up calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `no_context`: No context words found — no clips matched the query. `invalid_date_range`: Only one of startDatetime / endDatetime was supplied, one of them is not a real UTC calendar timestamp, or startDatetime is not earlier than endDatetime. `invalid_query`: GDELT rejected the query — no station was selected, or the query string is malformed. `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 TV 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, or startDatetime is not earlier than endDatetime. `invalid_query`: GDELT rejected the query — no station was selected, or the query string is malformed. `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 TV API is unreachable or temporarily returned no usable data. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "no_context",
      -  "invalid_date_range",
      -  "invalid_query",
      -  "gdelt_rate_limited",
      -  "gdelt_unavailable"
      -]New value: +[
      +  "invalid_date_range",
      +  "invalid_query",
      +  "gdelt_rate_limited",
      +  "gdelt_unavailable"
      +]
    • changedOutput schema / properties / notice / description
      Previous value: -"Recovery hint when no context was found. Absent on successful responses."New value: +"Guidance when no clips matched, so there is no vocabulary to report — the resolved timespan window, the October 2024 archive cutoff, and how to broaden the query or check station coverage. Absent when terms were returned."
  2. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `no_context`: No context words found — no clips matched the query. `invalid_date_range`: Exactly one of startDatetime / endDatetime was supplied. `invalid_query`: GDELT rejected the query — no station was selected, or the query string is malformed. `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 TV 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: `no_context`: No context words found — no clips matched the query. `invalid_date_range`: Only one of startDatetime / endDatetime was supplied, one of them is not a real UTC calendar timestamp, or startDatetime is not earlier than endDatetime. `invalid_query`: GDELT rejected the query — no station was selected, or the query string is malformed. `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 TV API is unreachable or temporarily returned no usable data. Other values are possible when a failure originates below the handler."
  3. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `no_context`: No context words found — no clips matched the query. `invalid_date_range`: Exactly one of startDatetime / endDatetime was supplied. `invalid_query`: GDELT rejected the query — no station was selected, or the query string is malformed. `gdelt_rate_limited`: GDELT rejected the request because its one-request-per-five-seconds limit was reached. `gdelt_unavailable`: GDELT TV 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: `no_context`: No context words found — no clips matched the query. `invalid_date_range`: Exactly one of startDatetime / endDatetime was supplied. `invalid_query`: GDELT rejected the query — no station was selected, or the query string is malformed. `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 TV API is unreachable or temporarily returned no usable data. Other values are possible when a failure originates below the handler."
  4. Changed2 schema fields changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `no_context`: No context words found — no clips matched the query. `invalid_date_range`: Exactly one of startDatetime / endDatetime was supplied. `invalid_query`: GDELT rejected the query — no station was selected, or the query string is malformed. `gdelt_unavailable`: GDELT TV API is unreachable or rate-limited. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `no_context`: No context words found — no clips matched the query. `invalid_date_range`: Exactly one of startDatetime / endDatetime was supplied. `invalid_query`: GDELT rejected the query — no station was selected, or the query string is malformed. `gdelt_rate_limited`: GDELT rejected the request because its one-request-per-five-seconds limit was reached. `gdelt_unavailable`: GDELT TV API is unreachable or temporarily returned no usable data. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "no_context",
      -  "invalid_date_range",
      -  "invalid_query",
      -  "gdelt_unavailable"
      -]New value: +[
      +  "no_context",
      +  "invalid_date_range",
      +  "invalid_query",
      +  "gdelt_rate_limited",
      +  "gdelt_unavailable"
      +]
  5. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "words",
      +      "effectiveQuery"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `no_context`: No context words found — no clips matched the query. `invalid_date_range`: Exactly one of startDatetime / endDatetime was supplied. `invalid_query`: GDELT rejected the query — no station was selected, or the query string is malformed. `gdelt_unavailable`: GDELT TV API is unreachable or rate-limited. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "no_context",
      +            "invalid_date_range",
      +            "invalid_query",
      +            "gdelt_unavailable"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "words",
      -  "effectiveQuery"
      -]
  6. Changed5 schema fields changed
    • changedInput schema / properties / endDatetime / description
      Previous value: -"End datetime in GDELT format YYYYMMDDHHMMSS. Must pair with startDatetime."New value: +"End datetime in GDELT format YYYYMMDDHHMMSS — exactly 14 digits, no separators (e.g. 20200131235959). Must pair with startDatetime; supplying only one of the two is rejected."
    • addedInput schema / properties / endDatetime / pattern
      Added value: +"^\\d{14}$"
    • changedInput schema / properties / startDatetime / description
      Previous value: -"Start datetime in GDELT format YYYYMMDDHHMMSS. Must pair with endDatetime. TV data spans 2009–October 2024."New value: +"Start datetime in GDELT format YYYYMMDDHHMMSS — exactly 14 digits, no separators (e.g. 20200101000000). Must pair with endDatetime; supplying only one of the two is rejected. TV data spans 2009–October 2024."
    • addedInput schema / properties / startDatetime / pattern
      Added value: +"^\\d{14}$"
    • changedInput schema / properties / stations / description
      Previous value: -"Station IDs to filter to. Omit for all stations. Use gdelt_list_tv_stations to see valid IDs."New value: +"Station IDs to filter to (e.g. [\"CNN\", \"FOXNEWS\"]). The GDELT TV API requires at least one station — supply it here, or embed a station: selector directly in query. Omitting both is rejected; it does not fall back to all stations. Use gdelt_list_tv_stations to see valid IDs."
  7. Changed3 schema fields changed
    • addedInput schema / properties / endDatetime
      Added value: +{
      +  "description": "End datetime in GDELT format YYYYMMDDHHMMSS. Must pair with startDatetime.",
      +  "type": "string"
      +}
    • addedInput schema / properties / startDatetime
      Added value: +{
      +  "description": "Start datetime in GDELT format YYYYMMDDHHMMSS. Must pair with endDatetime. TV data spans 2009–October 2024.",
      +  "type": "string"
      +}
    • changedInput schema / properties / timespan / description
      Previous value: -"Time window, e.g. \"1m\", \"6m\". TV data spans 2009–October 2024."New value: +"Time window, e.g. \"1m\", \"6m\". Ignored when startDatetime/endDatetime are set. TV data spans 2009–October 2024."
  8. Changed2 schema fields changed
    • changedOutput schema / properties / totalCount / description
      Previous value: -"Number of matching clips from which co-occurrences were computed."New value: +"Number of clips from which co-occurrences were computed. Absent when the upstream API does not return a clip count."
    • changedOutput schema / required
      Previous value: -[
      -  "words",
      -  "effectiveQuery",
      -  "totalCount"
      -]New value: +[
      +  "words",
      +  "effectiveQuery"
      +]
  9. Changed5 schema fields changed
    • removedOutput schema / properties / clipsAnalyzed
      Removed value: -{
      -  "description": "Number of matching clips from which co-occurrences were computed.",
      -  "type": "number"
      -}
    • addedOutput schema / properties / effectiveQuery
      Added value: +{
      +  "description": "Echoed query string for use in follow-up calls.",
      +  "type": "string"
      +}
    • removedOutput schema / properties / query
      Removed value: -{
      -  "description": "Echoed query string.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Number of matching clips from which co-occurrences were computed.",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "query",
      -  "words",
      -  "clipsAnalyzed"
      -]New value: +[
      +  "words",
      +  "effectiveQuery",
      +  "totalCount"
      +]
  10. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is clear. The description adds valuable behavioral context beyond annotations: it specifies the output scoring scale (0–100, where 100 = the query term itself) and the data range (2009–October 2024). No contradictions with annotations.

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

Conciseness5/5

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

The description is three sentences, front-loaded with the primary purpose, then output details, then use cases, and finally data range. Every sentence earns its place with no redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the core behavior, output format, usage scenarios, and data range. It does not explicitly mention the station requirement, but that is thoroughly documented in the schema. With an output schema present, the description is complete enough for an agent to invoke the tool correctly.

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

Parameters3/5

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

Schema coverage is 100%, with all five parameters having detailed descriptions. The description itself does not add parameter-level meaning beyond what the schema provides, but it does reinforce the data range constraint. Given full schema coverage, the baseline of 3 is appropriate.

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?

The description states a specific verb and resource: 'Get the top co-occurring words and phrases from TV news clips matching a query'. It clearly differentiates this from sibling tools like tone distribution or coverage breakdown by focusing on vocabulary framing. The output format is also specified, making the tool's function unmistakable.

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

Usage Guidelines4/5

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

The description provides explicit use cases: 'understand narrative framing, identify related concepts mentioned alongside a topic, or generate follow-up search terms'. It does not explicitly name alternative tools, but the context is clear enough for an agent to infer when this tool is appropriate versus siblings like gdelt_get_tone_distribution.

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.