Skip to main content
Glama
mamrrez

Google Trends MCP Server

history_sql

Read-onlyIdempotent

Run read-only SQL SELECT queries on saved Google Trends history to answer custom questions beyond built-in history tools. Query trending, snapshots, watchlists, and readings data.

Instructions

Run a read-only SQL SELECT on the local data file, for questions the other history tools do not cover.

Tables: trending(geo, title, qkey, started, ended, volume, growth, categories, breakdown, first_seen, last_seen) — one row per saved trend; times are unix seconds UTC; categories and breakdown are JSON lists. snapshots(id, taken_at, geo, hours, trends) — one row per snapshot_trending run. watchlist(keyword, geo, note, added_at) readings(keyword, geo, taken_at, latest, average, yoy, label) — one row per watchlist_report measurement. Example: SELECT title, volume, datetime(started,'unixepoch') FROM trending WHERE geo='US' ORDER BY volume DESC LIMIT 20

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, and non-destructive behavior. The description adds important operational context beyond annotations: it identifies the local data file, lists the available tables and columns, notes unix-second UTC times, and marks JSON-list fields.

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 purpose is front-loaded in the first sentence. The table definitions and example are information-dense and directly support query construction, with no redundant or filler text.

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 tool is complex, but annotations and an output schema already cover safety and return structure. The description supplies the data model, key column semantics, and an example, though it omits the limit parameter and any further query restrictions such as row caps or forbidden statements.

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 description coverage is 0%, so the description should compensate for both parameters. It explains the query parameter well by describing allowed SQL and providing table schemas, but it says nothing about the limit parameter, its default of 100, or how row limiting interacts with returned results.

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 names a specific verb and resource: 'Run a read-only SQL SELECT on the local data file.' It also distinguishes the tool from sibling history tools by saying it is for questions they do not cover, which is enough for an agent to identify its role.

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?

It gives clear context for when to use SQL instead of other history tools: 'for questions the other history tools do not cover.' However, it does not name specific alternative tools or state exclusions such as preferring structured tools whenever possible.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.