Skip to main content
Glama

Get Statistics

get_statistics
Read-onlyIdempotent

Retrieve journal statistics and analytics with optional project breakdowns to track activity and analyze progress across workspaces.

Instructions

Get journal statistics and analytics (Phase 2: includes project breakdown)

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_statistics"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeNoAnti-Hallucination Hint: Use group_by instead of timeframe or time.
periodNoAnti-Hallucination Hint: Use group_by instead of timeframe or period.
end_dateNo
group_byNoweek
timeframeNoAnti-Hallucination Hint: Use group_by instead of timeframe or period.
start_dateNo
use_test_dbNo
workspace_idNoOptional workspace isolation identifier (e.g. "alpha"). Do not use numeric project IDs or "workspace" as the key.
project_numberNoAnti-Hallucination Hint: get_statistics cannot be filtered by project_number. It always returns global stats. Use project_breakdown: true instead.
project_breakdownNoSet to true to return multi-project entry breakdown across all registered projects (workspace_id: "*").

Output Schema

NameRequiredDescriptionDefault
codeNoError code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)
errorNoHuman-readable error message
detailsNoAdditional error context
groupByNo
successNo
categoryNoError category (validation, query, connection, internal)
dateRangeNo
suggestionNoSuggested fix for the error
recoverableNoWhether the error is recoverable
totalEntriesNo
activityTrendNo
causalMetricsNo
entriesByTypeNo
decisionDensityNo
entriesByPeriodNo
projectBreakdownNo
aggregated_errorsNoDetails of individual errors in a multi-step operation
relationshipBreakdownNo
relationshipComplexityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv9.1.0
    • addedOutput schema / properties / relationshipBreakdown
      Added value: +{
      +  "additionalProperties": {
      +    "type": "number"
      +  },
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / relationshipComplexity / properties / density
      Added value: +{
      +  "type": "number"
      +}
  2. First observedv9.0.0

TDQS

C2.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so safety is fully covered by structured data. The description adds nothing behavioral beyond the phrase "Phase 2: includes project breakdown" – it does not disclose that stats are always global, that project_number filtering is rejected, or how workspace_id scoping interacts with the breakdown. Those constraints live only in schema hints, not the description.

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

Conciseness3/5

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

It is a single short sentence with the core purpose front-loaded and no wasted wording, but the brevity is under-specification rather than economy given a ten-parameter tool. The parenthetical adds a feature note without explaining it.

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

Completeness2/5

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

An output schema exists, so return values need not be described, but for a ten-parameter analytics tool with defaulted arguments and a global-vs-project-breakdown mode, the definition is too thin. It fails to clarify how project_breakdown interacts with the global stats claim or how to select it over sibling analytics tools.

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

Parameters2/5

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

Ten parameters at 60% schema description coverage, and the description names none of them except an oblique reference to project breakdown. It does not explain group_by (the default, week), start_date/end_date semantics, or that workspace_id cannot be a numeric project ID, even though the schema's anti-hallucination hints show agents frequently misuse these fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

It states a verb and resource ("get journal statistics and analytics") and gestures at a project-breakdown capability, but it never says which statistics (entry counts, tag distributions, activity over time) or how it differs from siblings such as team_get_statistics or get_cross_project_insights. The agent can tell it is an analytics read, but not which analytics.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no named alternative. With team_get_statistics and get_cross_project_insights in the sibling list, the agent is left to guess which analytics tool to call, and the parenthetical about Phase 2 only hints at a feature rather than a selection rule.

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

Deploy Server

Other Tools