Execute a flexible YouTube Analytics API query against the authenticated channel. Supports any combination of metrics, dimensions, filters, and sort orders supported by the YouTube Analytics API v2. startDate and endDate default to the last 28 days when omitted. Args: - \
AI agents invoke youtube_run_analytics_query to trigger actions in Youtube. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.
This is an Execute tool because it runs queries with arguments that determine outcome. While reads are typically lower-risk, the ability to execute arbitrary analytics API queries with flexible parameters—combined with the server's elevated privileges over a full YouTube channel (as noted in server description)—creates risk if an AI agent constructs malicious or unintended queries.
From the tool's definition Tool executes arbitrary 'flexible YouTube Analytics API query' with user-provided 'metrics, dimensions, filters, and sort orders' against the authenticated channel.
Attacks that exploit this kind of access
Execute a flexible YouTube Analytics API query against the authenticated channel. Supports any combination of metrics, dimensions, filters, and sort orders supported by the YouTube Analytics API v2. startDate and endDate default to the last 28 days when omitted. Args: - \. It is categorised as a Execute tool in the Youtube MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the Youtube MCP server in PolicyLayer and add a rule for youtube_run_analytics_query: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Youtube. Nothing to install.
youtube_run_analytics_query is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the youtube_run_analytics_query rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for youtube_run_analytics_query. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
youtube_run_analytics_query is provided by the Youtube MCP server (tuitamogamer-gpt/youtube-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →