Skip to main content
Glama

analytics_query

Read-onlyIdempotent

Answer analytics questions about this workspace's own data (conversations, messages, voice calls) — e.g. 'how many new conversations this week by channel' or 'inbound vs outbound messages per day this month'. Returns rows plus a chart hint. Read-only and scoped to the current workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYesThe analytics question in natural language, e.g. 'how many conversations started this week, by channel?'
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added
  3. Removed
  4. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so safety is covered structurally. The description adds value beyond that by disclosing the return shape ('Returns rows plus a chart hint') and the current-workspace scoping, which the annotations do not convey.

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?

Two sentences, purpose front-loaded, examples inline, and the return/scoping caveats tacked on last. No filler or repetition; every clause carries information.

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?

With no output schema, the description usefully notes 'Returns rows plus a chart hint,' and the workspace scoping plus read-only nature round out the picture for a 2-parameter NL query tool. Minor gaps remain around row limits or result shape detail, but nothing essential to correct invocation is missing.

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 100%, so both parameters are already documented in the schema (including the in_workspace semantics about not storing anything and not affecting other sessions). The description's examples mirror the schema's own example for 'question' and add no new parameter-level syntax or constraints, so baseline 3 applies.

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 (Answer analytics questions) and resource (this workspace's own data: conversations, messages, voice calls), with two concrete example questions that pin down the scope. It is readily distinguishable from data-access siblings like db_query, knowledge_query, and threads_channel_account_stats.

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 'about this workspace's own data' framing and the example questions give clear context for when to reach for it, and the read-only/current-workspace scoping tells the agent it is safe for exploratory analytics. It stops short of naming alternatives (db_query, search_messages) or stating when NOT to use it, so it lacks explicit exclusions.

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.